All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Prabhakar <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH] usb: renesas_usbhs: Fix unused variable warning
Date: Wed, 22 Dec 2021 07:10:44 +0100	[thread overview]
Message-ID: <YcLBZBwIZkhhKxGD@kroah.com> (raw)
In-Reply-To: <20211221171532.29881-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

On Tue, Dec 21, 2021 at 05:15:32PM +0000, Lad Prabhakar wrote:
> This patch fixes the below warning:
> 
> drivers/usb/renesas_usbhs/mod.c: In function 'usbhs_status_get_each_irq':
> drivers/usb/renesas_usbhs/mod.c:195:13: warning: variable 'intenb0'
> set but not used [-Wunused-but-set-variable]
>   195 |         u16 intenb0, intenb1;
>       |
> 
> Fixes: 33e4245ee919 ("usb: renesas_usbhs: Use platform_get_irq() to get the interrupt")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
>  drivers/usb/renesas_usbhs/mod.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c
> index f2ea3e1412d2..3919e350b487 100644
> --- a/drivers/usb/renesas_usbhs/mod.c
> +++ b/drivers/usb/renesas_usbhs/mod.c
> @@ -192,13 +192,12 @@ static int usbhs_status_get_each_irq(struct usbhs_priv *priv,
>  				     struct usbhs_irq_state *state)
>  {
>  	struct usbhs_mod *mod = usbhs_mod_get_current(priv);
> -	u16 intenb0, intenb1;
>  	unsigned long flags;
> +	u16 intenb1;
>  
>  	/********************  spin lock ********************/
>  	usbhs_lock(priv, flags);
>  	state->intsts0 = usbhs_read(priv, INTSTS0);
> -	intenb0 = usbhs_read(priv, INTENB0);

Did you just break the hardware?  Reading is often times needed and
clang has no idea about hardware issues.  We need proof in the changlog
that this really is safe to do.

How did you test your change?

thanks,

greg k-h

  reply	other threads:[~2021-12-22  6:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 17:15 [PATCH] usb: renesas_usbhs: Fix unused variable warning Lad Prabhakar
2021-12-22  6:10 ` Greg Kroah-Hartman [this message]
2021-12-22  9:01   ` Lad, Prabhakar
2021-12-22  9:25     ` Greg Kroah-Hartman

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=YcLBZBwIZkhhKxGD@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    /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.