From: Sam Ravnborg <sam@ravnborg.org>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
Nick Desaulniers <ndesaulniers@google.com>,
llvm@lists.linux.dev, linux-kernel@vger.kernel.org,
Nathan Chancellor <nathan@kernel.org>,
dri-devel@lists.freedesktop.org, Tom Rix <trix@redhat.com>
Subject: Re: [PATCH v2 1/2] drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format
Date: Mon, 2 Jan 2023 21:30:34 +0100 [thread overview]
Message-ID: <Y7M+6gdQM/4DhQsP@ravnborg.org> (raw)
In-Reply-To: <20230102202542.3494677-1-javierm@redhat.com>
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
next prev parent reply other threads:[~2023-01-02 20:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-02 20:25 [PATCH v2 1/2] drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format Javier Martinez Canillas
2023-01-02 20:25 ` [PATCH v2 2/2] drm/mipi-dsi: Add a mipi_dsi_dcs_write_seq() macro Javier Martinez Canillas
2023-01-07 17:37 ` Javier Martinez Canillas
2023-01-02 20:30 ` Sam Ravnborg [this message]
2023-01-07 17:36 ` [PATCH v2 1/2] drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y7M+6gdQM/4DhQsP@ravnborg.org \
--to=sam@ravnborg.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox