diff mbox series

[03/42] drm/drm_dp_mst_topology: Remove set but never used variable 'len'

Message ID 20201116174112.1833368-4-lee.jones@linaro.org
State Accepted
Commit 0e120f1b04b5cb7cab05ed30d1f60c6e5ae76e26
Headers show
Series Rid W=1 warnings from GPU (non-Radeon) | expand

Commit Message

Lee Jones Nov. 16, 2020, 5:40 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/drm_dp_mst_topology.c: In function ‘drm_dp_send_query_stream_enc_status’:
 drivers/gpu/drm/drm_dp_mst_topology.c:3263:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Vetter Nov. 17, 2020, 5:29 p.m. UTC | #1
On Mon, Nov 16, 2020 at 05:40:33PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/gpu/drm/drm_dp_mst_topology.c: In function ‘drm_dp_send_query_stream_enc_status’:
>  drivers/gpu/drm/drm_dp_mst_topology.c:3263:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
> 
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Going to apply this, but I noticed that the return value of the
build_query_stream_enc_status() is pointless. Can you pls follow up with
an additional patch to change that to void?

Thanks, Daniel

> ---
>  drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index e875425336406..0401b2f475002 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -3260,7 +3260,7 @@ int drm_dp_send_query_stream_enc_status(struct drm_dp_mst_topology_mgr *mgr,
>  {
>  	struct drm_dp_sideband_msg_tx *txmsg;
>  	u8 nonce[7];
> -	int len, ret;
> +	int ret;
>  
>  	txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL);
>  	if (!txmsg)
> @@ -3281,7 +3281,7 @@ int drm_dp_send_query_stream_enc_status(struct drm_dp_mst_topology_mgr *mgr,
>  	 */
>  	txmsg->dst = mgr->mst_primary;
>  
> -	len = build_query_stream_enc_status(txmsg, port->vcpi.vcpi, nonce);
> +	build_query_stream_enc_status(txmsg, port->vcpi.vcpi, nonce);
>  
>  	drm_dp_queue_down_tx(mgr, txmsg);
>  
> -- 
> 2.25.1
>
Lee Jones Nov. 17, 2020, 6:12 p.m. UTC | #2
On Tue, 17 Nov 2020, Daniel Vetter wrote:

> On Mon, Nov 16, 2020 at 05:40:33PM +0000, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/gpu/drm/drm_dp_mst_topology.c: In function ‘drm_dp_send_query_stream_enc_status’:
> >  drivers/gpu/drm/drm_dp_mst_topology.c:3263:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
> > 
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Maxime Ripard <mripard@kernel.org>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> 
> Going to apply this, but I noticed that the return value of the
> build_query_stream_enc_status() is pointless. Can you pls follow up with
> an additional patch to change that to void?

I can.
Lee Jones Nov. 17, 2020, 6:13 p.m. UTC | #3
On Tue, 17 Nov 2020, Lee Jones wrote:

> On Tue, 17 Nov 2020, Daniel Vetter wrote:
> 
> > On Mon, Nov 16, 2020 at 05:40:33PM +0000, Lee Jones wrote:
> > > Fixes the following W=1 kernel build warning(s):
> > > 
> > >  drivers/gpu/drm/drm_dp_mst_topology.c: In function ‘drm_dp_send_query_stream_enc_status’:
> > >  drivers/gpu/drm/drm_dp_mst_topology.c:3263:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
> > > 
> > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > Cc: Maxime Ripard <mripard@kernel.org>
> > > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > > Cc: David Airlie <airlied@linux.ie>
> > > Cc: Daniel Vetter <daniel@ffwll.ch>
> > > Cc: dri-devel@lists.freedesktop.org
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > 
> > Going to apply this, but I noticed that the return value of the
> > build_query_stream_enc_status() is pointless. Can you pls follow up with
> > an additional patch to change that to void?
> 
> I can.

Looks like you're getting dropped again!
Daniel Vetter Nov. 17, 2020, 7:13 p.m. UTC | #4
On Tue, Nov 17, 2020 at 06:13:40PM +0000, Lee Jones wrote:
> On Tue, 17 Nov 2020, Lee Jones wrote:
> 
> > On Tue, 17 Nov 2020, Daniel Vetter wrote:
> > 
> > > On Mon, Nov 16, 2020 at 05:40:33PM +0000, Lee Jones wrote:
> > > > Fixes the following W=1 kernel build warning(s):
> > > > 
> > > >  drivers/gpu/drm/drm_dp_mst_topology.c: In function ‘drm_dp_send_query_stream_enc_status’:
> > > >  drivers/gpu/drm/drm_dp_mst_topology.c:3263:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
> > > > 
> > > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > > Cc: Maxime Ripard <mripard@kernel.org>
> > > > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > > > Cc: David Airlie <airlied@linux.ie>
> > > > Cc: Daniel Vetter <daniel@ffwll.ch>
> > > > Cc: dri-devel@lists.freedesktop.org
> > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > 
> > > Going to apply this, but I noticed that the return value of the
> > > build_query_stream_enc_status() is pointless. Can you pls follow up with
> > > an additional patch to change that to void?
> > 
> > I can.
> 
> Looks like you're getting dropped again!

I get it on list. So not lost.

tbh my personal cc: is such a disastrous mess it's actually easier to ping
me with an interesting subject on dri-devel here ...
-Daniel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index e875425336406..0401b2f475002 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3260,7 +3260,7 @@  int drm_dp_send_query_stream_enc_status(struct drm_dp_mst_topology_mgr *mgr,
 {
 	struct drm_dp_sideband_msg_tx *txmsg;
 	u8 nonce[7];
-	int len, ret;
+	int ret;
 
 	txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL);
 	if (!txmsg)
@@ -3281,7 +3281,7 @@  int drm_dp_send_query_stream_enc_status(struct drm_dp_mst_topology_mgr *mgr,
 	 */
 	txmsg->dst = mgr->mst_primary;
 
-	len = build_query_stream_enc_status(txmsg, port->vcpi.vcpi, nonce);
+	build_query_stream_enc_status(txmsg, port->vcpi.vcpi, nonce);
 
 	drm_dp_queue_down_tx(mgr, txmsg);