Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1498384

[PATCH] SCSI: remove one useless stack variable

From Ming Lei <tom.leiming@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] SCSI: remove one useless stack variable
Date 2016-10-10 17:30 +0200
Message-ID <sqKGC-2TG-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 drivers/scsi/scsi_scan.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index bb9b58e21d95..6f7128f49c30 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -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
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] SCSI: remove one useless stack variable Ming Lei <tom.leiming@gmail.com> - 2016-10-10 17:30 +0200
  Re: [PATCH] SCSI: remove one useless stack variable Christoph Hellwig <hch@lst.de> - 2016-10-10 19:00 +0200
  Re: [PATCH] SCSI: remove one useless stack variable "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-10-12 01:30 +0200

csiph-web