Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1470173

Re: [PATCH] staging: rts5208: rtsx.c: Fix checkpatch warnings.

From Ming-Chia Chung <quexint@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: rts5208: rtsx.c: Fix checkpatch warnings.
Date 2016-08-25 16:10 +0200
Message-ID <sa3vX-1WA-13@gated-at.bofh.it> (permalink)
References <s90JP-my-3@gated-at.bofh.it> <s91cS-Nb-27@gated-at.bofh.it> <s97Lj-50k-3@gated-at.bofh.it> <s9dH3-iA-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 23, 2016 at 12:01:36PM +0530, Sudip Mukherjee wrote:
> On Tue, Aug 23, 2016 at 08:19:46AM +0800, Ming-Chia Chung wrote:
> > On Mon, Aug 22, 2016 at 10:51:27PM +0530, Sudip Mukherjee wrote:
> > > On Tue, Aug 23, 2016 at 12:54:17AM +0800, MingChia Chung wrote:
> > > >   This patch fixes a minor checkpatch warnings:
> > > > 
> > > >   "WARNING: Block comments use a trailing */ on a separate line"
> > > > 
> > > >   Signed-off-by: Ming-Chia Chung <Quexint@gmail.com>
> > > > ---
> > > >  drivers/staging/rts5208/rtsx.c | 42 ++++++++++++++++++++++++++++--------------
> > > >  1 file changed, 28 insertions(+), 14 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c
> > > > index e992e03..a880411 100644
> > > > --- a/drivers/staging/rts5208/rtsx.c
> > > > +++ b/drivers/staging/rts5208/rtsx.c
> > > > @@ -81,14 +81,16 @@ static int slave_alloc(struct scsi_device *sdev)
> > > >  
> > > >  static int slave_configure(struct scsi_device *sdev)
> > > >  {
> > > > -	/* Scatter-gather buffers (all but the last) must have a length
> > > > +	/*
> > > > +   * Scatter-gather buffers (all but the last) must have a length
> > > 
> > > The alignment doesnot look correct here. Also in some more places later
> > > in this patch.
> > > 
> > > regards
> > > Sudip
> > 
> > I sent this patch by following docs ([1] and [2]). The style for long
> > comments needs the begining and ending almost-blank lines. There is no
> > the begining almost-blank line only for the files in net/ and
> > drivers/net/.
> > Please let me know what I misunderstood.
> 
> After applying the patch the file was like:
>         /*
>    * Scatter-gather buffers (all but the last) must have a length
>          * divisible by the bulk maxpacket size.  Otherwise a data packet
>          * would end up being short, causing a premature end to the data
>          * transfer.  Since high-speed bulk pipes have a maxpacket size
> 
> See the alignment of the second line. Please use tab instead of space. And also
> checkpatch should have warned you not to use space before the Signed-off-by.
> 
> regards
> sudip

Thank you for detailed explanation. I enabled "expandtab" in vim so that
I didn't realize the alignment is wrong. Now, I install 'linuxsty.vim'
to view the code. But checkpatch.pl didn't show the warning of space.
Here is my command:
`kernels/staging$ perl scripts/checkpatch.pl -f drivers/staging/rts5208/rtsx.c`

Thanks,
MingChia

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] staging: rts5208: rtsx.c: Fix checkpatch warnings. MingChia Chung <quexint@gmail.com> - 2016-08-22 19:00 +0200
  Re: [PATCH] staging: rts5208: rtsx.c: Fix checkpatch warnings. Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-08-22 19:30 +0200
    Re: [PATCH] staging: rts5208: rtsx.c: Fix checkpatch warnings. Ming-Chia Chung <quexint@gmail.com> - 2016-08-23 02:30 +0200
      Re: [PATCH] staging: rts5208: rtsx.c: Fix checkpatch warnings. Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-08-23 08:50 +0200
        Re: [PATCH] staging: rts5208: rtsx.c: Fix checkpatch warnings. Ming-Chia Chung <quexint@gmail.com> - 2016-08-25 16:10 +0200
          Re: [PATCH] staging: rts5208: rtsx.c: Fix checkpatch warnings. Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-08-25 19:00 +0200

csiph-web