[PATCH] pinctrl: qcom: spmi-gpio: 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/qcom/pinctrl-ssbi-gpio.c:340:3-15: WARNING:
Assignment of 0/1 to bool variable.

Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@xxxxxxxxxxxxxxxxx>
---
 drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
index b5949f7..eb0b60c 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
@@ -331,13 +331,13 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev,
 		case PIN_CONFIG_BIAS_DISABLE:
 			pin->bias = PM8XXX_GPIO_BIAS_NP;
 			banks |= BIT(2);
-			pin->disable = 0;
+			pin->disable = false;
 			banks |= BIT(3);
 			break;
 		case PIN_CONFIG_BIAS_PULL_DOWN:
 			pin->bias = PM8XXX_GPIO_BIAS_PD;
 			banks |= BIT(2);
-			pin->disable = 0;
+			pin->disable = false;
 			banks |= BIT(3);
 			break;
 		case PM8XXX_QCOM_PULL_UP_STRENGTH:
@@ -350,11 +350,11 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev,
 		case PIN_CONFIG_BIAS_PULL_UP:
 			pin->bias = pin->pull_up_strength;
 			banks |= BIT(2);
-			pin->disable = 0;
+			pin->disable = false;
 			banks |= BIT(3);
 			break;
 		case PIN_CONFIG_BIAS_HIGH_IMPEDANCE:
-			pin->disable = 1;
+			pin->disable = true;
 			banks |= BIT(3);
 			break;
 		case PIN_CONFIG_INPUT_ENABLE:
-- 
1.8.3.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux