diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2014-12-03 00:10:54 +0100 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2015-02-02 09:57:46 -0800 |
commit | f50332ff2574130903356e800913c1a73cc6c1dc (patch) | |
tree | 89f06badf4e0f42bc26f150d89101efde0dea82e /drivers/scsi/scsi_proc.c | |
parent | 3d30079c3a9000504cf71e4e8dd94619070dc4f3 (diff) | |
download | linux-f50332ff2574130903356e800913c1a73cc6c1dc.tar.bz2 |
scsi: print single-character strings with seq_putc
Using seq_putc to print a single character saves at least a strlen()
call and a memory access, and may also give a small .text reduction.
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 581de8fad75d..251598eb3547 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c @@ -191,7 +191,7 @@ static int proc_print_scsidevice(struct device *dev, void *data) if (sdev->vendor[i] >= 0x20) seq_putc(s, sdev->vendor[i]); else - seq_puts(s, " "); + seq_putc(s, ' '); } seq_puts(s, " Model: "); @@ -199,7 +199,7 @@ static int proc_print_scsidevice(struct device *dev, void *data) if (sdev->model[i] >= 0x20) seq_putc(s, sdev->model[i]); else - seq_puts(s, " "); + seq_putc(s, ' '); } seq_puts(s, " Rev: "); @@ -207,10 +207,10 @@ static int proc_print_scsidevice(struct device *dev, void *data) if (sdev->rev[i] >= 0x20) seq_putc(s, sdev->rev[i]); else - seq_puts(s, " "); + seq_putc(s, ' '); } - seq_puts(s, "\n"); + seq_putc(s, '\n'); seq_printf(s, " Type: %s ", scsi_device_type(sdev->type)); seq_printf(s, " ANSI SCSI revision: %02x", @@ -218,7 +218,7 @@ static int proc_print_scsidevice(struct device *dev, void *data) if (sdev->scsi_level == 2) seq_puts(s, " CCS\n"); else - seq_puts(s, "\n"); + seq_putc(s, '\n'); out: return 0; |