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:

committed by
James Bottomley

父節點
3d30079c3a
當前提交
f50332ff25
@@ -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,
|
||||
|
Reference in New Issue
Block a user