Re: [PATCH] Staging: pi433: fix brace coding style issues in pi433_if.c

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

 



On Sat, Dec 02, 2017 at 10:05:20PM +0100, Tomas Marek wrote:
> @@ -578,13 +546,9 @@ static irqreturn_t DIO1_irq_handler(int irq, void *dev_id)
>  		SET_CHECKED(rf69_set_mode(spi, standby)); /* this clears the fifo */
>  		SET_CHECKED(rf69_set_fifo_threshold(spi, FIFO_THRESHOLD));
>  		if (tx_cfg.enable_length_byte == optionOn)
> -		{
>  			SET_CHECKED(rf69_set_payload_length(spi, size * tx_cfg.repetitions));
> -		}
>  		else
> -		{
>  			SET_CHECKED(rf69_set_payload_length(spi, 0));
> -		}
>  

You can't delete the curly braces here because SET_CHECKED() is utter
garbage.  SET_CHECKED() needs to be wrapped in a do-while(0) loop.  But
someone sent a patch to delete it entirely which is even better.

regards,
dan carpenter

_______________________________________________
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