Skip to contentSkip to conversation

SCSI: remove one useless stack variable

PATCH Applied Ming Lei 3 participants 3 messages Oct 10, 2016 – Oct 11, 2016 SCSI

lore
Share & tools
lore

Ming Lei

author
#0 lore raw

PATCH 1/1 SCSI: remove one useless stack variable

The local variable of 'devname' in scsi_report_lun_scan() isn't used any more, so remove it.

Cc Christoph Hellwig <[email protected]>
---
 drivers/scsi/scsi_scan.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/scsi/scsi_scan.c +0 -4
index bb9b58e21d95..6f7128f49c30 100644
@@ -1307,7 +1307,6 @@ static void scsi_sequential_lun_scan(struct scsi_target *starget,
 static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
 				enum scsi_scan_mode rescan)
 {
-	char devname[64];
 	unsigned char scsi_cmd[MAX_COMMAND_SIZE];
 	unsigned int length;
 	u64 lun;
@@ -1349,9 +1348,6 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
 		}
 	}
 
-	sprintf(devname, "host %d channel %d id %d",
-		shost->host_no, sdev->channel, sdev->id);
-
 	/*
 	 * Allocate enough to hold the header (the same size as one scsi_lun)
 	 * plus the number of luns we are requesting.  511 was the default
Signature · 1 line
2.7.4
#2 lore raw
In reply to Ming Lei
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ming" == Ming Lei <[email protected]> writes:

Ming> The local variable of 'devname' in scsi_report_lun_scan() isn't Ming> used any more, so remove it.

Applied to 4.9/scsi-fixes.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering