Re: [PATCH] staging: qlge: Remove macro FILL_SEG

From: Simon Horman
Date: Wed Apr 05 2023 - 12:22:21 EST


On Wed, Apr 05, 2023 at 08:06:27AM -0700, Sumitra Sharma wrote:
> Remove macro FILL_SEG to fix the checkpatch warning:
>
> WARNING: Macros with flow control statements should be avoided
>
> Macros with flow control statements must be avoided as they
> break the flow of the calling function and make it harder to
> test the code.
>
> Replace all FILL_SEG() macro calls with:
>
> err = err || qlge_fill_seg_(...);

Perhaps I'm missing the point here.
But won't this lead to err always either being true or false (1 or 0).
Rather than the current arrangement where err can be
either 0 or a negative error value, such as -EINVAL.

...