Re: [PATCH] mfd: menf21bmc: inline i2c_check_functionality check

From: Thorsten Blum

Date: Thu May 07 2026 - 10:17:10 EST


Hi Lee,

On Thu, May 07, 2026 at 02:47:08PM +0100, Lee Jones wrote:
> On Tue, 28 Apr 2026, Thorsten Blum wrote:
>
> > Inline the i2c_check_functionality() check, since the function returns a
> > boolean status rather than an error code.
>
> This my well be a personal thing, but I don't generally like functions
> being stuffed into if () statements. So this one is a no I'm afraid.
> Please leave it as it is.

Wolfram (cc'ed) asked me to change the call sites before applying this
patch:

https://lore.kernel.org/lkml/20260421161607.61314-3-thorsten.blum@xxxxxxxxx/

Also, nearly all i2c_check_functionality() call sites already use it as
a boolean value. There are only 2-3 call sites left where it's still
used as an int.

Should I send a v2 with a local bool variable, or would you reconsider
inlining it?

Thanks,
Thorsten