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

Richard Weinberger richard.weinberger at gmail.com
Thu Sep 1 16:13:05 UTC 2016


Sean,

On Thu, Sep 1, 2016 at 5:58 PM, Sean <sean at 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 at 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


More information about the devel mailing list