Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1204280
| From | Frans Klaver <fransklaver@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] [Telephony/MUX]: solve checkpatch issues |
| Date | 2015-08-10 15:40 +0200 |
| Message-ID | <pVVt1-7LE-27@gated-at.bofh.it> (permalink) |
| References | <pVUQi-6Mt-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 10, 2015 at 2:50 PM, Gwenn Bourree <gwenn.bourree@intel.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@intel.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] [Telephony/MUX]: solve checkpatch issues Gwenn Bourree <gwenn.bourree@intel.com> - 2015-08-10 15:00 +0200 Re: [PATCH] [Telephony/MUX]: solve checkpatch issues Frans Klaver <fransklaver@gmail.com> - 2015-08-10 15:40 +0200
csiph-web