Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rasmus Villemoes and committed by
James Bottomley
91c40f24 ee7c7277

+136 -138
+5 -5
drivers/scsi/BusLogic.c
··· 3485 3485 seq_printf(m, "\n\ 3486 3486 Current Driver Queue Depth: %d\n\ 3487 3487 Currently Allocated CCBs: %d\n", adapter->drvr_qdepth, adapter->alloc_ccbs); 3488 - seq_printf(m, "\n\n\ 3488 + seq_puts(m, "\n\n\ 3489 3489 DATA TRANSFER STATISTICS\n\ 3490 3490 \n\ 3491 3491 Target Tagged Queuing Queue Depth Active Attempted Completed\n\ ··· 3500 3500 seq_printf(m, 3501 3501 " %3d %3u %9u %9u\n", adapter->qdepth[tgt], adapter->active_cmds[tgt], tgt_stats[tgt].cmds_tried, tgt_stats[tgt].cmds_complete); 3502 3502 } 3503 - seq_printf(m, "\n\ 3503 + seq_puts(m, "\n\ 3504 3504 Target Read Commands Write Commands Total Bytes Read Total Bytes Written\n\ 3505 3505 ====== ============= ============== =================== ===================\n"); 3506 3506 for (tgt = 0; tgt < adapter->maxdev; tgt++) { ··· 3517 3517 else 3518 3518 seq_printf(m, " %9u\n", tgt_stats[tgt].byteswritten.units); 3519 3519 } 3520 - seq_printf(m, "\n\ 3520 + seq_puts(m, "\n\ 3521 3521 Target Command 0-1KB 1-2KB 2-4KB 4-8KB 8-16KB\n\ 3522 3522 ====== ======= ========= ========= ========= ========= =========\n"); 3523 3523 for (tgt = 0; tgt < adapter->maxdev; tgt++) { ··· 3533 3533 tgt_stats[tgt].write_sz_buckets[0], 3534 3534 tgt_stats[tgt].write_sz_buckets[1], tgt_stats[tgt].write_sz_buckets[2], tgt_stats[tgt].write_sz_buckets[3], tgt_stats[tgt].write_sz_buckets[4]); 3535 3535 } 3536 - seq_printf(m, "\n\ 3536 + seq_puts(m, "\n\ 3537 3537 Target Command 16-32KB 32-64KB 64-128KB 128-256KB 256KB+\n\ 3538 3538 ====== ======= ========= ========= ========= ========= =========\n"); 3539 3539 for (tgt = 0; tgt < adapter->maxdev; tgt++) { ··· 3549 3549 tgt_stats[tgt].write_sz_buckets[5], 3550 3550 tgt_stats[tgt].write_sz_buckets[6], tgt_stats[tgt].write_sz_buckets[7], tgt_stats[tgt].write_sz_buckets[8], tgt_stats[tgt].write_sz_buckets[9]); 3551 3551 } 3552 - seq_printf(m, "\n\n\ 3552 + seq_puts(m, "\n\n\ 3553 3553 ERROR RECOVERY STATISTICS\n\ 3554 3554 \n\ 3555 3555 Command Aborts Bus Device Resets Host Adapter Resets\n\
+2 -2
drivers/scsi/NCR5380.c
··· 754 754 static void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m) 755 755 { 756 756 seq_printf(m, "scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun); 757 - seq_printf(m, " command = "); 757 + seq_puts(m, " command = "); 758 758 lprint_command(cmd->cmnd, m); 759 759 } 760 760 ··· 764 764 lprint_opcode(command[0], m); 765 765 for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) 766 766 seq_printf(m, "%02x ", command[i]); 767 - seq_printf(m, "\n"); 767 + seq_puts(m, "\n"); 768 768 } 769 769 770 770 static void lprint_opcode(int opcode, struct seq_file *m)
+18 -20
drivers/scsi/aic7xxx/aic79xx_proc.c
··· 97 97 u_int mb; 98 98 99 99 if (tinfo->period == AHD_PERIOD_UNKNOWN) { 100 - seq_printf(m, "Renegotiation Pending\n"); 100 + seq_puts(m, "Renegotiation Pending\n"); 101 101 return; 102 102 } 103 103 speed = 3300; ··· 119 119 printed_options = 0; 120 120 seq_printf(m, " (%d.%03dMHz", freq / 1000, freq % 1000); 121 121 if ((tinfo->ppr_options & MSG_EXT_PPR_RD_STRM) != 0) { 122 - seq_printf(m, " RDSTRM"); 122 + seq_puts(m, " RDSTRM"); 123 123 printed_options++; 124 124 } 125 125 if ((tinfo->ppr_options & MSG_EXT_PPR_DT_REQ) != 0) { 126 - seq_printf(m, "%s", printed_options ? "|DT" : " DT"); 126 + seq_puts(m, printed_options ? "|DT" : " DT"); 127 127 printed_options++; 128 128 } 129 129 if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) != 0) { 130 - seq_printf(m, "%s", printed_options ? "|IU" : " IU"); 130 + seq_puts(m, printed_options ? "|IU" : " IU"); 131 131 printed_options++; 132 132 } 133 133 if ((tinfo->ppr_options & MSG_EXT_PPR_RTI) != 0) { 134 - seq_printf(m, "%s", 135 - printed_options ? "|RTI" : " RTI"); 134 + seq_puts(m, printed_options ? "|RTI" : " RTI"); 136 135 printed_options++; 137 136 } 138 137 if ((tinfo->ppr_options & MSG_EXT_PPR_QAS_REQ) != 0) { 139 - seq_printf(m, "%s", 140 - printed_options ? "|QAS" : " QAS"); 138 + seq_puts(m, printed_options ? "|QAS" : " QAS"); 141 139 printed_options++; 142 140 } 143 141 } 144 142 145 143 if (tinfo->width > 0) { 146 144 if (freq != 0) { 147 - seq_printf(m, ", "); 145 + seq_puts(m, ", "); 148 146 } else { 149 - seq_printf(m, " ("); 147 + seq_puts(m, " ("); 150 148 } 151 149 seq_printf(m, "%dbit)", 8 * (0x01 << tinfo->width)); 152 150 } else if (freq != 0) { 153 - seq_printf(m, ")"); 151 + seq_puts(m, ")"); 154 152 } 155 - seq_printf(m, "\n"); 153 + seq_puts(m, "\n"); 156 154 } 157 155 158 156 static void ··· 165 167 tinfo = ahd_fetch_transinfo(ahd, channel, our_id, 166 168 target_id, &tstate); 167 169 seq_printf(m, "Target %d Negotiation Settings\n", target_id); 168 - seq_printf(m, "\tUser: "); 170 + seq_puts(m, "\tUser: "); 169 171 ahd_format_transinfo(m, &tinfo->user); 170 172 starget = ahd->platform_data->starget[target_id]; 171 173 if (starget == NULL) 172 174 return; 173 175 174 - seq_printf(m, "\tGoal: "); 176 + seq_puts(m, "\tGoal: "); 175 177 ahd_format_transinfo(m, &tinfo->goal); 176 - seq_printf(m, "\tCurr: "); 178 + seq_puts(m, "\tCurr: "); 177 179 ahd_format_transinfo(m, &tinfo->curr); 178 180 179 181 for (lun = 0; lun < AHD_NUM_LUNS; lun++) { ··· 289 291 max_targ = 16; 290 292 291 293 if (ahd->seep_config == NULL) 292 - seq_printf(m, "No Serial EEPROM\n"); 294 + seq_puts(m, "No Serial EEPROM\n"); 293 295 else { 294 - seq_printf(m, "Serial EEPROM:\n"); 296 + seq_puts(m, "Serial EEPROM:\n"); 295 297 for (i = 0; i < sizeof(*ahd->seep_config)/2; i++) { 296 298 if (((i % 8) == 0) && (i != 0)) { 297 - seq_printf(m, "\n"); 299 + seq_puts(m, "\n"); 298 300 } 299 301 seq_printf(m, "0x%.4x ", 300 302 ((uint16_t*)ahd->seep_config)[i]); 301 303 } 302 - seq_printf(m, "\n"); 304 + seq_puts(m, "\n"); 303 305 } 304 - seq_printf(m, "\n"); 306 + seq_puts(m, "\n"); 305 307 306 308 if ((ahd->features & AHD_WIDE) == 0) 307 309 max_targ = 8;
+12 -12
drivers/scsi/aic7xxx/aic7xxx_proc.c
··· 119 119 120 120 if (tinfo->width > 0) { 121 121 if (freq != 0) { 122 - seq_printf(m, ", "); 122 + seq_puts(m, ", "); 123 123 } else { 124 - seq_printf(m, " ("); 124 + seq_puts(m, " ("); 125 125 } 126 126 seq_printf(m, "%dbit)", 8 * (0x01 << tinfo->width)); 127 127 } else if (freq != 0) { 128 - seq_printf(m, ")"); 128 + seq_puts(m, ")"); 129 129 } 130 - seq_printf(m, "\n"); 130 + seq_puts(m, "\n"); 131 131 } 132 132 133 133 static void ··· 145 145 if ((ahc->features & AHC_TWIN) != 0) 146 146 seq_printf(m, "Channel %c ", channel); 147 147 seq_printf(m, "Target %d Negotiation Settings\n", target_id); 148 - seq_printf(m, "\tUser: "); 148 + seq_puts(m, "\tUser: "); 149 149 ahc_format_transinfo(m, &tinfo->user); 150 150 starget = ahc->platform_data->starget[target_offset]; 151 151 if (!starget) 152 152 return; 153 153 154 - seq_printf(m, "\tGoal: "); 154 + seq_puts(m, "\tGoal: "); 155 155 ahc_format_transinfo(m, &tinfo->goal); 156 - seq_printf(m, "\tCurr: "); 156 + seq_puts(m, "\tCurr: "); 157 157 ahc_format_transinfo(m, &tinfo->curr); 158 158 159 159 for (lun = 0; lun < AHC_NUM_LUNS; lun++) { ··· 303 303 304 304 305 305 if (ahc->seep_config == NULL) 306 - seq_printf(m, "No Serial EEPROM\n"); 306 + seq_puts(m, "No Serial EEPROM\n"); 307 307 else { 308 - seq_printf(m, "Serial EEPROM:\n"); 308 + seq_puts(m, "Serial EEPROM:\n"); 309 309 for (i = 0; i < sizeof(*ahc->seep_config)/2; i++) { 310 310 if (((i % 8) == 0) && (i != 0)) { 311 - seq_printf(m, "\n"); 311 + seq_puts(m, "\n"); 312 312 } 313 313 seq_printf(m, "0x%.4x ", 314 314 ((uint16_t*)ahc->seep_config)[i]); 315 315 } 316 - seq_printf(m, "\n"); 316 + seq_puts(m, "\n"); 317 317 } 318 - seq_printf(m, "\n"); 318 + seq_puts(m, "\n"); 319 319 320 320 max_targ = 16; 321 321 if ((ahc->features & (AHC_WIDE|AHC_TWIN)) == 0)
+3 -3
drivers/scsi/arm/fas216.c
··· 2990 2990 struct fas216_device *dev; 2991 2991 struct scsi_device *scd; 2992 2992 2993 - seq_printf(m, "Device/Lun TaggedQ Parity Sync\n"); 2993 + seq_puts(m, "Device/Lun TaggedQ Parity Sync\n"); 2994 2994 2995 2995 shost_for_each_device(scd, info->host) { 2996 2996 dev = &info->device[scd->id]; ··· 3000 3000 scd->simple_tags ? "en" : "dis", 3001 3001 scd->current_tag); 3002 3002 else 3003 - seq_printf(m, "unsupported "); 3003 + seq_puts(m, "unsupported "); 3004 3004 3005 3005 seq_printf(m, "%3sabled ", dev->parity_enabled ? "en" : "dis"); 3006 3006 ··· 3008 3008 seq_printf(m, "offset %d, %d ns\n", 3009 3009 dev->sof, dev->period * 4); 3010 3010 else 3011 - seq_printf(m, "async\n"); 3011 + seq_puts(m, "async\n"); 3012 3012 } 3013 3013 } 3014 3014
+2 -2
drivers/scsi/atari_NCR5380.c
··· 711 711 unsigned char *command; 712 712 seq_printf(m, "scsi%d: destination target %d, lun %llu\n", 713 713 H_NO(cmd), cmd->device->id, cmd->device->lun); 714 - seq_printf(m, " command = "); 714 + seq_puts(m, " command = "); 715 715 command = cmd->cmnd; 716 716 seq_printf(m, "%2d (0x%02x)", command[0], command[0]); 717 717 for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) 718 718 seq_printf(m, " %02x", command[i]); 719 - seq_printf(m, "\n"); 719 + seq_puts(m, "\n"); 720 720 } 721 721 722 722 static int __maybe_unused NCR5380_show_info(struct seq_file *m,
+3 -3
drivers/scsi/atp870u.c
··· 3101 3101 3102 3102 static int atp870u_show_info(struct seq_file *m, struct Scsi_Host *HBAptr) 3103 3103 { 3104 - seq_printf(m, "ACARD AEC-671X Driver Version: 2.6+ac\n"); 3105 - seq_printf(m, "\n"); 3106 - seq_printf(m, "Adapter Configuration:\n"); 3104 + seq_puts(m, "ACARD AEC-671X Driver Version: 2.6+ac\n"); 3105 + seq_puts(m, "\n"); 3106 + seq_puts(m, "Adapter Configuration:\n"); 3107 3107 seq_printf(m, " Base IO: %#.4lx\n", HBAptr->io_port); 3108 3108 seq_printf(m, " IRQ: %d\n", HBAptr->irq); 3109 3109 return 0;
+9 -8
drivers/scsi/dc395x.c
··· 4623 4623 unsigned long flags; 4624 4624 int dev; 4625 4625 4626 - seq_printf(m, DC395X_BANNER " PCI SCSI Host Adapter\n"); 4627 - seq_printf(m, " Driver Version " DC395X_VERSION "\n"); 4626 + seq_puts(m, DC395X_BANNER " PCI SCSI Host Adapter\n"); 4627 + seq_puts(m, " Driver Version " DC395X_VERSION "\n"); 4628 4628 4629 4629 DC395x_LOCK_IO(acb->scsi_host, flags); 4630 4630 ··· 4655 4655 acb->dcb_map[11], acb->dcb_map[12], acb->dcb_map[13], 4656 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 4661 dev = 0; 4661 4662 list_for_each_entry(dcb, &acb->dcb_list, list) { ··· 4682 4681 seq_printf(m, " %2i.%1i M %02i ", spd, spd1, 4683 4682 (dcb->sync_offset & 0x0f)); 4684 4683 } else 4685 - seq_printf(m, " "); 4684 + seq_puts(m, " "); 4686 4685 4687 4686 /* Add more info ... */ 4688 4687 seq_printf(m, " %02i\n", dcb->max_command); ··· 4690 4689 } 4691 4690 4692 4691 if (timer_pending(&acb->waiting_timer)) 4693 - seq_printf(m, "Waiting queue timer running\n"); 4692 + seq_puts(m, "Waiting queue timer running\n"); 4694 4693 else 4695 - seq_printf(m, "\n"); 4694 + seq_puts(m, "\n"); 4696 4695 4697 4696 list_for_each_entry(dcb, &acb->dcb_list, list) { 4698 4697 struct ScsiReqBlk *srb; ··· 4709 4708 list_for_each_entry(srb, &dcb->srb_going_list, list) 4710 4709 seq_printf(m, " %p", srb->cmd); 4711 4710 if (!list_empty(&dcb->srb_waiting_list) || !list_empty(&dcb->srb_going_list)) 4712 - seq_printf(m, "\n"); 4711 + seq_puts(m, "\n"); 4713 4712 } 4714 4713 4715 4714 if (debug_enabled(DBG_1)) { ··· 4717 4716 list_for_each_entry(dcb, &acb->dcb_list, list) { 4718 4717 seq_printf(m, "%p -> ", dcb); 4719 4718 } 4720 - seq_printf(m, "END\n"); 4719 + seq_puts(m, "END\n"); 4721 4720 } 4722 4721 4723 4722 DC395x_UNLOCK_IO(acb->scsi_host, flags);
+1 -1
drivers/scsi/dpt_i2o.c
··· 568 568 seq_printf(m, "\tpost fifo size = %d\n\treply fifo size = %d\n\tsg table size = %d\n\n", 569 569 host->can_queue, (int) pHba->reply_fifo_size , host->sg_tablesize); 570 570 571 - seq_printf(m, "Devices:\n"); 571 + seq_puts(m, "Devices:\n"); 572 572 for(chan = 0; chan < MAX_CHANNEL; chan++) { 573 573 for(id = 0; id < MAX_ID; id++) { 574 574 d = pHba->channel[chan].device[id];
+1 -1
drivers/scsi/eata_pio.c
··· 102 102 shost->host_no, SD(shost)->name); 103 103 seq_printf(m, "Firmware revision: v%s\n", 104 104 SD(shost)->revision); 105 - seq_printf(m, "IO: PIO\n"); 105 + seq_puts(m, "IO: PIO\n"); 106 106 seq_printf(m, "Base IO : %#.4x\n", (u32) shost->base); 107 107 seq_printf(m, "Host Bus: %s\n", 108 108 (SD(shost)->bustype == 'P')?"PCI ":
+12 -12
drivers/scsi/gdth_proc.c
··· 173 173 /* request is i.e. "cat /proc/scsi/gdth/0" */ 174 174 /* format: %-15s\t%-10s\t%-15s\t%s */ 175 175 /* driver parameters */ 176 - seq_printf(m, "Driver Parameters:\n"); 176 + seq_puts(m, "Driver Parameters:\n"); 177 177 if (reserve_list[0] == 0xff) 178 178 strcpy(hrec, "--"); 179 179 else { ··· 192 192 max_ids, hdr_channel); 193 193 194 194 /* controller information */ 195 - seq_printf(m,"\nDisk Array Controller Information:\n"); 195 + seq_puts(m, "\nDisk Array Controller Information:\n"); 196 196 seq_printf(m, 197 197 " Number: \t%d \tName: \t%s\n", 198 198 ha->hanum, ha->binfo.type_string); ··· 219 219 220 220 #ifdef GDTH_DMA_STATISTICS 221 221 /* controller statistics */ 222 - seq_printf(m,"\nController Statistics:\n"); 222 + seq_puts(m, "\nController Statistics:\n"); 223 223 seq_printf(m, 224 224 " 32-bit DMA buffer:\t%lu\t64-bit DMA buffer:\t%lu\n", 225 225 ha->dma32_cnt, ha->dma64_cnt); ··· 227 227 228 228 if (ha->more_proc) { 229 229 /* more information: 2. about physical devices */ 230 - seq_printf(m, "\nPhysical Devices:"); 230 + seq_puts(m, "\nPhysical Devices:"); 231 231 flag = FALSE; 232 232 233 233 buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); ··· 326 326 gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); 327 327 328 328 if (!flag) 329 - seq_printf(m, "\n --\n"); 329 + seq_puts(m, "\n --\n"); 330 330 331 331 /* 3. about logical drives */ 332 - seq_printf(m,"\nLogical Drives:"); 332 + seq_puts(m, "\nLogical Drives:"); 333 333 flag = FALSE; 334 334 335 335 buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); ··· 411 411 gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); 412 412 413 413 if (!flag) 414 - seq_printf(m, "\n --\n"); 414 + seq_puts(m, "\n --\n"); 415 415 416 416 /* 4. about array drives */ 417 - seq_printf(m,"\nArray Drives:"); 417 + seq_puts(m, "\nArray Drives:"); 418 418 flag = FALSE; 419 419 420 420 buf = gdth_ioctl_alloc(ha, GDTH_SCRATCH, FALSE, &paddr); ··· 471 471 gdth_ioctl_free(ha, GDTH_SCRATCH, buf, paddr); 472 472 473 473 if (!flag) 474 - seq_printf(m, "\n --\n"); 474 + seq_puts(m, "\n --\n"); 475 475 476 476 /* 5. about host drives */ 477 - seq_printf(m,"\nHost Drives:"); 477 + seq_puts(m, "\nHost Drives:"); 478 478 flag = FALSE; 479 479 480 480 buf = gdth_ioctl_alloc(ha, sizeof(gdth_hget_str), FALSE, &paddr); ··· 527 527 } 528 528 529 529 if (!flag) 530 - seq_printf(m, "\n --\n"); 530 + seq_puts(m, "\n --\n"); 531 531 } 532 532 533 533 /* controller events */ 534 - seq_printf(m,"\nController Events:\n"); 534 + seq_puts(m, "\nController Events:\n"); 535 535 536 536 for (id = -1;;) { 537 537 id = gdth_read_event(ha, id, estr);
+9 -9
drivers/scsi/in2000.c
··· 2226 2226 2227 2227 if (hd->proc & PR_INFO) { 2228 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 2230 for (x = 0; x < 7; x++) 2231 2231 seq_printf(m, "\t%02x", hd->sync_xfer[x]); 2232 - seq_printf(m, "\nsync_stat[] = "); 2232 + seq_puts(m, "\nsync_stat[] = "); 2233 2233 for (x = 0; x < 7; x++) 2234 2234 seq_printf(m, "\t%02x", hd->sync_stat[x]); 2235 2235 } 2236 2236 #ifdef PROC_STATISTICS 2237 2237 if (hd->proc & PR_STATISTICS) { 2238 - seq_printf(m, "\ncommands issued: "); 2238 + seq_puts(m, "\ncommands issued: "); 2239 2239 for (x = 0; x < 7; x++) 2240 2240 seq_printf(m, "\t%ld", hd->cmd_cnt[x]); 2241 - seq_printf(m, "\ndisconnects allowed:"); 2241 + seq_puts(m, "\ndisconnects allowed:"); 2242 2242 for (x = 0; x < 7; x++) 2243 2243 seq_printf(m, "\t%ld", hd->disc_allowed_cnt[x]); 2244 - seq_printf(m, "\ndisconnects done: "); 2244 + seq_puts(m, "\ndisconnects done: "); 2245 2245 for (x = 0; x < 7; x++) 2246 2246 seq_printf(m, "\t%ld", hd->disc_done_cnt[x]); 2247 2247 seq_printf(m, "\ninterrupts: \t%ld", hd->int_cnt); 2248 2248 } 2249 2249 #endif 2250 2250 if (hd->proc & PR_CONNECTED) { 2251 - seq_printf(m, "\nconnected: "); 2251 + seq_puts(m, "\nconnected: "); 2252 2252 if (hd->connected) { 2253 2253 cmd = (Scsi_Cmnd *) hd->connected; 2254 2254 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]); 2255 2255 } 2256 2256 } 2257 2257 if (hd->proc & PR_INPUTQ) { 2258 - seq_printf(m, "\ninput_Q: "); 2258 + seq_puts(m, "\ninput_Q: "); 2259 2259 cmd = (Scsi_Cmnd *) hd->input_Q; 2260 2260 while (cmd) { 2261 2261 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]); ··· 2263 2263 } 2264 2264 } 2265 2265 if (hd->proc & PR_DISCQ) { 2266 - seq_printf(m, "\ndisconnected_Q:"); 2266 + seq_puts(m, "\ndisconnected_Q:"); 2267 2267 cmd = (Scsi_Cmnd *) hd->disconnected_Q; 2268 2268 while (cmd) { 2269 2269 seq_printf(m, " %d:%llu(%02x)", cmd->device->id, cmd->device->lun, cmd->cmnd[0]); ··· 2273 2273 if (hd->proc & PR_TEST) { 2274 2274 ; /* insert your own custom function here */ 2275 2275 } 2276 - seq_printf(m, "\n"); 2276 + seq_puts(m, "\n"); 2277 2277 spin_unlock_irqrestore(instance->host_lock, flags); 2278 2278 #endif /* PROC_INTERFACE */ 2279 2279 return 0;
+3 -4
drivers/scsi/ips.c
··· 2038 2038 { 2039 2039 METHOD_TRACE("ips_host_info", 1); 2040 2040 2041 - seq_printf(m, "\nIBM ServeRAID General Information:\n\n"); 2041 + seq_puts(m, "\nIBM ServeRAID General Information:\n\n"); 2042 2042 2043 2043 if ((le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) && 2044 2044 (le16_to_cpu(ha->nvram->adapter_type) != 0)) 2045 2045 seq_printf(m, "\tController Type : %s\n", 2046 2046 ips_adapter_name[ha->ad_type - 1]); 2047 2047 else 2048 - seq_printf(m, 2049 - "\tController Type : Unknown\n"); 2048 + seq_puts(m, "\tController Type : Unknown\n"); 2050 2049 2051 2050 if (ha->io_addr) 2052 2051 seq_printf(m, ··· 2137 2138 seq_printf(m, "\tCurrent Active PT Commands : %d\n", 2138 2139 ha->num_ioctl); 2139 2140 2140 - seq_printf(m, "\n"); 2141 + seq_puts(m, "\n"); 2141 2142 2142 2143 return 0; 2143 2144 }
+1 -1
drivers/scsi/megaraid.c
··· 2240 2240 goto free_pdev; 2241 2241 2242 2242 if( mega_adapinq(adapter, dma_handle) != 0 ) { 2243 - seq_printf(m, "Adapter inquiry failed.\n"); 2243 + seq_puts(m, "Adapter inquiry failed.\n"); 2244 2244 printk(KERN_WARNING "megaraid: inquiry failed.\n"); 2245 2245 goto free_inquiry; 2246 2246 }
+7 -7
drivers/scsi/nsp32.c
··· 1456 1456 data = (nsp32_hw_data *)host->hostdata; 1457 1457 base = host->io_port; 1458 1458 1459 - seq_printf(m, "NinjaSCSI-32 status\n\n"); 1459 + seq_puts(m, "NinjaSCSI-32 status\n\n"); 1460 1460 seq_printf(m, "Driver version: %s, $Revision: 1.33 $\n", nsp32_release_version); 1461 1461 seq_printf(m, "SCSI host No.: %d\n", hostno); 1462 1462 seq_printf(m, "IRQ: %d\n", host->irq); ··· 1478 1478 spin_unlock_irqrestore(&(data->Lock), flags); 1479 1479 1480 1480 1481 - seq_printf(m, "SDTR status\n"); 1481 + seq_puts(m, "SDTR status\n"); 1482 1482 for (id = 0; id < ARRAY_SIZE(data->target); id++) { 1483 1483 1484 1484 seq_printf(m, "id %d: ", id); 1485 1485 1486 1486 if (id == host->this_id) { 1487 - seq_printf(m, "----- NinjaSCSI-32 host adapter\n"); 1487 + seq_puts(m, "----- NinjaSCSI-32 host adapter\n"); 1488 1488 continue; 1489 1489 } 1490 1490 1491 1491 if (data->target[id].sync_flag == SDTR_DONE) { 1492 1492 if (data->target[id].period == 0 && 1493 1493 data->target[id].offset == ASYNC_OFFSET ) { 1494 - seq_printf(m, "async"); 1494 + seq_puts(m, "async"); 1495 1495 } else { 1496 - seq_printf(m, " sync"); 1496 + seq_puts(m, " sync"); 1497 1497 } 1498 1498 } else { 1499 - seq_printf(m, " none"); 1499 + seq_puts(m, " none"); 1500 1500 } 1501 1501 1502 1502 if (data->target[id].period != 0) { ··· 1509 1509 data->target[id].offset 1510 1510 ); 1511 1511 } 1512 - seq_printf(m, "\n"); 1512 + seq_puts(m, "\n"); 1513 1513 } 1514 1514 return 0; 1515 1515 }
+15 -15
drivers/scsi/pcmcia/nsp_cs.c
··· 1375 1375 hostno = host->host_no; 1376 1376 data = (nsp_hw_data *)host->hostdata; 1377 1377 1378 - seq_printf(m, "NinjaSCSI status\n\n"); 1379 - seq_printf(m, "Driver version: $Revision: 1.23 $\n"); 1378 + seq_puts(m, "NinjaSCSI status\n\n"); 1379 + seq_puts(m, "Driver version: $Revision: 1.23 $\n"); 1380 1380 seq_printf(m, "SCSI host No.: %d\n", hostno); 1381 1381 seq_printf(m, "IRQ: %d\n", host->irq); 1382 1382 seq_printf(m, "IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1); 1383 1383 seq_printf(m, "MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - 1); 1384 1384 seq_printf(m, "sg_tablesize: %d\n", host->sg_tablesize); 1385 1385 1386 - seq_printf(m, "burst transfer mode: "); 1386 + seq_puts(m, "burst transfer mode: "); 1387 1387 switch (nsp_burst_mode) { 1388 1388 case BURST_IO8: 1389 - seq_printf(m, "io8"); 1389 + seq_puts(m, "io8"); 1390 1390 break; 1391 1391 case BURST_IO32: 1392 - seq_printf(m, "io32"); 1392 + seq_puts(m, "io32"); 1393 1393 break; 1394 1394 case BURST_MEM32: 1395 - seq_printf(m, "mem32"); 1395 + seq_puts(m, "mem32"); 1396 1396 break; 1397 1397 default: 1398 - seq_printf(m, "???"); 1398 + seq_puts(m, "???"); 1399 1399 break; 1400 1400 } 1401 - seq_printf(m, "\n"); 1401 + seq_puts(m, "\n"); 1402 1402 1403 1403 1404 1404 spin_lock_irqsave(&(data->Lock), flags); 1405 1405 seq_printf(m, "CurrentSC: 0x%p\n\n", data->CurrentSC); 1406 1406 spin_unlock_irqrestore(&(data->Lock), flags); 1407 1407 1408 - seq_printf(m, "SDTR status\n"); 1408 + seq_puts(m, "SDTR status\n"); 1409 1409 for(id = 0; id < ARRAY_SIZE(data->Sync); id++) { 1410 1410 1411 1411 seq_printf(m, "id %d: ", id); 1412 1412 1413 1413 if (id == host->this_id) { 1414 - seq_printf(m, "----- NinjaSCSI-3 host adapter\n"); 1414 + seq_puts(m, "----- NinjaSCSI-3 host adapter\n"); 1415 1415 continue; 1416 1416 } 1417 1417 1418 1418 switch(data->Sync[id].SyncNegotiation) { 1419 1419 case SYNC_OK: 1420 - seq_printf(m, " sync"); 1420 + seq_puts(m, " sync"); 1421 1421 break; 1422 1422 case SYNC_NG: 1423 - seq_printf(m, "async"); 1423 + seq_puts(m, "async"); 1424 1424 break; 1425 1425 case SYNC_NOT_YET: 1426 - seq_printf(m, " none"); 1426 + seq_puts(m, " none"); 1427 1427 break; 1428 1428 default: 1429 - seq_printf(m, "?????"); 1429 + seq_puts(m, "?????"); 1430 1430 break; 1431 1431 } 1432 1432 ··· 1439 1439 data->Sync[id].SyncOffset 1440 1440 ); 1441 1441 } 1442 - seq_printf(m, "\n"); 1442 + seq_puts(m, "\n"); 1443 1443 } 1444 1444 return 0; 1445 1445 }
+4 -4
drivers/scsi/qla2xxx/qla_dfs.c
··· 23 23 24 24 mutex_lock(&ha->fce_mutex); 25 25 26 - seq_printf(s, "FCE Trace Buffer\n"); 26 + seq_puts(s, "FCE Trace Buffer\n"); 27 27 seq_printf(s, "In Pointer = %llx\n\n", (unsigned long long)ha->fce_wr); 28 28 seq_printf(s, "Base = %llx\n\n", (unsigned long long) ha->fce_dma); 29 - seq_printf(s, "FCE Enable Registers\n"); 29 + seq_puts(s, "FCE Enable Registers\n"); 30 30 seq_printf(s, "%08x %08x %08x %08x %08x %08x\n", 31 31 ha->fce_mb[0], ha->fce_mb[2], ha->fce_mb[3], ha->fce_mb[4], 32 32 ha->fce_mb[5], ha->fce_mb[6]); ··· 38 38 seq_printf(s, "\n%llx: ", 39 39 (unsigned long long)((cnt * 4) + fce_start)); 40 40 else 41 - seq_printf(s, " "); 41 + seq_puts(s, " "); 42 42 seq_printf(s, "%08x", *fce++); 43 43 } 44 44 45 - seq_printf(s, "\nEnd\n"); 45 + seq_puts(s, "\nEnd\n"); 46 46 47 47 mutex_unlock(&ha->fce_mutex); 48 48
+11 -11
drivers/scsi/scsi_proc.c
··· 189 189 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); 190 190 for (i = 0; i < 8; i++) { 191 191 if (sdev->vendor[i] >= 0x20) 192 - seq_printf(s, "%c", sdev->vendor[i]); 192 + seq_putc(s, sdev->vendor[i]); 193 193 else 194 - seq_printf(s, " "); 194 + seq_puts(s, " "); 195 195 } 196 196 197 - seq_printf(s, " Model: "); 197 + seq_puts(s, " Model: "); 198 198 for (i = 0; i < 16; i++) { 199 199 if (sdev->model[i] >= 0x20) 200 - seq_printf(s, "%c", sdev->model[i]); 200 + seq_putc(s, sdev->model[i]); 201 201 else 202 - seq_printf(s, " "); 202 + seq_puts(s, " "); 203 203 } 204 204 205 - seq_printf(s, " Rev: "); 205 + seq_puts(s, " Rev: "); 206 206 for (i = 0; i < 4; i++) { 207 207 if (sdev->rev[i] >= 0x20) 208 - seq_printf(s, "%c", sdev->rev[i]); 208 + seq_putc(s, sdev->rev[i]); 209 209 else 210 - seq_printf(s, " "); 210 + seq_puts(s, " "); 211 211 } 212 212 213 - seq_printf(s, "\n"); 213 + seq_puts(s, "\n"); 214 214 215 215 seq_printf(s, " Type: %s ", scsi_device_type(sdev->type)); 216 216 seq_printf(s, " ANSI SCSI revision: %02x", 217 217 sdev->scsi_level - (sdev->scsi_level > 1)); 218 218 if (sdev->scsi_level == 2) 219 - seq_printf(s, " CCS\n"); 219 + seq_puts(s, " CCS\n"); 220 220 else 221 - seq_printf(s, "\n"); 221 + seq_puts(s, "\n"); 222 222 223 223 out: 224 224 return 0;
+3 -3
drivers/scsi/scsi_trace.c
··· 143 143 cmd = "WRITE_SAME"; 144 144 break; 145 145 default: 146 - trace_seq_printf(p, "UNKNOWN"); 146 + trace_seq_puts(p, "UNKNOWN"); 147 147 goto out; 148 148 } 149 149 ··· 204 204 cmd = "GET_LBA_STATUS"; 205 205 break; 206 206 default: 207 - trace_seq_printf(p, "UNKNOWN"); 207 + trace_seq_puts(p, "UNKNOWN"); 208 208 goto out; 209 209 } 210 210 ··· 249 249 { 250 250 const char *ret = trace_seq_buffer_ptr(p); 251 251 252 - trace_seq_printf(p, "-"); 252 + trace_seq_puts(p, "-"); 253 253 trace_seq_putc(p, 0); 254 254 255 255 return ret;
+9 -9
drivers/scsi/wd33c93.c
··· 2143 2143 seq_printf(m, "\nclock_freq=%02x no_sync=%02x no_dma=%d" 2144 2144 " dma_mode=%02x fast=%d", 2145 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 2147 for (x = 0; x < 7; x++) 2148 2148 seq_printf(m, "\t%02x", hd->sync_xfer[x]); 2149 - seq_printf(m, "\nsync_stat[] = "); 2149 + seq_puts(m, "\nsync_stat[] = "); 2150 2150 for (x = 0; x < 7; x++) 2151 2151 seq_printf(m, "\t%02x", hd->sync_stat[x]); 2152 2152 } 2153 2153 #ifdef PROC_STATISTICS 2154 2154 if (hd->proc & PR_STATISTICS) { 2155 - seq_printf(m, "\ncommands issued: "); 2155 + seq_puts(m, "\ncommands issued: "); 2156 2156 for (x = 0; x < 7; x++) 2157 2157 seq_printf(m, "\t%ld", hd->cmd_cnt[x]); 2158 - seq_printf(m, "\ndisconnects allowed:"); 2158 + seq_puts(m, "\ndisconnects allowed:"); 2159 2159 for (x = 0; x < 7; x++) 2160 2160 seq_printf(m, "\t%ld", hd->disc_allowed_cnt[x]); 2161 - seq_printf(m, "\ndisconnects done: "); 2161 + seq_puts(m, "\ndisconnects done: "); 2162 2162 for (x = 0; x < 7; x++) 2163 2163 seq_printf(m, "\t%ld", hd->disc_done_cnt[x]); 2164 2164 seq_printf(m, ··· 2167 2167 } 2168 2168 #endif 2169 2169 if (hd->proc & PR_CONNECTED) { 2170 - seq_printf(m, "\nconnected: "); 2170 + seq_puts(m, "\nconnected: "); 2171 2171 if (hd->connected) { 2172 2172 cmd = (struct scsi_cmnd *) hd->connected; 2173 2173 seq_printf(m, " %d:%llu(%02x)", ··· 2175 2175 } 2176 2176 } 2177 2177 if (hd->proc & PR_INPUTQ) { 2178 - seq_printf(m, "\ninput_Q: "); 2178 + seq_puts(m, "\ninput_Q: "); 2179 2179 cmd = (struct scsi_cmnd *) hd->input_Q; 2180 2180 while (cmd) { 2181 2181 seq_printf(m, " %d:%llu(%02x)", ··· 2184 2184 } 2185 2185 } 2186 2186 if (hd->proc & PR_DISCQ) { 2187 - seq_printf(m, "\ndisconnected_Q:"); 2187 + seq_puts(m, "\ndisconnected_Q:"); 2188 2188 cmd = (struct scsi_cmnd *) hd->disconnected_Q; 2189 2189 while (cmd) { 2190 2190 seq_printf(m, " %d:%llu(%02x)", ··· 2192 2192 cmd = (struct scsi_cmnd *) cmd->host_scribble; 2193 2193 } 2194 2194 } 2195 - seq_printf(m, "\n"); 2195 + seq_puts(m, "\n"); 2196 2196 spin_unlock_irq(&hd->lock); 2197 2197 #endif /* PROC_INTERFACE */ 2198 2198 return 0;
+6 -6
drivers/scsi/wd7000.c
··· 1330 1330 icmbs = adapter->mb.icmb; 1331 1331 1332 1332 seq_printf(m, "\nControl port value: 0x%x\n", adapter->control); 1333 - seq_printf(m, "Incoming mailbox:\n"); 1333 + seq_puts(m, "Incoming mailbox:\n"); 1334 1334 seq_printf(m, " size: %d\n", ICMB_CNT); 1335 - seq_printf(m, " queued messages: "); 1335 + seq_puts(m, " queued messages: "); 1336 1336 1337 1337 for (i = count = 0; i < ICMB_CNT; i++) 1338 1338 if (icmbs[i].status) { ··· 1340 1340 seq_printf(m, "0x%x ", i); 1341 1341 } 1342 1342 1343 - seq_printf(m, count ? "\n" : "none\n"); 1343 + seq_puts(m, count ? "\n" : "none\n"); 1344 1344 1345 - seq_printf(m, "Outgoing mailbox:\n"); 1345 + seq_puts(m, "Outgoing mailbox:\n"); 1346 1346 seq_printf(m, " size: %d\n", OGMB_CNT); 1347 1347 seq_printf(m, " next message: 0x%x\n", adapter->next_ogmb); 1348 - seq_printf(m, " queued messages: "); 1348 + seq_puts(m, " queued messages: "); 1349 1349 1350 1350 for (i = count = 0; i < OGMB_CNT; i++) 1351 1351 if (ogmbs[i].status) { ··· 1353 1353 seq_printf(m, "0x%x ", i); 1354 1354 } 1355 1355 1356 - seq_printf(m, count ? "\n" : "none\n"); 1356 + seq_puts(m, count ? "\n" : "none\n"); 1357 1357 #endif 1358 1358 1359 1359 spin_unlock_irqrestore(host->host_lock, flags);