linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Usb: storage: usb: fixed coding style issues
@ 2021-08-20 22:39 Niklas Lantau
  2021-08-20 23:44 ` Joe Perches
  2021-08-26 11:24 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Niklas Lantau @ 2021-08-20 22:39 UTC (permalink / raw)
  To: stern; +Cc: linux-usb, usb-storage, linux-kernel, Niklas Lantau

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

Signed-off-by: Niklas Lantau <niklaslantau@gmail.com>
---
 drivers/usb/storage/usb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 90aa9c12ffac..c3d710f323f6 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -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;
 }
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Usb: storage: usb: fixed coding style issues
  2021-08-20 22:39 [PATCH] Usb: storage: usb: fixed coding style issues Niklas Lantau
@ 2021-08-20 23:44 ` Joe Perches
  2021-08-26 11:24 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2021-08-20 23:44 UTC (permalink / raw)
  To: Niklas Lantau, stern; +Cc: linux-usb, usb-storage, linux-kernel

On Sat, 2021-08-21 at 00:39 +0200, Niklas Lantau wrote:
> Fixed coding style issues that generated 1 error and 1 warning.

While this hardly needs changing:

> diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
[]
> @@ -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);

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(-)

diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 90aa9c12ffac5..e78e20fb1afa5 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -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;
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Usb: storage: usb: fixed coding style issues
  2021-08-20 22:39 [PATCH] Usb: storage: usb: fixed coding style issues Niklas Lantau
  2021-08-20 23:44 ` Joe Perches
@ 2021-08-26 11:24 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2021-08-26 11:24 UTC (permalink / raw)
  To: Niklas Lantau; +Cc: stern, linux-usb, usb-storage, linux-kernel

On Sat, Aug 21, 2021 at 12:39:54AM +0200, Niklas Lantau wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-26 11:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 22:39 [PATCH] Usb: storage: usb: fixed coding style issues Niklas Lantau
2021-08-20 23:44 ` Joe Perches
2021-08-26 11:24 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).