public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] i2c: change return type to bool for i2c_check_functionality
@ 2026-04-21 16:16 Thorsten Blum
  2026-04-22 12:29 ` Mukesh Savaliya
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-04-21 16:16 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Thorsten Blum, linux-i2c, linux-kernel

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;
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] i2c: change return type to bool for i2c_check_functionality
  2026-04-21 16:16 [PATCH RESEND] i2c: change return type to bool for i2c_check_functionality Thorsten Blum
@ 2026-04-22 12:29 ` Mukesh Savaliya
  0 siblings, 0 replies; 2+ messages in thread
From: Mukesh Savaliya @ 2026-04-22 12:29 UTC (permalink / raw)
  To: Thorsten Blum, Wolfram Sang; +Cc: linux-i2c, linux-kernel



On 4/21/2026 9:46 PM, 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@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;
>   }
> 

Acked-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-22 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-21 16:16 [PATCH RESEND] i2c: change return type to bool for i2c_check_functionality Thorsten Blum
2026-04-22 12:29 ` Mukesh Savaliya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox