On Thu, Nov 30, 2017 at 06:59:11PM +0100, Oliver Graute wrote:
> This patch fixes the following checkpatch.pl errors:
>
> ERROR: that open brace { should be on the previous line
> #344: FILE: pi433_if.c:344:
> + if(retval) /* wait was interrupted */
> + {
>
> ERROR: space required before the open parenthesis '('
> #344: FILE: pi433_if.c:344:
> + if(retval) /* wait was interrupted */
>
>
> Signed-off-by: Oliver Graute <[email protected]>
> ---
> drivers/staging/pi433/pi433_if.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/pi433/pi433_if.c
> b/drivers/staging/pi433/pi433_if.c
> index 7632849..1cdff5c 100644
> --- a/drivers/staging/pi433/pi433_if.c
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -327,8 +327,7 @@ static irqreturn_t DIO1_irq_handler(int irq, void *dev_id)
> /* wait for any tx to finish */
> dev_dbg(dev->dev, "rx: going to wait for any tx to finish");
> retval = wait_event_interruptible(dev->rx_wait_queue, !dev->tx_active);
> - if(retval) /* wait was interrupted */
> - {
> + if (retval) /* wait was interrupted */ {
Normally we'd do it like this:
if (retval) { /* wait was interrupted */
But actually in this case the comment is very obvious and should just
be deleted. Kernel devs should have cscope set up so they can just
do `vim -t wait_event_interruptible` to find how wait_event_interruptible
works.
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel