From: Thorsten Blum <thorsten.blum@linux.dev>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH RESEND] i2c: change return type to bool for i2c_check_functionality
Date: Tue, 21 Apr 2026 18:16:09 +0200 [thread overview]
Message-ID: <20260421161607.61314-3-thorsten.blum@linux.dev> (raw)
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@linux.dev>
---
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 20fd41b51d5c..6737bcbc5d7a 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 reply other threads:[~2026-04-21 16:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 16:16 Thorsten Blum [this message]
2026-04-22 12:29 ` [PATCH RESEND] i2c: change return type to bool for i2c_check_functionality Mukesh Savaliya
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=20260421161607.61314-3-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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