* [PATCH v2] pinctrl: sprd: Simplify bool comparison
@ 2021-01-13 3:43 Yang Li
2021-01-14 4:53 ` Baolin Wang
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-01-13 3:43 UTC (permalink / raw)
To: baolin.wang7
Cc: orsonzhai, linus.walleij, zhang.lyra, linux-gpio, linux-kernel, Yang Li
Fix the following coccicheck warning:
./drivers/pinctrl/sprd/pinctrl-sprd.c:690:8-23: WARNING: Comparison to
bool
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
---
Changes in v2:
- make "pinctrl: sprd:" as subject prefix
drivers/pinctrl/sprd/pinctrl-sprd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c
index 08dc193..dca7a50 100644
--- a/drivers/pinctrl/sprd/pinctrl-sprd.c
+++ b/drivers/pinctrl/sprd/pinctrl-sprd.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] pinctrl: sprd: Simplify bool comparison
2021-01-13 3:43 [PATCH v2] pinctrl: sprd: Simplify bool comparison Yang Li
@ 2021-01-14 4:53 ` Baolin Wang
0 siblings, 0 replies; 2+ messages in thread
From: Baolin Wang @ 2021-01-14 4:53 UTC (permalink / raw)
To: Yang Li; +Cc: Orson Zhai, Linus Walleij, Chunyan Zhang, linux-gpio, LKML
On Wed, Jan 13, 2021 at 11:43 AM Yang Li <abaci-bugfix@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warning:
> ./drivers/pinctrl/sprd/pinctrl-sprd.c:690:8-23: WARNING: Comparison to
> bool
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
You should keep other guy's reviewed-by or acked-by tag for the
following version if no other big changes. So again
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
> ---
> Changes in v2:
> - make "pinctrl: sprd:" as subject prefix
>
> drivers/pinctrl/sprd/pinctrl-sprd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c
> index 08dc193..dca7a50 100644
> --- a/drivers/pinctrl/sprd/pinctrl-sprd.c
> +++ b/drivers/pinctrl/sprd/pinctrl-sprd.c
> @@ -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
>
--
Baolin Wang
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-14 4:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 3:43 [PATCH v2] pinctrl: sprd: Simplify bool comparison Yang Li
2021-01-14 4:53 ` Baolin Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.