diff mbox series

[1/2] drm/mipi-dsi: Add quiet member to mipi_dsi_multi_context struct

Message ID 20240724122447.284165-2-tejasvipin76@gmail.com (mailing list archive)
State New, archived
Headers show
Series Allow errors to be silenced in multi functions | expand

Commit Message

Tejas Vipin July 24, 2024, 12:24 p.m. UTC
A "quiet" member is added to mipi_dsi_multi_context which allows 
silencing all the errors printed by the multi functions.

Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com>
---
 include/drm/drm_mipi_dsi.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Jani Nikula July 24, 2024, 3:28 p.m. UTC | #1
On Wed, 24 Jul 2024, Tejas Vipin <tejasvipin76@gmail.com> wrote:
> A "quiet" member is added to mipi_dsi_multi_context which allows 
> silencing all the errors printed by the multi functions.
>
> Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com>
> ---
>  include/drm/drm_mipi_dsi.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
> index 0f520eeeaa8e..75855c1c7dae 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -217,6 +217,16 @@ struct mipi_dsi_multi_context {
>  	 * end to see if any of them failed.
>  	 */
>  	int accum_err;
> +
> +	/**
> +	 * @quiet: Controls if a function calls dev_err or not
> +	 *
> +	 * Init to 0. When the value of quiet is set to 0, the function
> +	 * will  print error messages as required. If this is set to 1,
> +	 * the function will not print error messages, but will still
> +	 * change the value of accum_err.
> +	 */
> +	int quiet;

This is being used as a bool, why not make it a bool?

BR,
Jani.


>  };
>  
>  #define MIPI_DSI_MODULE_PREFIX "mipi-dsi:"
diff mbox series

Patch

diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 0f520eeeaa8e..75855c1c7dae 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -217,6 +217,16 @@  struct mipi_dsi_multi_context {
 	 * end to see if any of them failed.
 	 */
 	int accum_err;
+
+	/**
+	 * @quiet: Controls if a function calls dev_err or not
+	 *
+	 * Init to 0. When the value of quiet is set to 0, the function
+	 * will  print error messages as required. If this is set to 1,
+	 * the function will not print error messages, but will still
+	 * change the value of accum_err.
+	 */
+	int quiet;
 };
 
 #define MIPI_DSI_MODULE_PREFIX "mipi-dsi:"