* [PATCH] SCSI: remove one useless stack variable
@ 2016-10-10 15:25 Ming Lei
2016-10-10 16:51 ` Christoph Hellwig
2016-10-11 22:02 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Ming Lei @ 2016-10-10 15:25 UTC (permalink / raw)
To: linux-kernel
Cc: Ming Lei, Christoph Hellwig, James E.J. Bottomley,
Martin K. Petersen, open list:SCSI SUBSYSTEM
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] SCSI: remove one useless stack variable
2016-10-10 15:25 [PATCH] SCSI: remove one useless stack variable Ming Lei
@ 2016-10-10 16:51 ` Christoph Hellwig
2016-10-11 22:02 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-10-10 16:51 UTC (permalink / raw)
To: Ming Lei
Cc: linux-kernel, Christoph Hellwig, James E.J. Bottomley,
Martin K. Petersen, open list:SCSI SUBSYSTEM
On Mon, Oct 10, 2016 at 11:25:33PM +0800, Ming Lei wrote:
> The local variable of 'devname' in scsi_report_lun_scan()
> isn't used any more, so remove it.
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SCSI: remove one useless stack variable
2016-10-10 15:25 [PATCH] SCSI: remove one useless stack variable Ming Lei
2016-10-10 16:51 ` Christoph Hellwig
@ 2016-10-11 22:02 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-10-11 22:02 UTC (permalink / raw)
To: Ming Lei
Cc: linux-kernel, Christoph Hellwig, James E.J. Bottomley,
Martin K. Petersen, open list:SCSI SUBSYSTEM
>>>>> "Ming" == Ming Lei <tom.leiming@gmail.com> 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.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-11 23:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-10 15:25 [PATCH] SCSI: remove one useless stack variable Ming Lei
2016-10-10 16:51 ` Christoph Hellwig
2016-10-11 22:02 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).