[PATCH] pinctrl: nomadik: Assign boolean values to a bool variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@xxxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux