2020-11-09 02:15:09

by Zou Wei

[permalink] [raw]
Subject: [PATCH -next] mmc: owl-mmc: use true and false for bool variables

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 <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
---
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


2020-11-17 11:53:35

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH -next] mmc: owl-mmc: use true and false for bool variables

On Mon, 9 Nov 2020 at 03:13, Zou Wei <[email protected]> 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 <[email protected]>
> Signed-off-by: Zou Wei <[email protected]>

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
>