linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: sprd: style: Simplify bool comparison
@ 2021-01-12  8:28 YANG LI
  2021-01-13  1:55 ` Baolin Wang
  2021-01-18 13:42 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: YANG LI @ 2021-01-12  8:28 UTC (permalink / raw)
  To: linus.walleij
  Cc: orsonzhai, baolin.wang7, zhang.lyra, linhua.xu, 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>
---
 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] 3+ messages in thread

* Re: [PATCH] pinctrl: sprd: style: Simplify bool comparison
  2021-01-12  8:28 [PATCH] pinctrl: sprd: style: Simplify bool comparison YANG LI
@ 2021-01-13  1:55 ` Baolin Wang
  2021-01-18 13:42 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Baolin Wang @ 2021-01-13  1:55 UTC (permalink / raw)
  To: YANG LI
  Cc: Linus Walleij, Orson Zhai, Chunyan Zhang, linhua.xu, linux-gpio, LKML

On Tue, Jan 12, 2021 at 4:28 PM 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>

The subject line should be "pinctrl: sprd: Simplify xxx", otherwise
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>

> ---
>  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] 3+ messages in thread

* Re: [PATCH] pinctrl: sprd: style: Simplify bool comparison
  2021-01-12  8:28 [PATCH] pinctrl: sprd: style: Simplify bool comparison YANG LI
  2021-01-13  1:55 ` Baolin Wang
@ 2021-01-18 13:42 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2021-01-18 13:42 UTC (permalink / raw)
  To: YANG LI
  Cc: Orson Zhai, Baolin Wang, Lyra Zhang, linhua.xu,
	open list:GPIO SUBSYSTEM, linux-kernel

On Tue, Jan 12, 2021 at 9:28 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>

Patch applied, fixing subject as indicated by Baolin.

First fix I get from Alibabas robot :)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-18 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12  8:28 [PATCH] pinctrl: sprd: style: Simplify bool comparison YANG LI
2021-01-13  1:55 ` Baolin Wang
2021-01-18 13:42 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).