Re: [PATCH] staging: pi433: cleanup to adhere with linux coding style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux