[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <caf4d2ad-f8ff-d014-360b-0945ee374304@huawei.com>
Date: Tue, 15 Jun 2021 10:01:22 +0800
From: "libaokun (A)" <libaokun1@...wei.com>
To: <bskeggs@...hat.com>, <airlied@...ux.ie>, <daniel@...ll.ch>,
<lyude@...hat.com>, <airlied@...hat.com>, <jajones@...dia.com>,
<dri-devel@...ts.freedesktop.org>, <nouveau@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>
CC: <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
<yangjihong1@...wei.com>, <yukuai3@...wei.com>
Subject: Re: [PATCH -next] drm/nouveau:disp: Remove set but not used variable
'ret'
ping
在 2021/5/15 17:01, Baokun Li 写道:
> From: "libaokun1@...wei.com" <libaokun1@...wei.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@...wei.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) {
Powered by blists - more mailing lists