linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: powermac: use true,false for bool variable
@ 2020-04-26  9:42 Jason Yan
  2020-04-30 14:19 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-26  9:42 UTC (permalink / raw)
  To: mpe, benh, paulus, wsa, linux-i2c, linuxppc-dev, linux-kernel; +Cc: Jason Yan

In i2c_powermac_register_devices(), variable 'found_onyx' is bool and
assigned '0' and 'true' in different places. Use 'false' instead of '0'.
This fixes the following coccicheck warning:

drivers/i2c/busses/i2c-powermac.c:318:6-16: WARNING: Assignment of 0/1
to bool variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/i2c/busses/i2c-powermac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index d565714c1f13..00a6fd42c1ae 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -315,7 +315,7 @@ static void i2c_powermac_register_devices(struct i2c_adapter *adap,
 {
 	struct i2c_client *newdev;
 	struct device_node *node;
-	bool found_onyx = 0;
+	bool found_onyx = false;
 
 	/*
 	 * In some cases we end up with the via-pmu node itself, in this
-- 
2.21.1


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

* Re: [PATCH] i2c: powermac: use true,false for bool variable
  2020-04-26  9:42 [PATCH] i2c: powermac: use true,false for bool variable Jason Yan
@ 2020-04-30 14:19 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2020-04-30 14:19 UTC (permalink / raw)
  To: Jason Yan; +Cc: mpe, benh, paulus, linux-i2c, linuxppc-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

On Sun, Apr 26, 2020 at 05:42:28PM +0800, Jason Yan wrote:
> In i2c_powermac_register_devices(), variable 'found_onyx' is bool and
> assigned '0' and 'true' in different places. Use 'false' instead of '0'.
> This fixes the following coccicheck warning:
> 
> drivers/i2c/busses/i2c-powermac.c:318:6-16: WARNING: Assignment of 0/1
> to bool variable
> 
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-04-30 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-26  9:42 [PATCH] i2c: powermac: use true,false for bool variable Jason Yan
2020-04-30 14:19 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).