Skip to contentSkip to conversation

pinctrl: sprd: style: Simplify bool comparison

PATCH Superseded YANG LI 3 participants 3 messages Jan 12, 2021 – Jan 18, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

YANG LI

author
#0 lore raw

PATCH 1/1 pinctrl: sprd: style: Simplify bool comparison

Fix the following coccicheck warning:
./drivers/pinctrl/sprd/pinctrl-sprd.c:690:8-23: WARNING: Comparison to bool

---
 drivers/pinctrl/sprd/pinctrl-sprd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sprd/pinctrl-sprd.c +1 -1
index 08dc193..dca7a50 100644
@@ -687,7 +687,7 @@ static int sprd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin_id,
 				shift = INPUT_SCHMITT_SHIFT;
 				break;
 			case PIN_CONFIG_BIAS_PULL_UP:
-				if (is_sleep_config == true) {
+				if (is_sleep_config) {
 					val |= SLEEP_PULL_UP;
 					mask = SLEEP_PULL_UP_MASK;
 					shift = SLEEP_PULL_UP_SHIFT;
Signature · 1 line
1.8.3.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · YANG LI

Fix the following coccicheck warning:
./drivers/pinctrl/sprd/pinctrl-sprd.c:690:8-23: WARNING: Comparison to bool

The subject line should be "pinctrl: sprd: Simplify xxx", otherwise

Quoted 20 lines
---
 drivers/pinctrl/sprd/pinctrl-sprd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sprd/pinctrl-sprd.c +1 -2
index 08dc193..dca7a50 100644
@@ -687,7 +687,7 @@ static int sprd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin_id,
                                shift = INPUT_SCHMITT_SHIFT;
                                break;
                        case PIN_CONFIG_BIAS_PULL_UP:
-                               if (is_sleep_config == true) {
+                               if (is_sleep_config) {
                                        val |= SLEEP_PULL_UP;
                                        mask = SLEEP_PULL_UP_MASK;
                                        shift = SLEEP_PULL_UP_SHIFT;
--

1.8.3.1

Signature · 1 line
Baolin Wang