All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] usb: storage : Remove c99 style commenting
@ 2015-06-26  6:14 Sunny Kumar
  2015-06-26 12:33 ` Sergei Shtylyov
  2015-06-26 14:08 ` Alan Stern
  0 siblings, 2 replies; 4+ messages in thread
From: Sunny Kumar @ 2015-06-26  6:14 UTC (permalink / raw)
  To: mdharm-usb, gregkh, linux-usb, usb-storage, linux-kernel; +Cc: Sunny Kumar

This patch fixes checkpatch.pl warning c99 style commenting.

Signed-off-by: Sunny Kumar <sunny.kumar.roy@gmail.com>
---
 drivers/usb/storage/sddr55.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
index aacedef..54d0a59 100644
--- a/drivers/usb/storage/sddr55.c
+++ b/drivers/usb/storage/sddr55.c
@@ -209,10 +209,10 @@ static int sddr55_read_data(struct us_data *us,
 	unsigned int len, offset;
 	struct scatterlist *sg;
 
-	// Since we only read in one block at a time, we have to create
-	// a bounce buffer and move the data a piece at a time between the
-	// bounce buffer and the actual transfer buffer.
-
+	/* Since we only read in one block at a time, we have to create
+	 * a bounce buffer and move the data a piece at a time between the
+	 * bounce buffer and the actual transfer buffer.
+	 */
 	len = min((unsigned int) sectors, (unsigned int) info->blocksize >>
 			info->smallpageshift) * PAGESIZE;
 	buffer = kmalloc(len, GFP_NOIO);
@@ -336,10 +336,10 @@ static int sddr55_write_data(struct us_data *us,
 		return USB_STOR_TRANSPORT_FAILED;
 	}
 
-	// Since we only write one block at a time, we have to create
-	// a bounce buffer and move the data a piece at a time between the
-	// bounce buffer and the actual transfer buffer.
-
+	/* Since we only write one block at a time, we have to create
+	 * a bounce buffer and move the data a piece at a time between the
+	 * bounce buffer and the actual transfer buffer.
+	 */
 	len = min((unsigned int) sectors, (unsigned int) info->blocksize >>
 			info->smallpageshift) * PAGESIZE;
 	buffer = kmalloc(len, GFP_NOIO);
-- 
2.1.4


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

* Re: [PATCH 1/1] usb: storage : Remove c99 style commenting
  2015-06-26  6:14 [PATCH 1/1] usb: storage : Remove c99 style commenting Sunny Kumar
@ 2015-06-26 12:33 ` Sergei Shtylyov
  2015-06-26 14:08 ` Alan Stern
  1 sibling, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2015-06-26 12:33 UTC (permalink / raw)
  To: Sunny Kumar, mdharm-usb, gregkh, linux-usb, usb-storage, linux-kernel

Hello.

On 6/26/2015 9:14 AM, Sunny Kumar wrote:

> This patch fixes checkpatch.pl warning c99 style commenting.

> Signed-off-by: Sunny Kumar <sunny.kumar.roy@gmail.com>
> ---
>   drivers/usb/storage/sddr55.c | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)

> diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
> index aacedef..54d0a59 100644
> --- a/drivers/usb/storage/sddr55.c
> +++ b/drivers/usb/storage/sddr55.c
> @@ -209,10 +209,10 @@ static int sddr55_read_data(struct us_data *us,
>   	unsigned int len, offset;
>   	struct scatterlist *sg;
>
> -	// Since we only read in one block at a time, we have to create
> -	// a bounce buffer and move the data a piece at a time between the
> -	// bounce buffer and the actual transfer buffer.
> -
> +	/* Since we only read in one block at a time, we have to create
> +	 * a bounce buffer and move the data a piece at a time between the
> +	 * bounce buffer and the actual transfer buffer.
> +	 */

    This style of commenting is preferred only in the networking code. The 
other parts of the kernel prefer this style:

/*
  * bla
  * bla
  */

WBR, Sergei


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

* Re: [PATCH 1/1] usb: storage : Remove c99 style commenting
  2015-06-26  6:14 [PATCH 1/1] usb: storage : Remove c99 style commenting Sunny Kumar
  2015-06-26 12:33 ` Sergei Shtylyov
@ 2015-06-26 14:08 ` Alan Stern
  2015-06-26 18:12   ` Sunny Kumar
  1 sibling, 1 reply; 4+ messages in thread
From: Alan Stern @ 2015-06-26 14:08 UTC (permalink / raw)
  To: Sunny Kumar; +Cc: mdharm-usb, gregkh, linux-usb, usb-storage, linux-kernel

On Fri, 26 Jun 2015, Sunny Kumar wrote:

> This patch fixes checkpatch.pl warning c99 style commenting.
> 
> Signed-off-by: Sunny Kumar <sunny.kumar.roy@gmail.com>
> ---
>  drivers/usb/storage/sddr55.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
> index aacedef..54d0a59 100644
> --- a/drivers/usb/storage/sddr55.c
> +++ b/drivers/usb/storage/sddr55.c
> @@ -209,10 +209,10 @@ static int sddr55_read_data(struct us_data *us,
>  	unsigned int len, offset;
>  	struct scatterlist *sg;
>  
> -	// Since we only read in one block at a time, we have to create
> -	// a bounce buffer and move the data a piece at a time between the
> -	// bounce buffer and the actual transfer buffer.
> -
> +	/* Since we only read in one block at a time, we have to create
> +	 * a bounce buffer and move the data a piece at a time between the
> +	 * bounce buffer and the actual transfer buffer.
> +	 */
>  	len = min((unsigned int) sectors, (unsigned int) info->blocksize >>
>  			info->smallpageshift) * PAGESIZE;
>  	buffer = kmalloc(len, GFP_NOIO);
> @@ -336,10 +336,10 @@ static int sddr55_write_data(struct us_data *us,
>  		return USB_STOR_TRANSPORT_FAILED;
>  	}
>  
> -	// Since we only write one block at a time, we have to create
> -	// a bounce buffer and move the data a piece at a time between the
> -	// bounce buffer and the actual transfer buffer.
> -
> +	/* Since we only write one block at a time, we have to create
> +	 * a bounce buffer and move the data a piece at a time between the
> +	 * bounce buffer and the actual transfer buffer.
> +	 */
>  	len = min((unsigned int) sectors, (unsigned int) info->blocksize >>
>  			info->smallpageshift) * PAGESIZE;
>  	buffer = kmalloc(len, GFP_NOIO);

Why did you fix just these two sites?  There are lots of other places 
in usb-storage that use C99-style comments:

$ cd drivers/usb/storage
$ egrep '[^:]//' *.[ch] | wc
    177    1635    9562

(The [^:] is to avoid matching things like "http://", and as a result
this misses the four places where a // comment starts at the beginning
of a line.)

Why not fix all of them?

Alan Stern


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

* Re: [PATCH 1/1] usb: storage : Remove c99 style commenting
  2015-06-26 14:08 ` Alan Stern
@ 2015-06-26 18:12   ` Sunny Kumar
  0 siblings, 0 replies; 4+ messages in thread
From: Sunny Kumar @ 2015-06-26 18:12 UTC (permalink / raw)
  To: Alan Stern; +Cc: mdharm-usb, gregkh, linux-usb, usb-storage, linux-kernel

On Fri, Jun 26, 2015 at 10:08:42AM -0400, Alan Stern wrote:
> On Fri, 26 Jun 2015, Sunny Kumar wrote:
> 
> > This patch fixes checkpatch.pl warning c99 style commenting.
> > 
> > Signed-off-by: Sunny Kumar <sunny.kumar.roy@gmail.com>
> > ---
> >  drivers/usb/storage/sddr55.c | 16 ++++++++--------
> >  1 file changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
> > index aacedef..54d0a59 100644
> > --- a/drivers/usb/storage/sddr55.c
> > +++ b/drivers/usb/storage/sddr55.c
> > @@ -209,10 +209,10 @@ static int sddr55_read_data(struct us_data *us,
> >  	unsigned int len, offset;
> >  	struct scatterlist *sg;
> >  
> > -	// Since we only read in one block at a time, we have to create
> > -	// a bounce buffer and move the data a piece at a time between the
> > -	// bounce buffer and the actual transfer buffer.
> > -
> > +	/* Since we only read in one block at a time, we have to create
> > +	 * a bounce buffer and move the data a piece at a time between the
> > +	 * bounce buffer and the actual transfer buffer.
> > +	 */
> >  	len = min((unsigned int) sectors, (unsigned int) info->blocksize >>
> >  			info->smallpageshift) * PAGESIZE;
> >  	buffer = kmalloc(len, GFP_NOIO);
> > @@ -336,10 +336,10 @@ static int sddr55_write_data(struct us_data *us,
> >  		return USB_STOR_TRANSPORT_FAILED;
> >  	}
> >  
> > -	// Since we only write one block at a time, we have to create
> > -	// a bounce buffer and move the data a piece at a time between the
> > -	// bounce buffer and the actual transfer buffer.
> > -
> > +	/* Since we only write one block at a time, we have to create
> > +	 * a bounce buffer and move the data a piece at a time between the
> > +	 * bounce buffer and the actual transfer buffer.
> > +	 */
> >  	len = min((unsigned int) sectors, (unsigned int) info->blocksize >>
> >  			info->smallpageshift) * PAGESIZE;
> >  	buffer = kmalloc(len, GFP_NOIO);
> 
> Why did you fix just these two sites?  There are lots of other places 
> in usb-storage that use C99-style comments:
> 
> $ cd drivers/usb/storage
> $ egrep '[^:]//' *.[ch] | wc
>     177    1635    9562
> 
> (The [^:] is to avoid matching things like "http://", and as a result
> this misses the four places where a // comment starts at the beginning
> of a line.)
> 
> Why not fix all of them?
These were C99 muliline comments so thought of fixing ..
> 
> Alan Stern
> 

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

end of thread, other threads:[~2015-06-26 18:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26  6:14 [PATCH 1/1] usb: storage : Remove c99 style commenting Sunny Kumar
2015-06-26 12:33 ` Sergei Shtylyov
2015-06-26 14:08 ` Alan Stern
2015-06-26 18:12   ` Sunny Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.