summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dc395x.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-12-03 00:10:52 +0100
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 09:57:45 -0800
commit91c40f24faadd977ee9209fee6a760e72a50d19c (patch)
tree970b7a1672e51376b341387609b162a2503ca5c8 /drivers/scsi/dc395x.c
parentee7c7277d9444612c0341588abfb958dffbc5b34 (diff)
downloadlinux-91c40f24faadd977ee9209fee6a760e72a50d19c.tar.bz2
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/dc395x.c')
-rw-r--r--drivers/scsi/dc395x.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 0a1ed50ff8bb..3a55ea24aa0b 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -4623,8 +4623,8 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
unsigned long flags;
int dev;
- seq_printf(m, DC395X_BANNER " PCI SCSI Host Adapter\n");
- seq_printf(m, " Driver Version " DC395X_VERSION "\n");
+ seq_puts(m, DC395X_BANNER " PCI SCSI Host Adapter\n");
+ seq_puts(m, " Driver Version " DC395X_VERSION "\n");
DC395x_LOCK_IO(acb->scsi_host, flags);
@@ -4655,7 +4655,8 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
acb->dcb_map[11], acb->dcb_map[12], acb->dcb_map[13],
acb->dcb_map[14], acb->dcb_map[15]);
- seq_printf(m, "Un ID LUN Prty Sync Wide DsCn SndS TagQ nego_period SyncFreq SyncOffs MaxCmd\n");
+ seq_puts(m,
+ "Un ID LUN Prty Sync Wide DsCn SndS TagQ nego_period SyncFreq SyncOffs MaxCmd\n");
dev = 0;
list_for_each_entry(dcb, &acb->dcb_list, list) {
@@ -4681,7 +4682,7 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
seq_printf(m, " %2i.%1i M %02i ", spd, spd1,
(dcb->sync_offset & 0x0f));
} else
- seq_printf(m, " ");
+ seq_puts(m, " ");
/* Add more info ... */
seq_printf(m, " %02i\n", dcb->max_command);
@@ -4689,9 +4690,9 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
}
if (timer_pending(&acb->waiting_timer))
- seq_printf(m, "Waiting queue timer running\n");
+ seq_puts(m, "Waiting queue timer running\n");
else
- seq_printf(m, "\n");
+ seq_puts(m, "\n");
list_for_each_entry(dcb, &acb->dcb_list, list) {
struct ScsiReqBlk *srb;
@@ -4708,7 +4709,7 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
list_for_each_entry(srb, &dcb->srb_going_list, list)
seq_printf(m, " %p", srb->cmd);
if (!list_empty(&dcb->srb_waiting_list) || !list_empty(&dcb->srb_going_list))
- seq_printf(m, "\n");
+ seq_puts(m, "\n");
}
if (debug_enabled(DBG_1)) {
@@ -4716,7 +4717,7 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
list_for_each_entry(dcb, &acb->dcb_list, list) {
seq_printf(m, "%p -> ", dcb);
}
- seq_printf(m, "END\n");
+ seq_puts(m, "END\n");
}
DC395x_UNLOCK_IO(acb->scsi_host, flags);