Re: [PATCH] staging: greybus: remove unnecessary parentheses

From: Alex Elder
Date: Thu Jan 09 2025 - 09:55:09 EST


On 1/9/25 1:45 AM, Dan Carpenter wrote:
On Wed, Jan 08, 2025 at 08:56:50PM -0600, Alex Elder wrote:
On 1/8/25 6:36 PM, Will Walsh wrote:
Unnecessary parentheses in boolean comparisons make it harder to read.

Removed the extra parentheses on line 305 for code readability.

Signed-off-by: Will Walsh <iron.will.walsh@xxxxxxxxx>

I'm not sure this makes a big difference in readability but I
personally avoid extra parentheses unless adding them makes a
compiler warning go away.

It's not a compiler warning, it checkpatch.

I meant compiler "-Wparentheses" warnings, like "suggest
parentheses around ‘+’ inside ‘<<’".

But anyway, I have no problem with this being rejected,
it doesn't really add value, and to some, it subtracts.

-Alex


regards,
dan carpenter