Skip to contentSkip to conversation

Usb: storage: usb: fixed coding style issues

PATCH In review Niklas Lantau 3 participants 3 messages Aug 20, 2021 – Aug 26, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Usb: storage: usb: fixed coding style issues

Fixed coding style issues that generated 1 error and 1 warning.

---
 drivers/usb/storage/usb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/usb/storage/usb.c +2 -3
index 90aa9c12ffac..c3d710f323f6 100644
@@ -295,7 +295,7 @@ void fill_inquiry_response(struct us_data *us, unsigned char *data,
 }
 EXPORT_SYMBOL_GPL(fill_inquiry_response);
 
-static int usb_stor_control_thread(void * __us)
+static int usb_stor_control_thread(void *__us)
 {
 	struct us_data *us = (struct us_data *)__us;
 	struct Scsi_Host *host = us_to_host(us);
@@ -926,9 +926,8 @@ static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf)
 {
 	struct usb_device *usb_dev = interface_to_usbdev(intf);
 
-	if (usb_dev->bus->sg_tablesize) {
+	if (usb_dev->bus->sg_tablesize)
 		return usb_dev->bus->sg_tablesize;
-	}
 	return SG_ALL;
 }
 
Signature · 1 line
2.33.0
#1 lore raw
Quoted 1 line · Niklas Lantau

Fixed coding style issues that generated 1 error and 1 warning.

While this hardly needs changing:

drivers/usb/storage/usb.c

Quoted 1 line
drivers/usb/storage/usb.c +0 -0

[]

Quoted 10 lines
drivers/usb/storage/usb.c +0 -0
@@ -295,7 +295,7 @@ void fill_inquiry_response(struct us_data *us, unsigned char *data,
  }
  EXPORT_SYMBOL_GPL(fill_inquiry_response);

drivers/usb/storage/usb.c +1 -1
-static int usb_stor_control_thread(void * __us)
+static int usb_stor_control_thread(void *__us)

 {
  struct us_data *us = (struct us_data *)__us; struct Scsi_Host *host = us_to_host(us);

I'd write this renaming __us to the much more typical data and remove the useless cast of a void *.

---
 drivers/usb/storage/usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/storage/usb.c +2 -2
index 90aa9c12ffac5..e78e20fb1afa5 100644
@@ -295,9 +295,9 @@ void fill_inquiry_response(struct us_data *us, unsigned char *data,
 }
 EXPORT_SYMBOL_GPL(fill_inquiry_response);
 
-static int usb_stor_control_thread(void * __us)
+static int usb_stor_control_thread(void *data)
 {
-	struct us_data *us = (struct us_data *)__us;
+	struct us_data *us = data;
 	struct Scsi_Host *host = us_to_host(us);
 	struct scsi_cmnd *srb;
 
#2 lore raw
In reply to Niklas Lantau
Quoted 1 line · Niklas Lantau

Fixed coding style issues that generated 1 error and 1 warning.

What issues where they?

Always be specific and descriptive, do not make anyone guess.

And you did not use get_maintainer.pl to determine who to send this to?

thanks,

greg k-h