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


Groups > linux.kernel > #1474521

Re: [PATCH] staging: dgnc: Let line have less 80 char

From Richard Weinberger <richard.weinberger@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: dgnc: Let line have less 80 char
Date 2016-09-01 18:20 +0200
Message-ID <scCSB-47A-11@gated-at.bofh.it> (permalink)
References <scCzg-3Lb-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Sean,

On Thu, Sep 1, 2016 at 5:58 PM, Sean <sean@sean.taipei> wrote:
> This patch fix a minor checkpath warming:
>
> "WARNING: line over 80 characters"

Please don't do patches just because of the sake of checkpatch.pl.
Especially since "line over 80 characters" is only a warning, not an error.
Your changelog fails to explain why your change made the driver better.

> Signed-off-by: Sean Wei <sean@sean.taipei>
> ---
>  drivers/staging/dgnc/dgnc_neo.c | 116 ++++++++++++++++++++++++++++------------
>  1 file changed, 82 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
> index ba57e95..37fb556 100644
> --- a/drivers/staging/dgnc/dgnc_neo.c
> +++ b/drivers/staging/dgnc/dgnc_neo.c
> @@ -107,7 +107,7 @@ static inline void neo_set_cts_flow_control(struct channel_t *ch)
>         /* Turn off auto Xon flow control */
>         efr &= ~UART_17158_EFR_IXON;
>
> -       /* Why? Becuz Exar's spec says we have to zero it out before setting it */
> +       /* Becuz Exar's spec says we have to zero it out before setting it */

Okay, removing "Why?" silents checkpatch.pl, but the comment is still
crap/useless.
Same for the next few hunks.

[...]

> -               /* Only use the TXPrint baud rate if the terminal unit is NOT open */
> +               /*
> +                * Only use the TXPrint baud rate
> +                * if the terminal unit is NOT open
> +                */

Adding random new lines make the comment not better.

I'm not saying checkpatch.pl is completely useless, stuff in drivers/staging/
often needs to be adopted to the kernel coding style.
But please don't follow it blindly and try to understand what you can improve.

-- 
Thanks,
//richard

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


Thread

[PATCH] staging: dgnc: Let line have less 80 char Sean <sean@sean.taipei> - 2016-09-01 18:00 +0200
  Re: [PATCH] staging: dgnc: Let line have less 80 char Greg KH <gregkh@linuxfoundation.org> - 2016-09-01 18:10 +0200
  Re: [PATCH] staging: dgnc: Let line have less 80 char Richard Weinberger <richard.weinberger@gmail.com> - 2016-09-01 18:20 +0200

csiph-web