linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mmc: owl-mmc: use true and false for bool variables
@ 2020-11-09  2:25 Zou Wei
  2020-11-17 11:49 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Zou Wei @ 2020-11-09  2:25 UTC (permalink / raw)
  To: ulf.hansson, afaerber, manivannan.sadhasivam
  Cc: linux-mmc, linux-arm-kernel, linux-kernel, Zou Wei

Fix coccicheck warnings:

./owl-mmc.c:524:2-18: WARNING: Assignment of 0/1 to bool variable
./owl-mmc.c:528:2-18: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 drivers/mmc/host/owl-mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c
index 82d2bad..53b81582 100644
--- a/drivers/mmc/host/owl-mmc.c
+++ b/drivers/mmc/host/owl-mmc.c
@@ -521,11 +521,11 @@ static void owl_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 
 	/* Enable DDR mode if requested */
 	if (ios->timing == MMC_TIMING_UHS_DDR50) {
-		owl_host->ddr_50 = 1;
+		owl_host->ddr_50 = true;
 		owl_mmc_update_reg(owl_host->base + OWL_REG_SD_EN,
 			       OWL_SD_EN_DDREN, true);
 	} else {
-		owl_host->ddr_50 = 0;
+		owl_host->ddr_50 = false;
 	}
 }
 
-- 
2.6.2


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

* Re: [PATCH -next] mmc: owl-mmc: use true and false for bool variables
  2020-11-09  2:25 [PATCH -next] mmc: owl-mmc: use true and false for bool variables Zou Wei
@ 2020-11-17 11:49 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2020-11-17 11:49 UTC (permalink / raw)
  To: Zou Wei
  Cc: Andreas Färber, Manivannan Sadhasivam, linux-mmc, Linux ARM,
	Linux Kernel Mailing List

On Mon, 9 Nov 2020 at 03:13, Zou Wei <zou_wei@huawei.com> wrote:
>
> Fix coccicheck warnings:
>
> ./owl-mmc.c:524:2-18: WARNING: Assignment of 0/1 to bool variable
> ./owl-mmc.c:528:2-18: WARNING: Assignment of 0/1 to bool variable
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/owl-mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c
> index 82d2bad..53b81582 100644
> --- a/drivers/mmc/host/owl-mmc.c
> +++ b/drivers/mmc/host/owl-mmc.c
> @@ -521,11 +521,11 @@ static void owl_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>
>         /* Enable DDR mode if requested */
>         if (ios->timing == MMC_TIMING_UHS_DDR50) {
> -               owl_host->ddr_50 = 1;
> +               owl_host->ddr_50 = true;
>                 owl_mmc_update_reg(owl_host->base + OWL_REG_SD_EN,
>                                OWL_SD_EN_DDREN, true);
>         } else {
> -               owl_host->ddr_50 = 0;
> +               owl_host->ddr_50 = false;
>         }
>  }
>
> --
> 2.6.2
>

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

end of thread, other threads:[~2020-11-17 11:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09  2:25 [PATCH -next] mmc: owl-mmc: use true and false for bool variables Zou Wei
2020-11-17 11:49 ` Ulf Hansson

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