From: Thorsten Blum <blum@kernel.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Andi Shyti <andi.shyti@kernel.org>
Cc: linux-media@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, Thorsten Blum <blum@kernel.org>,
Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
Subject: [PATCH RESEND 2/2] i2c: Change return type to bool for i2c_check_functionality()
Date: Wed, 9 Sep 2026 10:20:56 +0200 [thread overview]
Message-ID: <20260909082053.410739-5-blum@kernel.org> (raw)
In-Reply-To: <20260909082053.410739-4-blum@kernel.org>
i2c_check_functionality() returns a bool - change the return type from
int to bool and update the comment accordingly.
Signed-off-by: Thorsten Blum <blum@kernel.org>
Acked-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
---
include/linux/i2c.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 14ab4d3055af..4af2df969a05 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -919,8 +919,8 @@ static inline u32 i2c_get_functionality(struct i2c_adapter *adap)
return adap->algo->functionality(adap);
}
-/* Return 1 if adapter supports everything we need, 0 if not. */
-static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func)
+/* Return true if adapter supports everything we need, false if not. */
+static inline bool i2c_check_functionality(struct i2c_adapter *adap, u32 func)
{
return (func & i2c_get_functionality(adap)) == func;
}
next prev parent reply other threads:[~2026-09-09 8:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 8:20 [PATCH RESEND 1/2] media: i2c: isl7998x: Inline i2c_check_functionality() check Thorsten Blum
2026-09-09 8:20 ` Thorsten Blum [this message]
2026-09-09 16:31 ` [PATCH RESEND 2/2] i2c: Change return type to bool for i2c_check_functionality() Andi Shyti
2026-09-09 16:58 ` Thorsten Blum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260909082053.410739-5-blum@kernel.org \
--to=blum@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mukesh.savaliya@oss.qualcomm.com \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®