Re: [PATCH RESEND] i2c: change return type to bool for i2c_check_functionality

From: Christophe JAILLET

Date: Sat Jun 06 2026 - 18:07:45 EST


Le 06/06/2026 à 23:29, Thorsten Blum a écrit :
Hi Wolfram,

On Mon, May 04, 2026 at 11:15:19AM +0200, Wolfram Sang wrote:
On Tue, Apr 21, 2026 at 06:16:09PM +0200, Thorsten Blum wrote:
i2c_check_functionality() returns a bool - change the return type from
int to bool and update the comment accordingly.

Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>

Basically OK but you need to fix the in-tree user first using the 'int'
behaviour [1]. I'd think you can send it with this patch as one series
and have it go in via the I2C tree, but Lee has to agree then.

[1] $ git grep 'i2c_check_functionality.*='

I think it should be git grep '=.*i2c_check_functionality'.


In linux-next [1] shows no more results and I believe all have been
converted.

Looks like:
drivers/gpu/drm/bridge/sii902x.c: ret = i2c_check_functionality(client->adapter,
drivers/media/i2c/isl7998x.c: ret = i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA);

need care.

CJ


Thanks,
Thorsten