diff mbox series

st: remove redundant pointer STbuffer

Message ID 20180803104752.17081-1-colin.king@canonical.com (mailing list archive)
State Accepted
Headers show
Series st: remove redundant pointer STbuffer | expand

Commit Message

Colin King Aug. 3, 2018, 10:47 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer STbuffer is being assigned but is never used hence it is
redundant and can be removed.

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

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

Comments

Kai Mäkisara Aug. 5, 2018, 9:14 a.m. UTC | #1
> On 3 Aug 2018, at 13.47, Colin King <colin.king@canonical.com> wrote:
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer STbuffer is being assigned but is never used hence it is
> redundant and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'STbuffer' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi>

Has been unused at least since 2005 :-)

Thanks,
Kai
Martin K. Petersen Aug. 9, 2018, 1:16 a.m. UTC | #2
Colin,

> Pointer STbuffer is being assigned but is never used hence it is
> redundant and can be removed.
>
> Cleans up clang warning:
> warning: variable 'STbuffer' set but not used [-Wunused-but-set-variable]

Applied to 4.19/scsi-queue, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 50c66ccc4b41..307df2fa39a3 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -828,11 +828,8 @@  static int st_flush_write_buffer(struct scsi_tape * STp)
 static int flush_buffer(struct scsi_tape *STp, int seek_next)
 {
 	int backspace, result;
-	struct st_buffer *STbuffer;
 	struct st_partstat *STps;
 
-	STbuffer = STp->buffer;
-
 	/*
 	 * If there was a bus reset, block further access
 	 * to this device.