diff mbox series

[-next] floppy: remove set but not used variable 'q'

Message ID 20190218084232.193878-1-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] floppy: remove set but not used variable 'q' | expand

Commit Message

Yue Haibing Feb. 18, 2019, 8:42 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/block/floppy.c: In function 'request_done':
drivers/block/floppy.c:2233:24: warning:
 variable 'q' set but not used [-Wunused-but-set-variable]

It's never used and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/block/floppy.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jiri Kosina Feb. 19, 2019, 9:01 a.m. UTC | #1
On Mon, 18 Feb 2019, YueHaibing wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/block/floppy.c: In function 'request_done':
> drivers/block/floppy.c:2233:24: warning:
>  variable 'q' set but not used [-Wunused-but-set-variable]
> 
> It's never used and can be removed.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Jiri Kosina <jkosina@suse.cz>

Jens, could you please take this through your tree?

Thanks.
Jens Axboe Feb. 28, 2019, 9:06 p.m. UTC | #2
On 2/18/19 1:42 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/block/floppy.c: In function 'request_done':
> drivers/block/floppy.c:2233:24: warning:
>  variable 'q' set but not used [-Wunused-but-set-variable]
> 
> It's never used and can be removed.

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 55481b40df9a..95f608d1a098 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -2230,7 +2230,6 @@  static void floppy_end_request(struct request *req, blk_status_t error)
 static void request_done(int uptodate)
 {
 	struct request *req = current_req;
-	struct request_queue *q;
 	int block;
 	char msg[sizeof("request done ") + sizeof(int) * 3];
 
@@ -2243,8 +2242,6 @@  static void request_done(int uptodate)
 		return;
 	}
 
-	q = req->q;
-
 	if (uptodate) {
 		/* maintain values for invalidation on geometry
 		 * change */