diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2014-12-02 18:10:52 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2015-02-02 12:57:45 -0500 |
commit | 91c40f24faadd977ee9209fee6a760e72a50d19c (patch) | |
tree | 970b7a1672e51376b341387609b162a2503ca5c8 /drivers/scsi/wd7000.c | |
parent | ee7c7277d9444612c0341588abfb958dffbc5b34 (diff) |
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/wd7000.c')
-rw-r--r-- | drivers/scsi/wd7000.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index 2d7c62f3a7cc..0c0f17b9a3eb 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c | |||
@@ -1330,9 +1330,9 @@ static int wd7000_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1330 | icmbs = adapter->mb.icmb; | 1330 | icmbs = adapter->mb.icmb; |
1331 | 1331 | ||
1332 | seq_printf(m, "\nControl port value: 0x%x\n", adapter->control); | 1332 | seq_printf(m, "\nControl port value: 0x%x\n", adapter->control); |
1333 | seq_printf(m, "Incoming mailbox:\n"); | 1333 | seq_puts(m, "Incoming mailbox:\n"); |
1334 | seq_printf(m, " size: %d\n", ICMB_CNT); | 1334 | seq_printf(m, " size: %d\n", ICMB_CNT); |
1335 | seq_printf(m, " queued messages: "); | 1335 | seq_puts(m, " queued messages: "); |
1336 | 1336 | ||
1337 | for (i = count = 0; i < ICMB_CNT; i++) | 1337 | for (i = count = 0; i < ICMB_CNT; i++) |
1338 | if (icmbs[i].status) { | 1338 | if (icmbs[i].status) { |
@@ -1340,12 +1340,12 @@ static int wd7000_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1340 | seq_printf(m, "0x%x ", i); | 1340 | seq_printf(m, "0x%x ", i); |
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | seq_printf(m, count ? "\n" : "none\n"); | 1343 | seq_puts(m, count ? "\n" : "none\n"); |
1344 | 1344 | ||
1345 | seq_printf(m, "Outgoing mailbox:\n"); | 1345 | seq_puts(m, "Outgoing mailbox:\n"); |
1346 | seq_printf(m, " size: %d\n", OGMB_CNT); | 1346 | seq_printf(m, " size: %d\n", OGMB_CNT); |
1347 | seq_printf(m, " next message: 0x%x\n", adapter->next_ogmb); | 1347 | seq_printf(m, " next message: 0x%x\n", adapter->next_ogmb); |
1348 | seq_printf(m, " queued messages: "); | 1348 | seq_puts(m, " queued messages: "); |
1349 | 1349 | ||
1350 | for (i = count = 0; i < OGMB_CNT; i++) | 1350 | for (i = count = 0; i < OGMB_CNT; i++) |
1351 | if (ogmbs[i].status) { | 1351 | if (ogmbs[i].status) { |
@@ -1353,7 +1353,7 @@ static int wd7000_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1353 | seq_printf(m, "0x%x ", i); | 1353 | seq_printf(m, "0x%x ", i); |
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | seq_printf(m, count ? "\n" : "none\n"); | 1356 | seq_puts(m, count ? "\n" : "none\n"); |
1357 | #endif | 1357 | #endif |
1358 | 1358 | ||
1359 | spin_unlock_irqrestore(host->host_lock, flags); | 1359 | spin_unlock_irqrestore(host->host_lock, flags); |