lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1611128581-73345-1-git-send-email-abaci-bugfix@linux.alibaba.com>
Date:   Wed, 20 Jan 2021 15:43:01 +0800
From:   Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
To:     linus.walleij@...aro.org
Cc:     linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH] pinctrl: nomadik: Assign boolean values to a bool variable

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@...ux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ