[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFpV55EErFRXQO=W=yvu-W7R1Q3GAouCYZAr=-59kuouzg@mail.gmail.com>
Date: Wed, 13 Jan 2021 12:14:32 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: YANG LI <abaci-bugfix@...ux.alibaba.com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
linux-omap <linux-omap@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] host: omap_hsmmc: style: Simplify bool comparison
On Mon, 11 Jan 2021 at 10:46, YANG LI <abaci-bugfix@...ux.alibaba.com> wrote:
>
> Fix the following coccicheck warning:
> ./drivers/mmc/host/omap_hsmmc.c:297:6-25: WARNING: Comparison of 0/1 to
> bool variable
If you really want this change, I prefer if you can clean up all use
of "pbias_enabled" - and at the same time, do the same clean up for
"vqmmc_enabled".
Kind regards
Uffe
>
> Signed-off-by: YANG LI <abaci-bugfix@...ux.alibaba.com>
> Reported-by: Abaci Robot<abaci@...ux.alibaba.com>
> ---
> drivers/mmc/host/omap_hsmmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index aa9cc49..91a0760 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -294,7 +294,7 @@ static int omap_hsmmc_set_pbias(struct omap_hsmmc_host *host, bool power_on)
> host->pbias_enabled = 1;
> }
> } else {
> - if (host->pbias_enabled == 1) {
> + if (host->pbias_enabled) {
> ret = regulator_disable(host->pbias);
> if (ret) {
> dev_err(host->dev, "pbias reg disable fail\n");
> --
> 1.8.3.1
>
Powered by blists - more mailing lists