summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_proc.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-12-03 00:10:52 +0100
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 09:57:45 -0800
commit91c40f24faadd977ee9209fee6a760e72a50d19c (patch)
tree970b7a1672e51376b341387609b162a2503ca5c8 /drivers/scsi/scsi_proc.c
parentee7c7277d9444612c0341588abfb958dffbc5b34 (diff)
downloadlinux-91c40f24faadd977ee9209fee6a760e72a50d19c.tar.bz2
scsi: replace seq_printf with seq_puts
Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/scsi_proc.c')
-rw-r--r--drivers/scsi/scsi_proc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 6fcefa2da503..581de8fad75d 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -189,36 +189,36 @@ static int proc_print_scsidevice(struct device *dev, void *data)
sdev->host->host_no, sdev->channel, sdev->id, sdev->lun);
for (i = 0; i < 8; i++) {
if (sdev->vendor[i] >= 0x20)
- seq_printf(s, "%c", sdev->vendor[i]);
+ seq_putc(s, sdev->vendor[i]);
else
- seq_printf(s, " ");
+ seq_puts(s, " ");
}
- seq_printf(s, " Model: ");
+ seq_puts(s, " Model: ");
for (i = 0; i < 16; i++) {
if (sdev->model[i] >= 0x20)
- seq_printf(s, "%c", sdev->model[i]);
+ seq_putc(s, sdev->model[i]);
else
- seq_printf(s, " ");
+ seq_puts(s, " ");
}
- seq_printf(s, " Rev: ");
+ seq_puts(s, " Rev: ");
for (i = 0; i < 4; i++) {
if (sdev->rev[i] >= 0x20)
- seq_printf(s, "%c", sdev->rev[i]);
+ seq_putc(s, sdev->rev[i]);
else
- seq_printf(s, " ");
+ seq_puts(s, " ");
}
- seq_printf(s, "\n");
+ seq_puts(s, "\n");
seq_printf(s, " Type: %s ", scsi_device_type(sdev->type));
seq_printf(s, " ANSI SCSI revision: %02x",
sdev->scsi_level - (sdev->scsi_level > 1));
if (sdev->scsi_level == 2)
- seq_printf(s, " CCS\n");
+ seq_puts(s, " CCS\n");
else
- seq_printf(s, "\n");
+ seq_puts(s, "\n");
out:
return 0;