All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables
@ 2021-04-15 19:44 ` Fabio M. De Francesco
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio M. De Francesco @ 2021-04-15 19:44 UTC (permalink / raw)
  To: dri-devel, outreachy-kernel, Daniel Vetter, Melissa Wen,
	Ben Skeggs, David Airlie
  Cc: Fabio M. De Francesco

Removed two set but unused variables.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 196612addfd6..828f48d5bdd4 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1386,12 +1386,11 @@ 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);
+	drm_dp_check_act_status(&mstm->mgr);
 
-	ret = drm_dp_update_payload_part2(&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 +1409,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) {
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables
@ 2021-04-15 19:44 ` Fabio M. De Francesco
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio M. De Francesco @ 2021-04-15 19:44 UTC (permalink / raw)
  To: dri-devel, outreachy-kernel, Daniel Vetter, Melissa Wen,
	Ben Skeggs, David Airlie
  Cc: Fabio M. De Francesco

Removed two set but unused variables.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 196612addfd6..828f48d5bdd4 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1386,12 +1386,11 @@ 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);
+	drm_dp_check_act_status(&mstm->mgr);
 
-	ret = drm_dp_update_payload_part2(&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 +1409,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) {
-- 
2.31.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables
  2021-04-15 19:44 ` Fabio M. De Francesco
@ 2021-04-15 19:57   ` Julia Lawall
  -1 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-04-15 19:57 UTC (permalink / raw)
  To: Fabio M. De Francesco
  Cc: dri-devel, outreachy-kernel, Daniel Vetter, Melissa Wen,
	Ben Skeggs, David Airlie



On Thu, 15 Apr 2021, Fabio M. De Francesco wrote:

> Removed two set but unused variables.

Would it be useful to use the values?

julia

>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
>  drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index 196612addfd6..828f48d5bdd4 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1386,12 +1386,11 @@ 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);
> +	drm_dp_check_act_status(&mstm->mgr);
>
> -	ret = drm_dp_update_payload_part2(&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 +1409,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) {
> --
> 2.31.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20210415194423.4880-1-fmdefrancesco%40gmail.com.
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables
@ 2021-04-15 19:57   ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-04-15 19:57 UTC (permalink / raw)
  To: Fabio M. De Francesco
  Cc: David Airlie, Daniel Vetter, dri-devel, Melissa Wen,
	outreachy-kernel, Ben Skeggs



On Thu, 15 Apr 2021, Fabio M. De Francesco wrote:

> Removed two set but unused variables.

Would it be useful to use the values?

julia

>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
>  drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index 196612addfd6..828f48d5bdd4 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1386,12 +1386,11 @@ 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);
> +	drm_dp_check_act_status(&mstm->mgr);
>
> -	ret = drm_dp_update_payload_part2(&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 +1409,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) {
> --
> 2.31.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20210415194423.4880-1-fmdefrancesco%40gmail.com.
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables
  2021-04-15 19:57   ` Julia Lawall
@ 2021-04-15 20:59     ` Fabio M. De Francesco
  -1 siblings, 0 replies; 8+ messages in thread
From: Fabio M. De Francesco @ 2021-04-15 20:59 UTC (permalink / raw)
  To: Julia Lawall
  Cc: dri-devel, outreachy-kernel, Daniel Vetter, Melissa Wen,
	Ben Skeggs, David Airlie

On Thursday, April 15, 2021 9:57:07 PM CEST Julia Lawall wrote:
> On Thu, 15 Apr 2021, Fabio M. De Francesco wrote:
> > Removed two set but unused variables.
> 
> Would it be useful to use the values?
>
It would be useful if one wants to check returns for errors (which are 
signaled by res different than 0). 

However most other drm code never checks it (as in drivers/gpu/drm/radeon/
radeon_dp_mst.c: lines 424 and 453).

Differently, drivers/gpu/drm/i915/display/intel_dp_mst.c does some logging:

ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
        if (ret) {
                drm_dbg_kms(&i915->drm, "failed to update payload %d\n", ret);

I could do like the second example, but I'm not sure maintainers would like 
it.

What do you think about it?

Thanks,

Fabio
> 
> julia
> 
> > Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> > ---
> > 
> >  drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++-----
> >  1 file changed, 3 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > b/drivers/gpu/drm/nouveau/dispnv50/disp.c index
> > 196612addfd6..828f48d5bdd4 100644
> > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > @@ -1386,12 +1386,11 @@ 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);
> > +	drm_dp_check_act_status(&mstm->mgr);
> > 
> > -	ret = drm_dp_update_payload_part2(&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 +1409,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) {
> > 
> > --
> > 2.31.1
> > 
> > --
> > You received this message because you are subscribed to the Google
> > Groups "outreachy-kernel" group. To unsubscribe from this group and
> > stop receiving emails from it, send an email to
> > outreachy-kernel+unsubscribe@googlegroups.com. To view this discussion
> > on the web visit
> > https://groups.google.com/d/msgid/outreachy-kernel/20210415194423.4880
> > -1-fmdefrancesco%40gmail.com.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables
@ 2021-04-15 20:59     ` Fabio M. De Francesco
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio M. De Francesco @ 2021-04-15 20:59 UTC (permalink / raw)
  To: Julia Lawall
  Cc: David Airlie, Daniel Vetter, dri-devel, Melissa Wen,
	outreachy-kernel, Ben Skeggs

On Thursday, April 15, 2021 9:57:07 PM CEST Julia Lawall wrote:
> On Thu, 15 Apr 2021, Fabio M. De Francesco wrote:
> > Removed two set but unused variables.
> 
> Would it be useful to use the values?
>
It would be useful if one wants to check returns for errors (which are 
signaled by res different than 0). 

However most other drm code never checks it (as in drivers/gpu/drm/radeon/
radeon_dp_mst.c: lines 424 and 453).

Differently, drivers/gpu/drm/i915/display/intel_dp_mst.c does some logging:

ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
        if (ret) {
                drm_dbg_kms(&i915->drm, "failed to update payload %d\n", ret);

I could do like the second example, but I'm not sure maintainers would like 
it.

What do you think about it?

Thanks,

Fabio
> 
> julia
> 
> > Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> > ---
> > 
> >  drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++-----
> >  1 file changed, 3 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > b/drivers/gpu/drm/nouveau/dispnv50/disp.c index
> > 196612addfd6..828f48d5bdd4 100644
> > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > @@ -1386,12 +1386,11 @@ 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);
> > +	drm_dp_check_act_status(&mstm->mgr);
> > 
> > -	ret = drm_dp_update_payload_part2(&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 +1409,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) {
> > 
> > --
> > 2.31.1
> > 
> > --
> > You received this message because you are subscribed to the Google
> > Groups "outreachy-kernel" group. To unsubscribe from this group and
> > stop receiving emails from it, send an email to
> > outreachy-kernel+unsubscribe@googlegroups.com. To view this discussion
> > on the web visit
> > https://groups.google.com/d/msgid/outreachy-kernel/20210415194423.4880
> > -1-fmdefrancesco%40gmail.com.




_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables
  2021-04-15 20:59     ` Fabio M. De Francesco
@ 2021-04-15 21:16       ` Julia Lawall
  -1 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-04-15 21:16 UTC (permalink / raw)
  To: Fabio M. De Francesco
  Cc: dri-devel, outreachy-kernel, Daniel Vetter, Melissa Wen,
	Ben Skeggs, David Airlie



On Thu, 15 Apr 2021, Fabio M. De Francesco wrote:

> On Thursday, April 15, 2021 9:57:07 PM CEST Julia Lawall wrote:
> > On Thu, 15 Apr 2021, Fabio M. De Francesco wrote:
> > > Removed two set but unused variables.
> >
> > Would it be useful to use the values?
> >
> It would be useful if one wants to check returns for errors (which are
> signaled by res different than 0).
>
> However most other drm code never checks it (as in drivers/gpu/drm/radeon/
> radeon_dp_mst.c: lines 424 and 453).
>
> Differently, drivers/gpu/drm/i915/display/intel_dp_mst.c does some logging:
>
> ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
>         if (ret) {
>                 drm_dbg_kms(&i915->drm, "failed to update payload %d\n", ret);
>
> I could do like the second example, but I'm not sure maintainers would like
> it.

OK, perhaps then it is not necessary.

julia

>
> What do you think about it?
>
> Thanks,
>
> Fabio
> >
> > julia
> >
> > > Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> > > ---
> > >
> > >  drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++-----
> > >  1 file changed, 3 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > > b/drivers/gpu/drm/nouveau/dispnv50/disp.c index
> > > 196612addfd6..828f48d5bdd4 100644
> > > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > > @@ -1386,12 +1386,11 @@ 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);
> > > +	drm_dp_check_act_status(&mstm->mgr);
> > >
> > > -	ret = drm_dp_update_payload_part2(&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 +1409,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) {
> > >
> > > --
> > > 2.31.1
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "outreachy-kernel" group. To unsubscribe from this group and
> > > stop receiving emails from it, send an email to
> > > outreachy-kernel+unsubscribe@googlegroups.com. To view this discussion
> > > on the web visit
> > > https://groups.google.com/d/msgid/outreachy-kernel/20210415194423.4880
> > > -1-fmdefrancesco%40gmail.com.
>
>
>
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy kernel] [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables
@ 2021-04-15 21:16       ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-04-15 21:16 UTC (permalink / raw)
  To: Fabio M. De Francesco
  Cc: David Airlie, Daniel Vetter, dri-devel, Melissa Wen,
	outreachy-kernel, Ben Skeggs



On Thu, 15 Apr 2021, Fabio M. De Francesco wrote:

> On Thursday, April 15, 2021 9:57:07 PM CEST Julia Lawall wrote:
> > On Thu, 15 Apr 2021, Fabio M. De Francesco wrote:
> > > Removed two set but unused variables.
> >
> > Would it be useful to use the values?
> >
> It would be useful if one wants to check returns for errors (which are
> signaled by res different than 0).
>
> However most other drm code never checks it (as in drivers/gpu/drm/radeon/
> radeon_dp_mst.c: lines 424 and 453).
>
> Differently, drivers/gpu/drm/i915/display/intel_dp_mst.c does some logging:
>
> ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
>         if (ret) {
>                 drm_dbg_kms(&i915->drm, "failed to update payload %d\n", ret);
>
> I could do like the second example, but I'm not sure maintainers would like
> it.

OK, perhaps then it is not necessary.

julia

>
> What do you think about it?
>
> Thanks,
>
> Fabio
> >
> > julia
> >
> > > Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> > > ---
> > >
> > >  drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++-----
> > >  1 file changed, 3 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > > b/drivers/gpu/drm/nouveau/dispnv50/disp.c index
> > > 196612addfd6..828f48d5bdd4 100644
> > > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > > @@ -1386,12 +1386,11 @@ 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);
> > > +	drm_dp_check_act_status(&mstm->mgr);
> > >
> > > -	ret = drm_dp_update_payload_part2(&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 +1409,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) {
> > >
> > > --
> > > 2.31.1
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "outreachy-kernel" group. To unsubscribe from this group and
> > > stop receiving emails from it, send an email to
> > > outreachy-kernel+unsubscribe@googlegroups.com. To view this discussion
> > > on the web visit
> > > https://groups.google.com/d/msgid/outreachy-kernel/20210415194423.4880
> > > -1-fmdefrancesco%40gmail.com.
>
>
>
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-15 21:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-15 19:44 [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables Fabio M. De Francesco
2021-04-15 19:44 ` Fabio M. De Francesco
2021-04-15 19:57 ` [Outreachy kernel] " Julia Lawall
2021-04-15 19:57   ` Julia Lawall
2021-04-15 20:59   ` Fabio M. De Francesco
2021-04-15 20:59     ` Fabio M. De Francesco
2021-04-15 21:16     ` Julia Lawall
2021-04-15 21:16       ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.