All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: [linux-stable-rc:linux-5.10.y 642/862] drivers/usb/serial/keyspan_pda.c:550:30: warning: variable 'priv' set but not used
Date: Fri, 08 Jan 2021 16:01:51 +0100	[thread overview]
Message-ID: <X/hz301PdhOHhJiG@hovoldconsulting.com> (raw)
In-Reply-To: <202101082251.stzlA1TY-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3203 bytes --]

On Fri, Jan 08, 2021 at 10:35:10PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> head:   208f314c03c52f01c09eaff3018fd704c2f8fbe2
> commit: df2754ae5f0eb7d15d541d837b8e8725d3e56817 [642/862] USB: serial: keyspan_pda: fix write-wakeup use-after-free
> config: mips-randconfig-r026-20210108 (attached as .config)
> compiler: mips64-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=df2754ae5f0eb7d15d541d837b8e8725d3e56817
>         git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
>         git fetch --no-tags linux-stable-rc linux-5.10.y
>         git checkout df2754ae5f0eb7d15d541d837b8e8725d3e56817
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/usb/serial/keyspan_pda.c: In function 'keyspan_pda_write_bulk_callback':
> >> drivers/usb/serial/keyspan_pda.c:550:30: warning: variable 'priv' set but not used [-Wunused-but-set-variable]
>      550 |  struct keyspan_pda_private *priv;
>          |                              ^~~~

Indeed, priv should have been removed by this patch, but it was
mistakingly removed by a follow-on patch in mainline instead.

Greg, I only see this warning with W=1, but here's a patch to silence
the build bots for the stable trees in case you want it.

Johan


>From 62218024401fac7dd7c7a6e74b566164d515d922 Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@kernel.org>
Date: Fri, 8 Jan 2021 15:55:28 +0100
Subject: [PATCH] USB: serial: keyspan_pda: remove unused variable

Remove an unused variable which was mistakingly left by commit
37faf5061541 ("USB: serial: keyspan_pda: fix write-wakeup
use-after-free") and only removed by a later change.

This is needed to suppress a W=1 warning about the unused variable in
the stable trees that the build bots triggers.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/keyspan_pda.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 39ed3ad32365..aec32bf06e01 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -555,10 +555,8 @@ static int keyspan_pda_write(struct tty_struct *tty,
 static void keyspan_pda_write_bulk_callback(struct urb *urb)
 {
 	struct usb_serial_port *port = urb->context;
-	struct keyspan_pda_private *priv;
 
 	set_bit(0, &port->write_urbs_free);
-	priv = usb_get_serial_port_data(port);
 
 	/* queue up a wakeup at scheduler time */
 	usb_serial_port_softint(port);
-- 
2.26.2

      reply	other threads:[~2021-01-08 15:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 14:35 [linux-stable-rc:linux-5.10.y 642/862] drivers/usb/serial/keyspan_pda.c:550:30: warning: variable 'priv' set but not used kernel test robot
2021-01-08 15:01 ` Johan Hovold [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=X/hz301PdhOHhJiG@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=kbuild-all@lists.01.org \
    /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 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.