[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <591435e6-4d94-30a2-6762-a6449fa8bc63@centrum.cz>
Date: Mon, 4 Dec 2017 20:45:12 +0100
From: Marek Tomas <marek_tomas@...trum.cz>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: pi433: fix brace coding style issues in
pi433_if.c
On 12/04/2017 10:32 AM, Dan Carpenter wrote:
> 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
>
Thanks for pointing that out. I already noticed that during implementation
of another suggestion too. I will revert this change in v2 of the patch. Anyway,
as you wrote there is the patch "[PATCHv2] staging: pi433: pi433_if.c remove
SET_CHECKED macro" which removes this macro completely and solve the
styling issue.
Best regards,
Tomas Marek
Powered by blists - more mailing lists