From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9B2924E4C4 for ; Thu, 7 May 2026 13:47:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778161632; cv=none; b=UZ3KRVGm0fCV8e9oMpJs3k9//5EA2wu+Bh3q3RPA6tsI3H+UuSLkP8tpIdrRUgGAQbdYNxUhSgN8/xFl++hjMj21jQs2y2Qcplc1U4wzqKkMfzOfHpeyq4dhiOcPBSu7oa2pRlwuScnc5eW9kLyovlVwrgilguhwC0kNOUs83Cw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778161632; c=relaxed/simple; bh=1+q98mrBOflR8BccNzLyKrViBSYFLqAni/iMv6GshaA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S/1Bn77zYFJWEgeaMLoNJ/cwBWmJr2dSScKzNk9Ay3mQQpDCLG3tRVuhHyEsiCvhD/SqvNh97xysP098wkxd057F1hnjamaZaUTY7TzwVnUsgE6TTeQAZZhB3ZTC/0+ENmIRi4hUqy2xeNCQzev4Y+CHnj8E1KoiccY2gey2Ka4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Vrvfu+a9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Vrvfu+a9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E8DCC2BCB2; Thu, 7 May 2026 13:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778161632; bh=1+q98mrBOflR8BccNzLyKrViBSYFLqAni/iMv6GshaA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vrvfu+a9rAyNUtezb8O9d3rK99w0Vl9i+G7Lkg4tfhqNqRzYJbOqxDZDaE2+XSceA nL5k0chlf+W2UT2TPMtG9IS/n+JJWMnohJU+/Wn0AAQlBNAp0nnP6zgE+oycHQzJ6/ NCnuiI/st/8Y/5Vgm92tG9J/XYZCKAP86gDjHPBmFD+fVR+Y+nNvRdUGE2lONDAvRN ECVNHA/s8lJ+8XfDTFCAO+9bDZCyKtvLsYfPDsOY4yANs4p9UXOlF2kSrAPFTS/cjg tji1182X7Q/Bkt3ObUhnE2coK2WkSAcc4EYyYiiOWcLzaSFgK1szLr7xugRe5jB0gg 45/RTnhoptwqQ== Date: Thu, 7 May 2026 14:47:08 +0100 From: Lee Jones To: Thorsten Blum Cc: Andreas Werner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: menf21bmc: inline i2c_check_functionality check Message-ID: <20260507134708.GN305027@google.com> References: <20260428165800.590496-3-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260428165800.590496-3-thorsten.blum@linux.dev> 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. > Signed-off-by: Thorsten Blum > --- > drivers/mfd/menf21bmc.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/mfd/menf21bmc.c b/drivers/mfd/menf21bmc.c > index 1d36095155e0..0f24de516d72 100644 > --- a/drivers/mfd/menf21bmc.c > +++ b/drivers/mfd/menf21bmc.c > @@ -54,11 +54,9 @@ menf21bmc_probe(struct i2c_client *client) > int rev_major, rev_minor, rev_main; > int ret; > > - ret = i2c_check_functionality(client->adapter, > - I2C_FUNC_SMBUS_BYTE_DATA | > - I2C_FUNC_SMBUS_WORD_DATA | > - I2C_FUNC_SMBUS_BYTE); > - if (!ret) > + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA | > + I2C_FUNC_SMBUS_WORD_DATA | > + I2C_FUNC_SMBUS_BYTE)) > return -ENODEV; > > rev_major = i2c_smbus_read_word_data(client, BMC_CMD_REV_MAJOR); -- Lee Jones