aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dc395x.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-12-02 18:10:52 -0500
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 12:57:45 -0500
commit91c40f24faadd977ee9209fee6a760e72a50d19c (patch)
tree970b7a1672e51376b341387609b162a2503ca5c8 /drivers/scsi/dc395x.c
parentee7c7277d9444612c0341588abfb958dffbc5b34 (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/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)
4623 unsigned long flags; 4623 unsigned long flags;
4624 int dev; 4624 int dev;
4625 4625
4626 seq_printf(m, DC395X_BANNER " PCI SCSI Host Adapter\n"); 4626 seq_puts(m, DC395X_BANNER " PCI SCSI Host Adapter\n");
4627 seq_printf(m, " Driver Version " DC395X_VERSION "\n"); 4627 seq_puts(m, " Driver Version " DC395X_VERSION "\n");
4628 4628
4629 DC395x_LOCK_IO(acb->scsi_host, flags); 4629 DC395x_LOCK_IO(acb->scsi_host, flags);
4630 4630
@@ -4655,7 +4655,8 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
4655 acb->dcb_map[11], acb->dcb_map[12], acb->dcb_map[13], 4655 acb->dcb_map[11], acb->dcb_map[12], acb->dcb_map[13],
4656 acb->dcb_map[14], acb->dcb_map[15]); 4656 acb->dcb_map[14], acb->dcb_map[15]);
4657 4657
4658 seq_printf(m, "Un ID LUN Prty Sync Wide DsCn SndS TagQ nego_period SyncFreq SyncOffs MaxCmd\n"); 4658 seq_puts(m,
4659 "Un ID LUN Prty Sync Wide DsCn SndS TagQ nego_period SyncFreq SyncOffs MaxCmd\n");
4659 4660
4660 dev = 0; 4661 dev = 0;
4661 list_for_each_entry(dcb, &acb->dcb_list, list) { 4662 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)
4681 seq_printf(m, " %2i.%1i M %02i ", spd, spd1, 4682 seq_printf(m, " %2i.%1i M %02i ", spd, spd1,
4682 (dcb->sync_offset & 0x0f)); 4683 (dcb->sync_offset & 0x0f));
4683 } else 4684 } else
4684 seq_printf(m, " "); 4685 seq_puts(m, " ");
4685 4686
4686 /* Add more info ... */ 4687 /* Add more info ... */
4687 seq_printf(m, " %02i\n", dcb->max_command); 4688 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)
4689 } 4690 }
4690 4691
4691 if (timer_pending(&acb->waiting_timer)) 4692 if (timer_pending(&acb->waiting_timer))
4692 seq_printf(m, "Waiting queue timer running\n"); 4693 seq_puts(m, "Waiting queue timer running\n");
4693 else 4694 else
4694 seq_printf(m, "\n"); 4695 seq_puts(m, "\n");
4695 4696
4696 list_for_each_entry(dcb, &acb->dcb_list, list) { 4697 list_for_each_entry(dcb, &acb->dcb_list, list) {
4697 struct ScsiReqBlk *srb; 4698 struct ScsiReqBlk *srb;
@@ -4708,7 +4709,7 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
4708 list_for_each_entry(srb, &dcb->srb_going_list, list) 4709 list_for_each_entry(srb, &dcb->srb_going_list, list)
4709 seq_printf(m, " %p", srb->cmd); 4710 seq_printf(m, " %p", srb->cmd);
4710 if (!list_empty(&dcb->srb_waiting_list) || !list_empty(&dcb->srb_going_list)) 4711 if (!list_empty(&dcb->srb_waiting_list) || !list_empty(&dcb->srb_going_list))
4711 seq_printf(m, "\n"); 4712 seq_puts(m, "\n");
4712 } 4713 }
4713 4714
4714 if (debug_enabled(DBG_1)) { 4715 if (debug_enabled(DBG_1)) {
@@ -4716,7 +4717,7 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
4716 list_for_each_entry(dcb, &acb->dcb_list, list) { 4717 list_for_each_entry(dcb, &acb->dcb_list, list) {
4717 seq_printf(m, "%p -> ", dcb); 4718 seq_printf(m, "%p -> ", dcb);
4718 } 4719 }
4719 seq_printf(m, "END\n"); 4720 seq_puts(m, "END\n");
4720 } 4721 }
4721 4722
4722 DC395x_UNLOCK_IO(acb->scsi_host, flags); 4723 DC395x_UNLOCK_IO(acb->scsi_host, flags);