linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: (applesmc) Assign boolean values to a bool variable
@ 2021-01-20  6:41 Jiapeng Zhong
  2021-01-21 19:32 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Zhong @ 2021-01-20  6:41 UTC (permalink / raw)
  To: rydberg; +Cc: jdelvare, linux, linux-hwmon, linux-kernel, Jiapeng Zhong

Fix the following coccicheck warnings:

./drivers/hwmon/applesmc.c:568:6-23: WARNING: Assignment of
0/1 to bool variable.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
 drivers/hwmon/applesmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 89207af..28b137e 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -565,7 +565,7 @@ static int applesmc_init_index(struct applesmc_registers *s)
 static int applesmc_init_smcreg_try(void)
 {
 	struct applesmc_registers *s = &smcreg;
-	bool left_light_sensor = 0, right_light_sensor = 0;
+	bool left_light_sensor = false, right_light_sensor = false;
 	unsigned int count;
 	u8 tmp[1];
 	int ret;
-- 
1.8.3.1


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

* Re: [PATCH] hwmon: (applesmc) Assign boolean values to a bool variable
  2021-01-20  6:41 [PATCH] hwmon: (applesmc) Assign boolean values to a bool variable Jiapeng Zhong
@ 2021-01-21 19:32 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-01-21 19:32 UTC (permalink / raw)
  To: Jiapeng Zhong; +Cc: rydberg, jdelvare, linux-hwmon, linux-kernel

On Wed, Jan 20, 2021 at 02:41:10PM +0800, Jiapeng Zhong wrote:
> Fix the following coccicheck warnings:
> 
> ./drivers/hwmon/applesmc.c:568:6-23: WARNING: Assignment of
> 0/1 to bool variable.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>

Applied.

Thanks,
Guenter

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

end of thread, other threads:[~2021-01-21 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  6:41 [PATCH] hwmon: (applesmc) Assign boolean values to a bool variable Jiapeng Zhong
2021-01-21 19:32 ` Guenter Roeck

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).