linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memstick: r592: remove unused variable
@ 2021-04-14  2:21 Jiapeng Chong
  2021-04-15 12:02 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-04-14  2:21 UTC (permalink / raw)
  To: maximlevitsky; +Cc: oakad, ulf.hansson, linux-mmc, linux-kernel, Jiapeng Chong

Fix the following clang warning:

drivers/memstick/host/r592.c:363:6: warning: variable ‘len’ set but not
used [-Wunused-but-set-variable].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/memstick/host/r592.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
index d2ef463..026fada 100644
--- a/drivers/memstick/host/r592.c
+++ b/drivers/memstick/host/r592.c
@@ -360,12 +360,11 @@ static void r592_write_fifo_pio(struct r592_device *dev,
 static void r592_flush_fifo_write(struct r592_device *dev)
 {
 	u8 buffer[4] = { 0 };
-	int len;
 
 	if (kfifo_is_empty(&dev->pio_fifo))
 		return;
 
-	len = kfifo_out(&dev->pio_fifo, buffer, 4);
+	kfifo_out(&dev->pio_fifo, buffer, 4);
 	r592_write_reg_raw_be(dev, R592_FIFO_PIO, *(u32 *)buffer);
 }
 
-- 
1.8.3.1


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

* Re: [PATCH] memstick: r592: remove unused variable
  2021-04-14  2:21 [PATCH] memstick: r592: remove unused variable Jiapeng Chong
@ 2021-04-15 12:02 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2021-04-15 12:02 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: Maxim Levitsky, Alex Dubov, linux-mmc, Linux Kernel Mailing List

On Wed, 14 Apr 2021 at 04:21, Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Fix the following clang warning:
>
> drivers/memstick/host/r592.c:363:6: warning: variable ‘len’ set but not
> used [-Wunused-but-set-variable].
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/memstick/host/r592.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
> index d2ef463..026fada 100644
> --- a/drivers/memstick/host/r592.c
> +++ b/drivers/memstick/host/r592.c
> @@ -360,12 +360,11 @@ static void r592_write_fifo_pio(struct r592_device *dev,
>  static void r592_flush_fifo_write(struct r592_device *dev)
>  {
>         u8 buffer[4] = { 0 };
> -       int len;
>
>         if (kfifo_is_empty(&dev->pio_fifo))
>                 return;
>
> -       len = kfifo_out(&dev->pio_fifo, buffer, 4);
> +       kfifo_out(&dev->pio_fifo, buffer, 4);
>         r592_write_reg_raw_be(dev, R592_FIFO_PIO, *(u32 *)buffer);
>  }
>
> --
> 1.8.3.1
>

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14  2:21 [PATCH] memstick: r592: remove unused variable Jiapeng Chong
2021-04-15 12:02 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).