scsi: remove SPRINTF macro
The macro SPRINTF doesn't save a lot of typing or make the code more readable, and depending on a specific identifier (m) in the surrounding scope is generally frowned upon. Nuke it. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
Цей коміт міститься в:

зафіксовано
James Bottomley

джерело
5af2e38242
коміт
0c3de38ff3
@@ -716,8 +716,6 @@ static int __maybe_unused NCR5380_write_info(struct Scsi_Host *instance,
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef SPRINTF
|
||||
#define SPRINTF(args...) seq_printf(m, ## args)
|
||||
static
|
||||
void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m);
|
||||
static
|
||||
@@ -734,19 +732,19 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m,
|
||||
hostdata = (struct NCR5380_hostdata *) instance->hostdata;
|
||||
|
||||
#ifdef PSEUDO_DMA
|
||||
SPRINTF("Highwater I/O busy spin counts: write %d, read %d\n",
|
||||
seq_printf(m, "Highwater I/O busy spin counts: write %d, read %d\n",
|
||||
hostdata->spin_max_w, hostdata->spin_max_r);
|
||||
#endif
|
||||
spin_lock_irq(instance->host_lock);
|
||||
if (!hostdata->connected)
|
||||
SPRINTF("scsi%d: no currently connected command\n", instance->host_no);
|
||||
seq_printf(m, "scsi%d: no currently connected command\n", instance->host_no);
|
||||
else
|
||||
lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m);
|
||||
SPRINTF("scsi%d: issue_queue\n", instance->host_no);
|
||||
seq_printf(m, "scsi%d: issue_queue\n", instance->host_no);
|
||||
for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble)
|
||||
lprint_Scsi_Cmnd(ptr, m);
|
||||
|
||||
SPRINTF("scsi%d: disconnected_queue\n", instance->host_no);
|
||||
seq_printf(m, "scsi%d: disconnected_queue\n", instance->host_no);
|
||||
for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble)
|
||||
lprint_Scsi_Cmnd(ptr, m);
|
||||
spin_unlock_irq(instance->host_lock);
|
||||
@@ -755,8 +753,8 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m,
|
||||
|
||||
static void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m)
|
||||
{
|
||||
SPRINTF("scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun);
|
||||
SPRINTF(" command = ");
|
||||
seq_printf(m, "scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun);
|
||||
seq_printf(m, " command = ");
|
||||
lprint_command(cmd->cmnd, m);
|
||||
}
|
||||
|
||||
@@ -765,13 +763,13 @@ static void lprint_command(unsigned char *command, struct seq_file *m)
|
||||
int i, s;
|
||||
lprint_opcode(command[0], m);
|
||||
for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i)
|
||||
SPRINTF("%02x ", command[i]);
|
||||
SPRINTF("\n");
|
||||
seq_printf(m, "%02x ", command[i]);
|
||||
seq_printf(m, "\n");
|
||||
}
|
||||
|
||||
static void lprint_opcode(int opcode, struct seq_file *m)
|
||||
{
|
||||
SPRINTF("%2d (0x%02x)", opcode, opcode);
|
||||
seq_printf(m, "%2d (0x%02x)", opcode, opcode);
|
||||
}
|
||||
|
||||
|
||||
|
Посилання в новій задачі
Заблокувати користувача