Commit 3d30079c authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by James Bottomley

scsi: merge consecutive seq_puts calls

Consecutive seq_puts calls with literal strings may be replaced by a
single call, saving a little .text.
Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 91c40f24
...@@ -2903,11 +2903,9 @@ static void asc_prt_adv_bios(struct seq_file *m, struct Scsi_Host *shost) ...@@ -2903,11 +2903,9 @@ static void asc_prt_adv_bios(struct seq_file *m, struct Scsi_Host *shost)
* the BIOS code segment base address. * the BIOS code segment base address.
*/ */
if (boardp->bios_signature != 0x55AA) { if (boardp->bios_signature != 0x55AA) {
seq_puts(m, "Disabled or Pre-3.1\n"); seq_puts(m, "Disabled or Pre-3.1\n"
seq_puts(m, "BIOS either disabled or Pre-3.1. If it is pre-3.1, then a newer version\n"
"BIOS either disabled or Pre-3.1. If it is pre-3.1, then a newer version\n"); "can be found at the ConnectCom FTP site: ftp://ftp.connectcom.net/pub\n");
seq_puts(m,
"can be found at the ConnectCom FTP site: ftp://ftp.connectcom.net/pub\n");
} else { } else {
major = (boardp->bios_version >> 12) & 0xF; major = (boardp->bios_version >> 12) & 0xF;
minor = (boardp->bios_version >> 8) & 0xF; minor = (boardp->bios_version >> 8) & 0xF;
...@@ -2923,9 +2921,8 @@ static void asc_prt_adv_bios(struct seq_file *m, struct Scsi_Host *shost) ...@@ -2923,9 +2921,8 @@ static void asc_prt_adv_bios(struct seq_file *m, struct Scsi_Host *shost)
*/ */
if (major < 3 || (major <= 3 && minor < 1) || if (major < 3 || (major <= 3 && minor < 1) ||
(major <= 3 && minor <= 1 && letter < ('I' - 'A'))) { (major <= 3 && minor <= 1 && letter < ('I' - 'A'))) {
seq_puts(m, seq_puts(m, "Newer version of ROM BIOS is available at the ConnectCom FTP site:\n"
"Newer version of ROM BIOS is available at the ConnectCom FTP site:\n"); "ftp://ftp.connectcom.net/pub\n");
seq_puts(m, "ftp://ftp.connectcom.net/pub\n");
} }
} }
} }
...@@ -3071,27 +3068,23 @@ static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shost ...@@ -3071,27 +3068,23 @@ static void asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shost
seq_puts(m, " Target ID: "); seq_puts(m, " Target ID: ");
for (i = 0; i <= ASC_MAX_TID; i++) for (i = 0; i <= ASC_MAX_TID; i++)
seq_printf(m, " %d", i); seq_printf(m, " %d", i);
seq_puts(m, "\n");
seq_puts(m, " Disconnects: "); seq_puts(m, "\n Disconnects: ");
for (i = 0; i <= ASC_MAX_TID; i++) for (i = 0; i <= ASC_MAX_TID; i++)
seq_printf(m, " %c", seq_printf(m, " %c",
(ep->disc_enable & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); (ep->disc_enable & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
seq_puts(m, "\n");
seq_puts(m, " Command Queuing: "); seq_puts(m, "\n Command Queuing: ");
for (i = 0; i <= ASC_MAX_TID; i++) for (i = 0; i <= ASC_MAX_TID; i++)
seq_printf(m, " %c", seq_printf(m, " %c",
(ep->use_cmd_qng & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); (ep->use_cmd_qng & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
seq_puts(m, "\n");
seq_puts(m, " Start Motor: "); seq_puts(m, "\n Start Motor: ");
for (i = 0; i <= ASC_MAX_TID; i++) for (i = 0; i <= ASC_MAX_TID; i++)
seq_printf(m, " %c", seq_printf(m, " %c",
(ep->start_motor & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); (ep->start_motor & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
seq_puts(m, "\n");
seq_puts(m, " Synchronous Transfer:"); seq_puts(m, "\n Synchronous Transfer:");
for (i = 0; i <= ASC_MAX_TID; i++) for (i = 0; i <= ASC_MAX_TID; i++)
seq_printf(m, " %c", seq_printf(m, " %c",
(ep->init_sdtr & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); (ep->init_sdtr & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
...@@ -3410,10 +3403,9 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost) ...@@ -3410,10 +3403,9 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
i, i,
(v->use_tagged_qng & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); (v->use_tagged_qng & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
} }
seq_puts(m, "\n");
/* Current number of commands waiting for a device. */ /* Current number of commands waiting for a device. */
seq_puts(m, " Command Queue Pending:"); seq_puts(m, "\n Command Queue Pending:");
for (i = 0; i <= ASC_MAX_TID; i++) { for (i = 0; i <= ASC_MAX_TID; i++) {
if ((chip_scsi_id == i) || if ((chip_scsi_id == i) ||
((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
...@@ -3421,10 +3413,9 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost) ...@@ -3421,10 +3413,9 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
} }
seq_printf(m, " %X:%u", i, v->cur_dvc_qng[i]); seq_printf(m, " %X:%u", i, v->cur_dvc_qng[i]);
} }
seq_puts(m, "\n");
/* Current limit on number of commands that can be sent to a device. */ /* Current limit on number of commands that can be sent to a device. */
seq_puts(m, " Command Queue Limit:"); seq_puts(m, "\n Command Queue Limit:");
for (i = 0; i <= ASC_MAX_TID; i++) { for (i = 0; i <= ASC_MAX_TID; i++) {
if ((chip_scsi_id == i) || if ((chip_scsi_id == i) ||
((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
...@@ -3432,10 +3423,9 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost) ...@@ -3432,10 +3423,9 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
} }
seq_printf(m, " %X:%u", i, v->max_dvc_qng[i]); seq_printf(m, " %X:%u", i, v->max_dvc_qng[i]);
} }
seq_puts(m, "\n");
/* Indicate whether the device has returned queue full status. */ /* Indicate whether the device has returned queue full status. */
seq_puts(m, " Command Queue Full:"); seq_puts(m, "\n Command Queue Full:");
for (i = 0; i <= ASC_MAX_TID; i++) { for (i = 0; i <= ASC_MAX_TID; i++) {
if ((chip_scsi_id == i) || if ((chip_scsi_id == i) ||
((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
...@@ -3447,9 +3437,8 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost) ...@@ -3447,9 +3437,8 @@ static void asc_prt_asc_board_info(struct seq_file *m, struct Scsi_Host *shost)
else else
seq_printf(m, " %X:N", i); seq_printf(m, " %X:N", i);
} }
seq_puts(m, "\n");
seq_puts(m, " Synchronous Transfer:"); seq_puts(m, "\n Synchronous Transfer:");
for (i = 0; i <= ASC_MAX_TID; i++) { for (i = 0; i <= ASC_MAX_TID; i++) {
if ((chip_scsi_id == i) || if ((chip_scsi_id == i) ||
((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
...@@ -3555,9 +3544,8 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost) ...@@ -3555,9 +3544,8 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
i, i,
(tagqng_able & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N'); (tagqng_able & ADV_TID_TO_TIDMASK(i)) ? 'Y' : 'N');
} }
seq_puts(m, "\n");
seq_puts(m, " Queue Limit:"); seq_puts(m, "\n Queue Limit:");
for (i = 0; i <= ADV_MAX_TID; i++) { for (i = 0; i <= ADV_MAX_TID; i++) {
if ((chip_scsi_id == i) || if ((chip_scsi_id == i) ||
((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
...@@ -3569,9 +3557,8 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost) ...@@ -3569,9 +3557,8 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost)
seq_printf(m, " %X:%d", i, lrambyte); seq_printf(m, " %X:%d", i, lrambyte);
} }
seq_puts(m, "\n");
seq_puts(m, " Command Pending:"); seq_puts(m, "\n Command Pending:");
for (i = 0; i <= ADV_MAX_TID; i++) { for (i = 0; i <= ADV_MAX_TID; i++) {
if ((chip_scsi_id == i) || if ((chip_scsi_id == i) ||
((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) { ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
......
...@@ -3101,9 +3101,8 @@ static const char *atp870u_info(struct Scsi_Host *notused) ...@@ -3101,9 +3101,8 @@ static const char *atp870u_info(struct Scsi_Host *notused)
static int atp870u_show_info(struct seq_file *m, struct Scsi_Host *HBAptr) static int atp870u_show_info(struct seq_file *m, struct Scsi_Host *HBAptr)
{ {
seq_puts(m, "ACARD AEC-671X Driver Version: 2.6+ac\n"); seq_puts(m, "ACARD AEC-671X Driver Version: 2.6+ac\n\n"
seq_puts(m, "\n"); "Adapter Configuration:\n");
seq_puts(m, "Adapter Configuration:\n");
seq_printf(m, " Base IO: %#.4lx\n", HBAptr->io_port); seq_printf(m, " Base IO: %#.4lx\n", HBAptr->io_port);
seq_printf(m, " IRQ: %d\n", HBAptr->irq); seq_printf(m, " IRQ: %d\n", HBAptr->irq);
return 0; return 0;
......
...@@ -4623,8 +4623,8 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host) ...@@ -4623,8 +4623,8 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host)
unsigned long flags; unsigned long flags;
int dev; int dev;
seq_puts(m, DC395X_BANNER " PCI SCSI Host Adapter\n"); seq_puts(m, DC395X_BANNER " PCI SCSI Host Adapter\n"
seq_puts(m, " Driver Version " DC395X_VERSION "\n"); " Driver Version " DC395X_VERSION "\n");
DC395x_LOCK_IO(acb->scsi_host, flags); DC395x_LOCK_IO(acb->scsi_host, flags);
......
...@@ -1375,8 +1375,8 @@ static int nsp_show_info(struct seq_file *m, struct Scsi_Host *host) ...@@ -1375,8 +1375,8 @@ static int nsp_show_info(struct seq_file *m, struct Scsi_Host *host)
hostno = host->host_no; hostno = host->host_no;
data = (nsp_hw_data *)host->hostdata; data = (nsp_hw_data *)host->hostdata;
seq_puts(m, "NinjaSCSI status\n\n"); seq_puts(m, "NinjaSCSI status\n\n"
seq_puts(m, "Driver version: $Revision: 1.23 $\n"); "Driver version: $Revision: 1.23 $\n");
seq_printf(m, "SCSI host No.: %d\n", hostno); seq_printf(m, "SCSI host No.: %d\n", hostno);
seq_printf(m, "IRQ: %d\n", host->irq); seq_printf(m, "IRQ: %d\n", host->irq);
seq_printf(m, "IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1); seq_printf(m, "IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment