From: Artur Weber <aweber.kernel@gmail.com>
To: Li Dong <lidong@vivo.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Sam Ravnborg <sam@ravnborg.org>, David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>,
open list <linux-kernel@vger.kernel.org>
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH] gpu: drm: Optimize the unused variable ret
Date: Tue, 20 Jun 2023 15:01:00 +0200 [thread overview]
Message-ID: <52d0771d-b184-8154-6a1a-3f7bc223ac3a@gmail.com> (raw)
In-Reply-To: <20230619113154.1980-1-lidong@vivo.com>
On 19/06/2023 13:31, Li Dong wrote:
> Use zero as the return value instead of the unused variable ret
>
> Signed-off-by: Li Dong <lidong@vivo.com>
> ---
> drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> index 102e1fc7ee38..fec0d014fd0e 100644
> --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
> @@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)
> static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
> {
> struct mipi_dsi_device *dsi = ctx->dsi;
> - int ret = 0;
>
> if (lock) {
> mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5);
> @@ -80,7 +79,7 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)
> mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5);
> }
>
> - return ret;
> + return 0;
> }
>
> static int s6d7aa0_on(struct s6d7aa0 *ctx)
Commit "drm/panel: s6d7aa0: remove the unneeded variable in
s6d7aa0_lock"[1] already does this.
Best regards
Artur
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c?id=c5dacfe2e6c1251276e29b4cdac771f504593523
prev parent reply other threads:[~2023-06-20 13:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 11:31 [PATCH] gpu: drm: Optimize the unused variable ret Li Dong
2023-06-20 13:01 ` Artur Weber [this message]
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=52d0771d-b184-8154-6a1a-3f7bc223ac3a@gmail.com \
--to=aweber.kernel@gmail.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=lidong@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=opensource.kernel@vivo.com \
--cc=sam@ravnborg.org \
/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