Re: [PATCH] pinctrl: sprd: style: Simplify bool comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 12, 2021 at 4:28 PM YANG LI <abaci-bugfix@xxxxxxxxxxxxxxxxx> wrote:
>
> Fix the following coccicheck warning:
> ./drivers/pinctrl/sprd/pinctrl-sprd.c:690:8-23: WARNING: Comparison to
> bool
>
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Signed-off-by: YANG LI <abaci-bugfix@xxxxxxxxxxxxxxxxx>

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

> ---
>  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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux