Re: [PATCH v3 4/4] staging: vchiq: stop explicitly comparing with zero to catch errors

From: Dan Carpenter
Date: Thu May 09 2019 - 10:43:23 EST


On Thu, May 09, 2019 at 04:31:36PM +0200, Nicolas Saenz Julienne wrote:
> The vchiq code tends to follow a coding pattern that's not accepted as
> per the Linux kernel coding style
>
> We have this:
> if (expression != 0)
>
> We want this:
> if (expression)
>
> We make an exception if the expression refers to a size, in which case
> it's accepted for the sake of clarity.

It's not really Linux kernel style, it's just my style... I wouldn't
have complained if the original code were consistent one way or the
other. But since I was encouraging you to pick a style and use it
consistently, then I'm always going to advocate my style... :P

Anyway, thanks! Looks good to me.

regards,
dan carpenter