public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Shobhit Kukreti <shobhitkukreti@yahoo.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: pi433: cleanup to adhere with linux coding style
Date: Thu, 23 May 2019 09:30:16 +0200	[thread overview]
Message-ID: <20190523073016.GA14393@kroah.com> (raw)
In-Reply-To: <20190523010619.GA23217@t-1000>

On Wed, May 22, 2019 at 06:06:22PM -0700, Shobhit Kukreti wrote:
> The linux coding style emphasizes on a limit of 80 characters
> per line. Cleaned up several over 80 character warnings in following files:
> 
> pi433_if.c
> pi433_if.h
> rf69.c
> 
> Signed-off-by: Shobhit Kukreti <shobhitkukreti@yahoo.com>
> ---
>  drivers/staging/pi433/pi433_if.c | 15 ++++---
>  drivers/staging/pi433/pi433_if.h | 25 +++++++----
>  drivers/staging/pi433/rf69.c     | 89 ++++++++++++++++++++++++----------------
>  3 files changed, 78 insertions(+), 51 deletions(-)
> 
> diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
> index c889f0b..07715c9 100644
> --- a/drivers/staging/pi433/pi433_if.c
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -439,8 +439,7 @@ pi433_receive(void *data)
>  		/* wait for RSSI level to become high */
>  		dev_dbg(dev->dev, "rx: going to wait for high RSSI level");
>  		retval = wait_event_interruptible(dev->rx_wait_queue,
> -						  rf69_get_flag(dev->spi,
> -								rssi_exceeded_threshold));
> +			rf69_get_flag(dev->spi,	rssi_exceeded_threshold));

Ick, no.  The original code is fine here, this makes it much harder to
understand what is going on here, right?

>  		if (retval) /* wait was interrupted */
>  			goto abort;
>  		dev->interrupt_rx_allowed = false;
> @@ -475,7 +474,7 @@ pi433_receive(void *data)
>  	/* length byte enabled? */
>  	if (dev->rx_cfg.enable_length_byte == OPTION_ON) {
>  		retval = wait_event_interruptible(dev->fifo_wait_queue,
> -						  dev->free_in_fifo < FIFO_SIZE);
> +					dev->free_in_fifo < FIFO_SIZE);

Same for this, and all the other changes you made.  The 80 column "rule"
is just a strong hint.  There are other ways to remove it instead of
just moving code to the left like you did here, if you really want to
fix these warnings up.

thanks,

greg k-h

           reply	other threads:[~2019-05-23  7:30 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20190523010619.GA23217@t-1000>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190523073016.GA14393@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shobhitkukreti@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox