lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 10 Aug 2015 15:37:38 +0200
From:	Frans Klaver <fransklaver@...il.com>
To:	Gwenn Bourree <gwenn.bourree@...el.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>, Jiri Slaby <jslaby@...e.cz>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [Telephony/MUX]: solve checkpatch issues

On Mon, Aug 10, 2015 at 2:50 PM, Gwenn Bourree <gwenn.bourree@...el.com> wrote:
> In order to prepare the submission of other functional
> patches, the checkpatch script has been applied and the
> reported issues have been solved.

Which warnings? Explain why these changes are an improvement. Just the
fact that checkpatch complains is sometimes not enough to warrant the
change.

I would expect this to be done in a series, rather than in one patch.


> Signed-off-by: Gwenn Bourree <gwenn.bourree@...el.com>
> ---
>  drivers/tty/n_gsm.c | 56 +++++++++++++++++++++++++++++++++++++++++------------
>  1 file changed, 44 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index 382d3fc..2983ae2 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -486,10 +486,11 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
>                 pr_cont("UIH");
>                 break;
>         default:
> -               if (!(control & 0x01)) {
> +               if (!(control & 0x01))
>                         pr_cont("I N(S)%d N(R)%d",
>                                 (control & 0x0E) >> 1, (control & 0xE0) >> 5);
> -               } else switch (control & 0x0F) {
> +               else
> +                       switch (control & 0x0F) {
>                         case RR:
>                                 pr_cont("RR(%d)", (control & 0xE0) >> 5);
>                                 break;
> @@ -501,7 +502,7 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
>                                 break;
>                         default:
>                                 pr_cont("[%02X]", control);
> -               }
> +                       }
>         }

Does this improve readability?


> @@ -783,6 +786,7 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
>  static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
>  {
>         unsigned long flags;
> +
>         spin_lock_irqsave(&dlci->gsm->tx_lock, flags);
>         __gsm_data_queue(dlci, msg);
>         spin_unlock_irqrestore(&dlci->gsm->tx_lock, flags);
> @@ -833,7 +837,8 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
>                         *dp++ = gsm_encode_modem(dlci);
>                         break;
>                 }
> -               WARN_ON(kfifo_out_locked(dlci->fifo, dp , len, &dlci->lock) != len);
> +               WARN_ON(kfifo_out_locked(dlci->fifo, dp, len,
> +                               &dlci->lock) != len);

The second line should be
<tab><tab><tab><tab><tab><space>&dlci->lock

Again I wonder if readability is actually improving by this change.
Maybe things improve if the line break is done somewhere else?

Thanks,
Frans
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ