LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH] staging: pi433: cleanup to adhere with linux coding style
       [not found] <20190523010619.GA23217@t-1000>
@ 2019-05-23  7:30 ` Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2019-05-23  7:30 UTC (permalink / raw)
  To: Shobhit Kukreti; +Cc: devel, linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-23  7:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190523010619.GA23217@t-1000>
2019-05-23  7:30 ` [PATCH] staging: pi433: cleanup to adhere with linux coding style Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).