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>
This commit is contained in:
Rasmus Villemoes
2014-12-03 00:10:54 +01:00
committed by James Bottomley
父節點 3d30079c3a
當前提交 f50332ff25
共有 15 個文件被更改,包括 45 次插入45 次删除

查看文件

@@ -716,7 +716,7 @@ static void show_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m)
seq_printf(m, "%2d (0x%02x)", command[0], command[0]);
for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i)
seq_printf(m, " %02x", command[i]);
seq_puts(m, "\n");
seq_putc(m, '\n');
}
static int __maybe_unused NCR5380_show_info(struct seq_file *m,