summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/wd33c93.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/wd33c93.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/wd33c93.c')
-rw-r--r--drivers/scsi/wd33c93.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index c0506de4f3b6..6e041a782d21 100644
--- a/drivers/scsi/wd33c93.c
+++ b/drivers/scsi/wd33c93.c
@@ -2143,22 +2143,22 @@ wd33c93_show_info(struct seq_file *m, struct Scsi_Host *instance)
2143 seq_printf(m, "\nclock_freq=%02x no_sync=%02x no_dma=%d" 2143 seq_printf(m, "\nclock_freq=%02x no_sync=%02x no_dma=%d"
2144 " dma_mode=%02x fast=%d", 2144 " dma_mode=%02x fast=%d",
2145 hd->clock_freq, hd->no_sync, hd->no_dma, hd->dma_mode, hd->fast); 2145 hd->clock_freq, hd->no_sync, hd->no_dma, hd->dma_mode, hd->fast);
2146 seq_printf(m, "\nsync_xfer[] = "); 2146 seq_puts(m, "\nsync_xfer[] = ");
2147 for (x = 0; x < 7; x++) 2147 for (x = 0; x < 7; x++)
2148 seq_printf(m, "\t%02x", hd->sync_xfer[x]); 2148 seq_printf(m, "\t%02x", hd->sync_xfer[x]);
2149 seq_printf(m, "\nsync_stat[] = "); 2149 seq_puts(m, "\nsync_stat[] = ");
2150 for (x = 0; x < 7; x++) 2150 for (x = 0; x < 7; x++)
2151 seq_printf(m, "\t%02x", hd->sync_stat[x]); 2151 seq_printf(m, "\t%02x", hd->sync_stat[x]);
2152 } 2152 }
2153#ifdef PROC_STATISTICS 2153#ifdef PROC_STATISTICS
2154 if (hd->proc & PR_STATISTICS) { 2154 if (hd->proc & PR_STATISTICS) {
2155 seq_printf(m, "\ncommands issued: "); 2155 seq_puts(m, "\ncommands issued: ");
2156 for (x = 0; x < 7; x++) 2156 for (x = 0; x < 7; x++)
2157 seq_printf(m, "\t%ld", hd->cmd_cnt[x]); 2157 seq_printf(m, "\t%ld", hd->cmd_cnt[x]);
2158 seq_printf(m, "\ndisconnects allowed:"); 2158 seq_puts(m, "\ndisconnects allowed:");
2159 for (x = 0; x < 7; x++) 2159 for (x = 0; x < 7; x++)
2160 seq_printf(m, "\t%ld", hd->disc_allowed_cnt[x]); 2160 seq_printf(m, "\t%ld", hd->disc_allowed_cnt[x]);
2161 seq_printf(m, "\ndisconnects done: "); 2161 seq_puts(m, "\ndisconnects done: ");
2162 for (x = 0; x < 7; x++) 2162 for (x = 0; x < 7; x++)
2163 seq_printf(m, "\t%ld", hd->disc_done_cnt[x]); 2163 seq_printf(m, "\t%ld", hd->disc_done_cnt[x]);
2164 seq_printf(m, 2164 seq_printf(m,
@@ -2167,7 +2167,7 @@ wd33c93_show_info(struct seq_file *m, struct Scsi_Host *instance)
2167 } 2167 }
2168#endif 2168#endif
2169 if (hd->proc & PR_CONNECTED) { 2169 if (hd->proc & PR_CONNECTED) {
2170 seq_printf(m, "\nconnected: "); 2170 seq_puts(m, "\nconnected: ");
2171 if (hd->connected) { 2171 if (hd->connected) {
2172 cmd = (struct scsi_cmnd *) hd->connected; 2172 cmd = (struct scsi_cmnd *) hd->connected;
2173 seq_printf(m, " %d:%llu(%02x)", 2173 seq_printf(m, " %d:%llu(%02x)",
@@ -2175,7 +2175,7 @@ wd33c93_show_info(struct seq_file *m, struct Scsi_Host *instance)
2175 } 2175 }
2176 } 2176 }
2177 if (hd->proc & PR_INPUTQ) { 2177 if (hd->proc & PR_INPUTQ) {
2178 seq_printf(m, "\ninput_Q: "); 2178 seq_puts(m, "\ninput_Q: ");
2179 cmd = (struct scsi_cmnd *) hd->input_Q; 2179 cmd = (struct scsi_cmnd *) hd->input_Q;
2180 while (cmd) { 2180 while (cmd) {
2181 seq_printf(m, " %d:%llu(%02x)", 2181 seq_printf(m, " %d:%llu(%02x)",
@@ -2184,7 +2184,7 @@ wd33c93_show_info(struct seq_file *m, struct Scsi_Host *instance)
2184 } 2184 }
2185 } 2185 }
2186 if (hd->proc & PR_DISCQ) { 2186 if (hd->proc & PR_DISCQ) {
2187 seq_printf(m, "\ndisconnected_Q:"); 2187 seq_puts(m, "\ndisconnected_Q:");
2188 cmd = (struct scsi_cmnd *) hd->disconnected_Q; 2188 cmd = (struct scsi_cmnd *) hd->disconnected_Q;
2189 while (cmd) { 2189 while (cmd) {
2190 seq_printf(m, " %d:%llu(%02x)", 2190 seq_printf(m, " %d:%llu(%02x)",
@@ -2192,7 +2192,7 @@ wd33c93_show_info(struct seq_file *m, struct Scsi_Host *instance)
2192 cmd = (struct scsi_cmnd *) cmd->host_scribble; 2192 cmd = (struct scsi_cmnd *) cmd->host_scribble;
2193 } 2193 }
2194 } 2194 }
2195 seq_printf(m, "\n"); 2195 seq_puts(m, "\n");
2196 spin_unlock_irq(&hd->lock); 2196 spin_unlock_irq(&hd->lock);
2197#endif /* PROC_INTERFACE */ 2197#endif /* PROC_INTERFACE */
2198 return 0; 2198 return 0;