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/nsp32.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/nsp32.c')
-rw-r--r-- | drivers/scsi/nsp32.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 3e775517628d..8f6b1b4c6138 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
@@ -1456,7 +1456,7 @@ static int nsp32_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1456 | data = (nsp32_hw_data *)host->hostdata; | 1456 | data = (nsp32_hw_data *)host->hostdata; |
1457 | base = host->io_port; | 1457 | base = host->io_port; |
1458 | 1458 | ||
1459 | seq_printf(m, "NinjaSCSI-32 status\n\n"); | 1459 | seq_puts(m, "NinjaSCSI-32 status\n\n"); |
1460 | seq_printf(m, "Driver version: %s, $Revision: 1.33 $\n", nsp32_release_version); | 1460 | seq_printf(m, "Driver version: %s, $Revision: 1.33 $\n", nsp32_release_version); |
1461 | seq_printf(m, "SCSI host No.: %d\n", hostno); | 1461 | seq_printf(m, "SCSI host No.: %d\n", hostno); |
1462 | seq_printf(m, "IRQ: %d\n", host->irq); | 1462 | seq_printf(m, "IRQ: %d\n", host->irq); |
@@ -1478,25 +1478,25 @@ static int nsp32_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1478 | spin_unlock_irqrestore(&(data->Lock), flags); | 1478 | spin_unlock_irqrestore(&(data->Lock), flags); |
1479 | 1479 | ||
1480 | 1480 | ||
1481 | seq_printf(m, "SDTR status\n"); | 1481 | seq_puts(m, "SDTR status\n"); |
1482 | for (id = 0; id < ARRAY_SIZE(data->target); id++) { | 1482 | for (id = 0; id < ARRAY_SIZE(data->target); id++) { |
1483 | 1483 | ||
1484 | seq_printf(m, "id %d: ", id); | 1484 | seq_printf(m, "id %d: ", id); |
1485 | 1485 | ||
1486 | if (id == host->this_id) { | 1486 | if (id == host->this_id) { |
1487 | seq_printf(m, "----- NinjaSCSI-32 host adapter\n"); | 1487 | seq_puts(m, "----- NinjaSCSI-32 host adapter\n"); |
1488 | continue; | 1488 | continue; |
1489 | } | 1489 | } |
1490 | 1490 | ||
1491 | if (data->target[id].sync_flag == SDTR_DONE) { | 1491 | if (data->target[id].sync_flag == SDTR_DONE) { |
1492 | if (data->target[id].period == 0 && | 1492 | if (data->target[id].period == 0 && |
1493 | data->target[id].offset == ASYNC_OFFSET ) { | 1493 | data->target[id].offset == ASYNC_OFFSET ) { |
1494 | seq_printf(m, "async"); | 1494 | seq_puts(m, "async"); |
1495 | } else { | 1495 | } else { |
1496 | seq_printf(m, " sync"); | 1496 | seq_puts(m, " sync"); |
1497 | } | 1497 | } |
1498 | } else { | 1498 | } else { |
1499 | seq_printf(m, " none"); | 1499 | seq_puts(m, " none"); |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | if (data->target[id].period != 0) { | 1502 | if (data->target[id].period != 0) { |
@@ -1509,7 +1509,7 @@ static int nsp32_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1509 | data->target[id].offset | 1509 | data->target[id].offset |
1510 | ); | 1510 | ); |
1511 | } | 1511 | } |
1512 | seq_printf(m, "\n"); | 1512 | seq_puts(m, "\n"); |
1513 | } | 1513 | } |
1514 | return 0; | 1514 | return 0; |
1515 | } | 1515 | } |