* [PATCH] pinctrl: nomadik: Assign boolean values to a bool variable
@ 2021-01-20 7:43 Jiapeng Zhong
0 siblings, 0 replies; only message in thread
From: Jiapeng Zhong @ 2021-01-20 7:43 UTC (permalink / raw)
To: linus.walleij; +Cc: linux-arm-kernel, linux-gpio, linux-kernel, Jiapeng Zhong
Fix the following coccicheck warnings:
./drivers/pinctrl/nomadik/pinctrl-nomadik.c:1397:6-16: WARNING:
Assignment of 0/1 to bool variable.
./drivers/pinctrl/nomadik/pinctrl-nomadik.c:1380:4-14: WARNING:
Assignment of 0/1 to bool variable.
./drivers/pinctrl/nomadik/pinctrl-nomadik.c:1370:6-16: 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/pinctrl/nomadik/pinctrl-nomadik.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
index d4ea108..770cbf7 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -1367,7 +1367,7 @@ static const char *nmk_find_pin_name(struct pinctrl_dev *pctldev, const char *pi
static bool nmk_pinctrl_dt_get_config(struct device_node *np,
unsigned long *configs)
{
- bool has_config = 0;
+ bool has_config = false;
unsigned long cfg = 0;
int i, val, ret;
@@ -1377,7 +1377,7 @@ static bool nmk_pinctrl_dt_get_config(struct device_node *np,
if (ret != -EINVAL) {
if (nmk_dt_pin_config(i, val, &cfg) == 0) {
*configs |= cfg;
- has_config = 1;
+ has_config = true;
}
}
}
@@ -1394,7 +1394,7 @@ static int nmk_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
int ret;
const char *function = NULL;
unsigned long configs = 0;
- bool has_config = 0;
+ bool has_config = false;
struct property *prop;
struct device_node *np_config;
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-20 7:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-20 7:43 [PATCH] pinctrl: nomadik: Assign boolean values to a bool variable Jiapeng Zhong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox