Thread (4 messages) flat view 4 messages, 2 authors, 17d ago
COLD17d REVIEWED: 1 (1M)

1 review trailer.

[PATCH RESEND 2/2] i2c: Change return type to bool for i2c_check_functionality()

From: Thorsten Blum <blum@kernel.org>
Date: 2026-09-09 08:21:29
Also in: linux-i2c, linux-media
Subsystem: i2c subsystem, the rest · Maintainers: Andi Shyti, Linus Torvalds

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;
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help