lkml.org 
[lkml]   [2015]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] usb: storage : Remove c99 style commenting
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



\
 
 \ /
  Last update: 2015-06-26 16:21    [W:0.046 / U:2.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site