mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] block/floppy: remove redundant variable dflags
@ 2018-07-02  7:42 Colin King
  2018-07-02 14:27 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-02  7:42 UTC (permalink / raw)
  To: Jiri Kosina, Jens Axboe, linux-block; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable dflags is being assigned but is never used hence it is redundant
and can be removed.

Cleans up clang warning:
warning: variable 'dflags' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/block/floppy.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 8871b5044d9e..48f622728ce6 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -1461,7 +1461,6 @@ static void setup_rw_floppy(void)
 	int i;
 	int r;
 	int flags;
-	int dflags;
 	unsigned long ready_date;
 	void (*function)(void);
 
@@ -1485,8 +1484,6 @@ static void setup_rw_floppy(void)
 		if (fd_wait_for_completion(ready_date, function))
 			return;
 	}
-	dflags = DRS->flags;
-
 	if ((flags & FD_RAW_READ) || (flags & FD_RAW_WRITE))
 		setup_DMA();
 
-- 
2.17.1


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

* Re: [PATCH] block/floppy: remove redundant variable dflags
  2018-07-02  7:42 [PATCH] block/floppy: remove redundant variable dflags Colin King
@ 2018-07-02 14:27 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-07-02 14:27 UTC (permalink / raw)
  To: Colin King, Jiri Kosina, linux-block; +Cc: kernel-janitors, linux-kernel

On 7/2/18 1:42 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable dflags is being assigned but is never used hence it is redundant
> and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'dflags' set but not used [-Wunused-but-set-variable]

Applied for 4.19, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2018-07-02 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02  7:42 [PATCH] block/floppy: remove redundant variable dflags Colin King
2018-07-02 14:27 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®