diff mbox

block/floppy: remove redundant variable dflags

Message ID 20180702074234.10435-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Colin King July 2, 2018, 7:42 a.m. UTC
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(-)

Comments

Jens Axboe July 2, 2018, 2:27 p.m. UTC | #1
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.
diff mbox

Patch

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();