aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR5380.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-12-02 18:10:49 -0500
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 12:57:45 -0500
commit0c3de38ff3eec506ef08ede32110d1f266366ccd (patch)
treecd94d017cf33979ccabc0cec01542fe4be50a38a /drivers/scsi/NCR5380.c
parent5af2e38242f87231244393e69beca7284e70056f (diff)
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>
Diffstat (limited to 'drivers/scsi/NCR5380.c')
-rw-r--r--drivers/scsi/NCR5380.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 36244d63def2..aca181e508f8 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -716,8 +716,6 @@ static int __maybe_unused NCR5380_write_info(struct Scsi_Host *instance,
716} 716}
717#endif 717#endif
718 718
719#undef SPRINTF
720#define SPRINTF(args...) seq_printf(m, ## args)
721static 719static
722void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m); 720void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m);
723static 721static
@@ -734,19 +732,19 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m,
734 hostdata = (struct NCR5380_hostdata *) instance->hostdata; 732 hostdata = (struct NCR5380_hostdata *) instance->hostdata;
735 733
736#ifdef PSEUDO_DMA 734#ifdef PSEUDO_DMA
737 SPRINTF("Highwater I/O busy spin counts: write %d, read %d\n", 735 seq_printf(m, "Highwater I/O busy spin counts: write %d, read %d\n",
738 hostdata->spin_max_w, hostdata->spin_max_r); 736 hostdata->spin_max_w, hostdata->spin_max_r);
739#endif 737#endif
740 spin_lock_irq(instance->host_lock); 738 spin_lock_irq(instance->host_lock);
741 if (!hostdata->connected) 739 if (!hostdata->connected)
742 SPRINTF("scsi%d: no currently connected command\n", instance->host_no); 740 seq_printf(m, "scsi%d: no currently connected command\n", instance->host_no);
743 else 741 else
744 lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m); 742 lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m);
745 SPRINTF("scsi%d: issue_queue\n", instance->host_no); 743 seq_printf(m, "scsi%d: issue_queue\n", instance->host_no);
746 for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) 744 for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble)
747 lprint_Scsi_Cmnd(ptr, m); 745 lprint_Scsi_Cmnd(ptr, m);
748 746
749 SPRINTF("scsi%d: disconnected_queue\n", instance->host_no); 747 seq_printf(m, "scsi%d: disconnected_queue\n", instance->host_no);
750 for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) 748 for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble)
751 lprint_Scsi_Cmnd(ptr, m); 749 lprint_Scsi_Cmnd(ptr, m);
752 spin_unlock_irq(instance->host_lock); 750 spin_unlock_irq(instance->host_lock);
@@ -755,8 +753,8 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m,
755 753
756static void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m) 754static void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m)
757{ 755{
758 SPRINTF("scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun); 756 seq_printf(m, "scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun);
759 SPRINTF(" command = "); 757 seq_printf(m, " command = ");
760 lprint_command(cmd->cmnd, m); 758 lprint_command(cmd->cmnd, m);
761} 759}
762 760
@@ -765,13 +763,13 @@ static void lprint_command(unsigned char *command, struct seq_file *m)
765 int i, s; 763 int i, s;
766 lprint_opcode(command[0], m); 764 lprint_opcode(command[0], m);
767 for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) 765 for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i)
768 SPRINTF("%02x ", command[i]); 766 seq_printf(m, "%02x ", command[i]);
769 SPRINTF("\n"); 767 seq_printf(m, "\n");
770} 768}
771 769
772static void lprint_opcode(int opcode, struct seq_file *m) 770static void lprint_opcode(int opcode, struct seq_file *m)
773{ 771{
774 SPRINTF("%2d (0x%02x)", opcode, opcode); 772 seq_printf(m, "%2d (0x%02x)", opcode, opcode);
775} 773}
776 774
777 775