* [PATCH] hwmon: abx500: style: Simplify bool comparison
@ 2021-01-11 9:52 YANG LI
2021-01-21 19:29 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: YANG LI @ 2021-01-11 9:52 UTC (permalink / raw)
To: jdelvare; +Cc: linux, linux-hwmon, linux-kernel, YANG LI
Fix the following coccicheck warning:
./drivers/hwmon/abx500.c:84:8-26: WARNING: Comparison to bool
Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci Robot<abaci@linux.alibaba.com>
---
drivers/hwmon/abx500.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c
index 4b96488..3879b13 100644
--- a/drivers/hwmon/abx500.c
+++ b/drivers/hwmon/abx500.c
@@ -81,7 +81,7 @@ static void gpadc_monitor(struct work_struct *work)
if (data->min[i] != 0) {
if (temp < data->min[i]) {
- if (data->min_alarm[i] == false) {
+ if (!data->min_alarm[i]) {
data->min_alarm[i] = true;
updated_min_alarm = true;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hwmon: abx500: style: Simplify bool comparison
2021-01-11 9:52 [PATCH] hwmon: abx500: style: Simplify bool comparison YANG LI
@ 2021-01-21 19:29 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-01-21 19:29 UTC (permalink / raw)
To: YANG LI; +Cc: jdelvare, linux-hwmon, linux-kernel
On Mon, Jan 11, 2021 at 05:52:09PM +0800, YANG LI wrote:
> Fix the following coccicheck warning:
> ./drivers/hwmon/abx500.c:84:8-26: WARNING: Comparison to bool
>
> Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
> Reported-by: Abaci Robot<abaci@linux.alibaba.com>
This driver will be removed in v5.11.
Guenter
> ---
> drivers/hwmon/abx500.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c
> index 4b96488..3879b13 100644
> --- a/drivers/hwmon/abx500.c
> +++ b/drivers/hwmon/abx500.c
> @@ -81,7 +81,7 @@ static void gpadc_monitor(struct work_struct *work)
>
> if (data->min[i] != 0) {
> if (temp < data->min[i]) {
> - if (data->min_alarm[i] == false) {
> + if (!data->min_alarm[i]) {
> data->min_alarm[i] = true;
> updated_min_alarm = true;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-21 19:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-11 9:52 [PATCH] hwmon: abx500: style: Simplify bool comparison YANG LI
2021-01-21 19:29 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox