From: "libaokun (A)" <libaokun1@huawei.com>
To: <bskeggs@redhat.com>, <airlied@linux.ie>, <daniel@ffwll.ch>,
<lyude@redhat.com>, <airlied@redhat.com>, <jajones@nvidia.com>,
<dri-devel@lists.freedesktop.org>,
<nouveau@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Cc: yuehaibing@huawei.com, weiyongjun1@huawei.com,
yukuai3@huawei.com, yangjihong1@huawei.com
Subject: Re: [Nouveau] [PATCH -next] drm/nouveau:disp: Remove set but not used variable 'ret'
Date: Tue, 15 Jun 2021 10:01:22 +0800 [thread overview]
Message-ID: <caf4d2ad-f8ff-d014-360b-0945ee374304@huawei.com> (raw)
In-Reply-To: <20210515090155.186083-1-libaokun1@huawei.com>
ping
在 2021/5/15 17:01, Baokun Li 写道:
> From: "libaokun1@huawei.com" <libaokun1@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_cleanup':
> drivers/gpu/drm/nouveau/dispnv50/disp.c:1389:6: warning:
> variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_prepare':
> drivers/gpu/drm/nouveau/dispnv50/disp.c:1413:6: warning:
> variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction.
>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
> ---
> drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index 1c9c0cdf85db..5ee3f1fc76d7 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1386,12 +1386,10 @@ nv50_mstm_cleanup(struct nv50_mstm *mstm)
> {
> struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
> struct drm_encoder *encoder;
> - int ret;
>
> NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name);
> - ret = drm_dp_check_act_status(&mstm->mgr);
> -
> - ret = drm_dp_update_payload_part2(&mstm->mgr);
> + drm_dp_check_act_status(&mstm->mgr);
> + drm_dp_update_payload_part2(&mstm->mgr);
>
> drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
> if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
> @@ -1410,10 +1408,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm)
> {
> struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
> struct drm_encoder *encoder;
> - int ret;
>
> NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name);
> - ret = drm_dp_update_payload_part1(&mstm->mgr);
> + drm_dp_update_payload_part1(&mstm->mgr);
>
> drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
> if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
prev parent reply other threads:[~2021-06-27 3:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-15 9:01 [Nouveau] [PATCH -next] drm/nouveau:disp: Remove set but not used variable 'ret' Baokun Li
2021-05-31 12:38 ` libaokun (A)
2021-06-15 2:01 ` libaokun (A) [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=caf4d2ad-f8ff-d014-360b-0945ee374304@huawei.com \
--to=libaokun1@huawei.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jajones@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=weiyongjun1@huawei.com \
--cc=yangjihong1@huawei.com \
--cc=yuehaibing@huawei.com \
--cc=yukuai3@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).