Re: [PATCH] staging: lustre: o2iblnd: fix misleading indentation

From: Dan Carpenter
Date: Thu Oct 22 2015 - 15:48:44 EST


On Wed, Oct 21, 2015 at 06:40:40PM +0100, Luis de Bethencourt wrote:
> The code is correct, the indentation is misleading. Only the the return rc
> is part of the conditional statement if rc != 0.
>
> Fix a smatch warning:
> drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2157
> kiblnd_hdev_setup_mrs() warn: curly braces intended?
>
> Signed-off-by: Luis de Bethencourt <luisbg@xxxxxxxxxxxxxxx>
> ---
>
> Hi,
>
> This patch gives a warning in checkpatch.pl for the line:
> if (hdev->ibh_mrs == NULL)
>
> It would be cleaner if this was 'if (!hdev->ibh_mrs)' instead. I didn't fix
> this as well because the file has 41 instances of comparisons with NULL. I
> would be happy to do so in a patch in reply to this one if it would be good.
>

You did the right thing. One thing per patch.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/