Tian Tao
2020-Sep-22 09:25 UTC
[Nouveau] [PATCH] drm/nouveau/kms: Remove set but not used 'ret'
This addresses the following gcc warning with "make W=1": drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ?nv50_mstm_prepare?: drivers/gpu/drm/nouveau/dispnv50/disp.c:1378:6: warning: variable ?ret? set but not used [-Wunused-but-set-variable] Signed-off-by: Tian Tao <tiantao6 at hisilicon.com> --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index b111fe2..d05c57c 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -1379,6 +1379,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm) NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); ret = drm_dp_update_payload_part1(&mstm->mgr); + if (ret) { + NV_ATOMIC(drm, "failed to update payload %d\n", ret); + } drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) { -- 2.7.4
Lyude Paul
2020-Sep-22 18:16 UTC
[Nouveau] [PATCH] drm/nouveau/kms: Remove set but not used 'ret'
On Tue, 2020-09-22 at 17:25 +0800, Tian Tao wrote:> This addresses the following gcc warning with "make W=1": > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ?nv50_mstm_prepare?: > drivers/gpu/drm/nouveau/dispnv50/disp.c:1378:6: warning: > variable ?ret? set but not used [-Wunused-but-set-variable] > > Signed-off-by: Tian Tao <tiantao6 at hisilicon.com> > --- > drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c > b/drivers/gpu/drm/nouveau/dispnv50/disp.c > index b111fe2..d05c57c 100644 > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c > @@ -1379,6 +1379,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm) > > NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); > ret = drm_dp_update_payload_part1(&mstm->mgr); > + if (ret) { > + NV_ATOMIC(drm, "failed to update payload %d\n", ret); > + }Remove the braces around ret and this is: Reviewed-by: Lyude Paul <lyude at redhat.com>> > drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { > if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {-- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
Possibly Parallel Threads
- [PATCH] drm/nouveau/kms: Remove set but not used 'ret'
- [PATCH v2] drm/nouveau/kms: Remove set but not used 'ret'
- [PATCH -next] gpu: nouveau: Remove set but not used variable
- [PATCH] drm/dp_mst: add missed nv50_outp_release in nv50_msto_disable
- [PATCH 0/6] improve feature detection