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/gdth_proc.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/gdth_proc.c')
-rw-r--r-- | drivers/scsi/gdth_proc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c index 9fb632684863..e66e997992e3 100644 --- a/drivers/scsi/gdth_proc.c +++ b/drivers/scsi/gdth_proc.c | |||
@@ -173,7 +173,7 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
173 | /* request is i.e. "cat /proc/scsi/gdth/0" */ | 173 | /* request is i.e. "cat /proc/scsi/gdth/0" */ |
174 | /* format: %-15s\t%-10s\t%-15s\t%s */ | 174 | /* format: %-15s\t%-10s\t%-15s\t%s */ |
175 | /* driver parameters */ | 175 | /* driver parameters */ |
176 | seq_printf(m, "Driver Parameters:\n"); | 176 | seq_puts(m, "Driver Parameters:\n"); |
177 | if (reserve_list[0] == 0xff) | 177 | if (reserve_list[0] == 0xff) |
178 | strcpy(hrec, "--"); | 178 | strcpy(hrec, "--"); |
179 | else { | 179 | else { |
@@ -192,7 +192,7 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
192 | max_ids, hdr_channel); | 192 | max_ids, hdr_channel); |
193 | 193 | ||
194 | /* controller information */ | 194 | /* controller information */ |
195 | seq_printf(m,"\nDisk Array Controller Information:\n"); | 195 | seq_puts(m, "\nDisk Array Controller Information:\n"); |
196 | seq_printf(m, | 196 | seq_printf(m, |
197 | " Number: \t%d \tName: \t%s\n", | 197 | " Number: \t%d \tName: \t%s\n", |
198 | ha->hanum, ha->binfo.type_string); | 198 | ha->hanum, ha->binfo.type_string); |
@@ -219,7 +219,7 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
219 | 219 | ||
220 | #ifdef GDTH_DMA_STATISTICS | 220 | #ifdef GDTH_DMA_STATISTICS |
221 | /* controller statistics */ | 221 | /* controller statistics */ |
222 | seq_printf(m,"\nController Statistics:\n"); | 222 | seq_puts(m, "\nController Statistics:\n"); |
223 | seq_printf(m, | 223 | seq_printf(m, |
224 | " 32-bit DMA buffer:\t%lu\t64-bit DMA buffer:\t%lu\n", | 224 | " 32-bit DMA buffer:\t%lu\t64-bit DMA buffer:\t%lu\n", |
225 | ha->dma32_cnt, ha->dma64_cnt); | 225 | ha->dma32_cnt, ha->dma64_cnt); |
@@ -227,7 +227,7 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
227 | 227 | ||
228 | if (ha->more_proc) { | 228 | if (ha->more_proc) { |
229 | /* more information: 2. about physical devices */ | 229 | /* more information: 2. about physical devices */ |
230 | seq_printf(m, "\nPhysical Devices:"); | 230 | seq_puts(m, "\nPhysical Devices:"); |
231 | flag = FALSE; | 231 | flag = FALSE; |
232 | 232 | ||
233 | buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); | 233 | buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); |
@@ -326,10 +326,10 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
326 | gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); | 326 | gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); |
327 | 327 | ||
328 | if (!flag) | 328 | if (!flag) |
329 | seq_printf(m, "\n --\n"); | 329 | seq_puts(m, "\n --\n"); |
330 | 330 | ||
331 | /* 3. about logical drives */ | 331 | /* 3. about logical drives */ |
332 | seq_printf(m,"\nLogical Drives:"); | 332 | seq_puts(m, "\nLogical Drives:"); |
333 | flag = FALSE; | 333 | flag = FALSE; |
334 | 334 | ||
335 | buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); | 335 | buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); |
@@ -411,10 +411,10 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
411 | gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); | 411 | gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); |
412 | 412 | ||
413 | if (!flag) | 413 | if (!flag) |
414 | seq_printf(m, "\n --\n"); | 414 | seq_puts(m, "\n --\n"); |
415 | 415 | ||
416 | /* 4. about array drives */ | 416 | /* 4. about array drives */ |
417 | seq_printf(m,"\nArray Drives:"); | 417 | seq_puts(m, "\nArray Drives:"); |
418 | flag = FALSE; | 418 | flag = FALSE; |
419 | 419 | ||
420 | buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); | 420 | buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); |
@@ -471,10 +471,10 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
471 | gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); | 471 | gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); |
472 | 472 | ||
473 | if (!flag) | 473 | if (!flag) |
474 | seq_printf(m, "\n --\n"); | 474 | seq_puts(m, "\n --\n"); |
475 | 475 | ||
476 | /* 5. about host drives */ | 476 | /* 5. about host drives */ |
477 | seq_printf(m,"\nHost Drives:"); | 477 | seq_puts(m, "\nHost Drives:"); |
478 | flag = FALSE; | 478 | flag = FALSE; |
479 | 479 | ||
480 | buf = gdth_ioctl_alloc(ha, sizeof(gdth_hget_str), FALSE, &paddr); | 480 | buf = gdth_ioctl_alloc(ha, sizeof(gdth_hget_str), FALSE, &paddr); |
@@ -527,11 +527,11 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
527 | } | 527 | } |
528 | 528 | ||
529 | if (!flag) | 529 | if (!flag) |
530 | seq_printf(m, "\n --\n"); | 530 | seq_puts(m, "\n --\n"); |
531 | } | 531 | } |
532 | 532 | ||
533 | /* controller events */ | 533 | /* controller events */ |
534 | seq_printf(m,"\nController Events:\n"); | 534 | seq_puts(m, "\nController Events:\n"); |
535 | 535 | ||
536 | for (id = -1;;) { | 536 | for (id = -1;;) { |
537 | id = gdth_read_event(ha, id, estr); | 537 | id = gdth_read_event(ha, id, estr); |