aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/in2000.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/in2000.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/in2000.c')
-rw-r--r--drivers/scsi/in2000.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
index ddf0694d87f0..a73395e10f64 100644
--- a/drivers/scsi/in2000.c
+++ b/drivers/scsi/in2000.c
@@ -2226,36 +2226,36 @@ static int in2000_show_info(struct seq_file *m, struct Scsi_Host *instance)
2226 2226
2227 if (hd->proc & PR_INFO) { 2227 if (hd->proc & PR_INFO) {
2228 seq_printf(m, "\ndip_switch=%02x: irq=%d io=%02x floppy=%s sync/DOS5=%s", (hd->dip_switch & 0x7f), instance->irq, hd->io_base, (hd->dip_switch & 0x40) ? "Yes" : "No", (hd->dip_switch & 0x20) ? "Yes" : "No"); 2228 seq_printf(m, "\ndip_switch=%02x: irq=%d io=%02x floppy=%s sync/DOS5=%s", (hd->dip_switch & 0x7f), instance->irq, hd->io_base, (hd->dip_switch & 0x40) ? "Yes" : "No", (hd->dip_switch & 0x20) ? "Yes" : "No");
2229 seq_printf(m, "\nsync_xfer[] = "); 2229 seq_puts(m, "\nsync_xfer[] = ");
2230 for (x = 0; x < 7; x++) 2230 for (x = 0; x < 7; x++)
2231 seq_printf(m, "\t%02x", hd->sync_xfer[x]); 2231 seq_printf(m, "\t%02x", hd->sync_xfer[x]);
2232 seq_printf(m, "\nsync_stat[] = "); 2232 seq_puts(m, "\nsync_stat[] = ");
2233 for (x = 0; x < 7; x++) 2233 for (x = 0; x < 7; x++)
2234 seq_printf(m, "\t%02x", hd->sync_stat[x]); 2234 seq_printf(m, "\t%02x", hd->sync_stat[x]);
2235 } 2235 }
2236#ifdef PROC_STATISTICS 2236#ifdef PROC_STATISTICS
2237 if (hd->proc & PR_STATISTICS) { 2237 if (hd->proc & PR_STATISTICS) {
2238 seq_printf(m, "\ncommands issued: "); 2238 seq_puts(m, "\ncommands issued: ");
2239 for (x = 0; x < 7; x++) 2239 for (x = 0; x < 7; x++)
2240 seq_printf(m, "\t%ld", hd->cmd_cnt[x]); 2240 seq_printf(m, "\t%ld", hd->cmd_cnt[x]);
2241 seq_printf(m, "\ndisconnects allowed:"); 2241 seq_puts(m, "\ndisconnects allowed:");
2242 for (x = 0; x < 7; x++) 2242 for (x = 0; x < 7; x++)
2243 seq_printf(m, "\t%ld", hd->disc_allowed_cnt[x]); 2243 seq_printf(m, "\t%ld", hd->disc_allowed_cnt[x]);
2244 seq_printf(m, "\ndisconnects done: "); 2244 seq_puts(m, "\ndisconnects done: ");
2245 for (x = 0; x < 7; x++) 2245 for (x = 0; x < 7; x++)
2246 seq_printf(m, "\t%ld", hd->disc_done_cnt[x]); 2246 seq_printf(m, "\t%ld", hd->disc_done_cnt[x]);
2247 seq_printf(m, "\ninterrupts: \t%ld", hd->int_cnt); 2247 seq_printf(m, "\ninterrupts: \t%ld", hd->int_cnt);
2248 } 2248 }
2249#endif 2249#endif
2250 if (hd->proc & PR_CONNECTED) { 2250 if (hd->proc & PR_CONNECTED) {
2251 seq_printf(m, "\nconnected: "); 2251 seq_puts(m, "\nconnected: ");
2252 if (hd->connected) { 2252 if (hd->connected) {
2253 cmd = (Scsi_Cmnd *) hd->connected; 2253 cmd = (Scsi_Cmnd *) hd->connected;
2254 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2254 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
2255 } 2255 }
2256 } 2256 }
2257 if (hd->proc & PR_INPUTQ) { 2257 if (hd->proc & PR_INPUTQ) {
2258 seq_printf(m, "\ninput_Q: "); 2258 seq_puts(m, "\ninput_Q: ");
2259 cmd = (Scsi_Cmnd *) hd->input_Q; 2259 cmd = (Scsi_Cmnd *) hd->input_Q;
2260 while (cmd) { 2260 while (cmd) {
2261 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2261 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
@@ -2263,7 +2263,7 @@ static int in2000_show_info(struct seq_file *m, struct Scsi_Host *instance)
2263 } 2263 }
2264 } 2264 }
2265 if (hd->proc & PR_DISCQ) { 2265 if (hd->proc & PR_DISCQ) {
2266 seq_printf(m, "\ndisconnected_Q:"); 2266 seq_puts(m, "\ndisconnected_Q:");
2267 cmd = (Scsi_Cmnd *) hd->disconnected_Q; 2267 cmd = (Scsi_Cmnd *) hd->disconnected_Q;
2268 while (cmd) { 2268 while (cmd) {
2269 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2269 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]);
@@ -2273,7 +2273,7 @@ static int in2000_show_info(struct seq_file *m, struct Scsi_Host *instance)
2273 if (hd->proc & PR_TEST) { 2273 if (hd->proc & PR_TEST) {
2274 ; /* insert your own custom function here */ 2274 ; /* insert your own custom function here */
2275 } 2275 }
2276 seq_printf(m, "\n"); 2276 seq_puts(m, "\n");
2277 spin_unlock_irqrestore(instance->host_lock, flags); 2277 spin_unlock_irqrestore(instance->host_lock, flags);
2278#endif /* PROC_INTERFACE */ 2278#endif /* PROC_INTERFACE */
2279 return 0; 2279 return 0;