summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-04-18 19:59:48 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-08 01:43:43 +0200
commit7d203a9e11fa179306a9f49ad06eb3dd1b9d8614 (patch)
tree3b4af93d469e6dc1d1648cbdbd1f06f87c06df9c /drivers/usb
parent3091fa77ffb1b91f4ac3ae005efe6213508f7ec1 (diff)
usb: storage: scsiglue: Remove SPRINTF macro use
Single transform macros with hidden arguments are not particularly useful. Just use seq_printf directly instead. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/storage/scsiglue.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 0e400f382f3a..a8cbbffe822c 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -456,17 +456,13 @@ static int write_info(struct Scsi_Host *host, char *buffer, int length)
return length;
}
-/* we use this macro to help us write into the buffer */
-#undef SPRINTF
-#define SPRINTF(args...) seq_printf(m, ## args)
-
static int show_info (struct seq_file *m, struct Scsi_Host *host)
{
struct us_data *us = host_to_us(host);
const char *string;
/* print the controller name */
- SPRINTF(" Host scsi%d: usb-storage\n", host->host_no);
+ seq_printf(m, " Host scsi%d: usb-storage\n", host->host_no);
/* print product, vendor, and serial number strings */
if (us->pusb_dev->manufacturer)
@@ -475,26 +471,26 @@ static int show_info (struct seq_file *m, struct Scsi_Host *host)
string = us->unusual_dev->vendorName;
else
string = "Unknown";
- SPRINTF(" Vendor: %s\n", string);
+ seq_printf(m, " Vendor: %s\n", string);
if (us->pusb_dev->product)
string = us->pusb_dev->product;
else if (us->unusual_dev->productName)
string = us->unusual_dev->productName;
else
string = "Unknown";
- SPRINTF(" Product: %s\n", string);
+ seq_printf(m, " Product: %s\n", string);
if (us->pusb_dev->serial)
string = us->pusb_dev->serial;
else
string = "None";
- SPRINTF("Serial Number: %s\n", string);
+ seq_printf(m, "Serial Number: %s\n", string);
/* show the protocol and transport */
- SPRINTF(" Protocol: %s\n", us->protocol_name);
- SPRINTF(" Transport: %s\n", us->transport_name);
+ seq_printf(m, " Protocol: %s\n", us->protocol_name);
+ seq_printf(m, " Transport: %s\n", us->transport_name);
/* show the device flags */
- SPRINTF(" Quirks:");
+ seq_printf(m, " Quirks:");
#define US_FLAG(name, value) \
if (us->fflags & value) seq_printf(m, " " #name);