diff mbox series

[v2,1/2] drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format

Message ID 20230102202542.3494677-1-javierm@redhat.com (mailing list archive)
State Accepted
Headers show
Series [v2,1/2] drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format | expand

Commit Message

Javier Martinez Canillas Jan. 2, 2023, 8:25 p.m. UTC
Change made using a `clang-format -i include/drm/drm_mipi_dsi.h` command.

Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

Changes in v2:
- New patch in v2.

 include/drm/drm_mipi_dsi.h | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

Comments

Sam Ravnborg Jan. 2, 2023, 8:30 p.m. UTC | #1
On Mon, Jan 02, 2023 at 09:25:41PM +0100, Javier Martinez Canillas wrote:
> Change made using a `clang-format -i include/drm/drm_mipi_dsi.h` command.
> 
> Suggested-by: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

Thanks,

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> 
> Changes in v2:
> - New patch in v2.
> 
>  include/drm/drm_mipi_dsi.h | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
> index 20b21b577dea..e9d1e8a7fc7e 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -303,15 +303,18 @@ int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi,
>   * @cmd: Command
>   * @seq: buffer containing data to be transmitted
>   */
> -#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...) do {				\
> -		static const u8 d[] = { cmd, seq };				\
> -		struct device *dev = &dsi->dev;	\
> -		int ret;						\
> -		ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d));	\
> -		if (ret < 0) {						\
> -			dev_err_ratelimited(dev, "sending command %#02x failed: %d\n", cmd, ret); \
> -			return ret;						\
> -		}						\
> +#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...)                           \
> +	do {                                                               \
> +		static const u8 d[] = { cmd, seq };                        \
> +		struct device *dev = &dsi->dev;                            \
> +		int ret;                                                   \
> +		ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d));    \
> +		if (ret < 0) {                                             \
> +			dev_err_ratelimited(                               \
> +				dev, "sending command %#02x failed: %d\n", \
> +				cmd, ret);                                 \
> +			return ret;                                        \
> +		}                                                          \
>  	} while (0)
>  
>  /**
> -- 
> 2.38.1
Javier Martinez Canillas Jan. 7, 2023, 5:36 p.m. UTC | #2
On 1/2/23 21:30, Sam Ravnborg wrote:
> On Mon, Jan 02, 2023 at 09:25:41PM +0100, Javier Martinez Canillas wrote:
>> Change made using a `clang-format -i include/drm/drm_mipi_dsi.h` command.
>>
>> Suggested-by: Sam Ravnborg <sam@ravnborg.org>
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> 
> Thanks,
> 
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
>> ---

Pushed to drm-misc (drm-misc-next). Thanks!
diff mbox series

Patch

diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 20b21b577dea..e9d1e8a7fc7e 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -303,15 +303,18 @@  int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi,
  * @cmd: Command
  * @seq: buffer containing data to be transmitted
  */
-#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...) do {				\
-		static const u8 d[] = { cmd, seq };				\
-		struct device *dev = &dsi->dev;	\
-		int ret;						\
-		ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d));	\
-		if (ret < 0) {						\
-			dev_err_ratelimited(dev, "sending command %#02x failed: %d\n", cmd, ret); \
-			return ret;						\
-		}						\
+#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...)                           \
+	do {                                                               \
+		static const u8 d[] = { cmd, seq };                        \
+		struct device *dev = &dsi->dev;                            \
+		int ret;                                                   \
+		ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d));    \
+		if (ret < 0) {                                             \
+			dev_err_ratelimited(                               \
+				dev, "sending command %#02x failed: %d\n", \
+				cmd, ret);                                 \
+			return ret;                                        \
+		}                                                          \
 	} while (0)
 
 /**