linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] mmc: use true,false for bool variable
@ 2019-12-24  7:32 zhengbin
  2019-12-24  7:32 ` [PATCH 1/6] mmc: core: " zhengbin
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zhengbin @ 2019-12-24  7:32 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc, linux-kernel; +Cc: zhengbin13

zhengbin (6):
  mmc: core: use true,false for bool variable
  mmc: sdhci-tegra: use true,false for bool variable
  mmc: sdhci-msm: use true,false for bool variable
  mmc: omap_hsmmc: use true,false for bool variable
  mmc: davinci: use true,false for bool variable
  mmc: owl: use true,false for bool variable

 drivers/mmc/core/core.c        | 2 +-
 drivers/mmc/host/davinci_mmc.c | 6 +++---
 drivers/mmc/host/omap_hsmmc.c  | 6 +++---
 drivers/mmc/host/owl-mmc.c     | 4 ++--
 drivers/mmc/host/sdhci-msm.c   | 4 ++--
 drivers/mmc/host/sdhci-tegra.c | 2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

--
2.7.4


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

* [PATCH 1/6] mmc: core: use true,false for bool variable
  2019-12-24  7:32 [PATCH 0/6] mmc: use true,false for bool variable zhengbin
@ 2019-12-24  7:32 ` zhengbin
  2019-12-24  7:32 ` [PATCH 2/6] mmc: sdhci-tegra: " zhengbin
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zhengbin @ 2019-12-24  7:32 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/mmc/core/core.c:60:5-16: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/mmc/core/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index abf8f5e..be06320 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -57,7 +57,7 @@ static const unsigned freqs[] = { 400000, 300000, 200000, 100000 };
  * performance cost, and for other reasons may not always be desired.
  * So we allow it it to be disabled.
  */
-bool use_spi_crc = 1;
+bool use_spi_crc = true;
 module_param(use_spi_crc, bool, 0);

 static int mmc_schedule_delayed_work(struct delayed_work *work,
--
2.7.4


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

* [PATCH 2/6] mmc: sdhci-tegra: use true,false for bool variable
  2019-12-24  7:32 [PATCH 0/6] mmc: use true,false for bool variable zhengbin
  2019-12-24  7:32 ` [PATCH 1/6] mmc: core: " zhengbin
@ 2019-12-24  7:32 ` zhengbin
  2019-12-24  7:32 ` [PATCH 3/6] mmc: sdhci-msm: " zhengbin
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zhengbin @ 2019-12-24  7:32 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/mmc/host/sdhci-tegra.c:241:6-19: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/mmc/host/sdhci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 7bc9505..af91250 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -238,7 +238,7 @@ static bool tegra_sdhci_configure_card_clk(struct sdhci_host *host, bool enable)

 static void tegra210_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
 {
-	bool is_tuning_cmd = 0;
+	bool is_tuning_cmd = false;
 	bool clk_enabled;
 	u8 cmd;

--
2.7.4


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

* [PATCH 3/6] mmc: sdhci-msm: use true,false for bool variable
  2019-12-24  7:32 [PATCH 0/6] mmc: use true,false for bool variable zhengbin
  2019-12-24  7:32 ` [PATCH 1/6] mmc: core: " zhengbin
  2019-12-24  7:32 ` [PATCH 2/6] mmc: sdhci-tegra: " zhengbin
@ 2019-12-24  7:32 ` zhengbin
  2019-12-24  7:32 ` [PATCH 4/6] mmc: omap_hsmmc: " zhengbin
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zhengbin @ 2019-12-24  7:32 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/mmc/host/sdhci-msm.c:1498:1-23: WARNING: Assignment of 0/1 to bool variable
drivers/mmc/host/sdhci-msm.c:1611:2-24: WARNING: Assignment of 0/1 to bool variable

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

diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 71f29ba..91f7ad7 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -1495,7 +1495,7 @@ static irqreturn_t sdhci_msm_pwr_irq(int irq, void *data)
 	struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);

 	sdhci_msm_handle_pwr_irq(host, irq);
-	msm_host->pwr_irq_flag = 1;
+	msm_host->pwr_irq_flag = true;
 	sdhci_msm_complete_pwr_irq_wait(msm_host);


@@ -1608,7 +1608,7 @@ static int __sdhci_msm_check_write(struct sdhci_host *host, u16 val, int reg)
 	}

 	if (req_type) {
-		msm_host->pwr_irq_flag = 0;
+		msm_host->pwr_irq_flag = false;
 		/*
 		 * Since this register write may trigger a power irq, ensure
 		 * all previous register writes are complete by this point.
--
2.7.4


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

* [PATCH 4/6] mmc: omap_hsmmc: use true,false for bool variable
  2019-12-24  7:32 [PATCH 0/6] mmc: use true,false for bool variable zhengbin
                   ` (2 preceding siblings ...)
  2019-12-24  7:32 ` [PATCH 3/6] mmc: sdhci-msm: " zhengbin
@ 2019-12-24  7:32 ` zhengbin
  2019-12-24  7:32 ` [PATCH 5/6] mmc: davinci: " zhengbin
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zhengbin @ 2019-12-24  7:32 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/mmc/host/omap_hsmmc.c:294:3-22: WARNING: Assignment of 0/1 to bool variable
drivers/mmc/host/omap_hsmmc.c:303:3-22: WARNING: Assignment of 0/1 to bool variable
drivers/mmc/host/omap_hsmmc.c:1866:1-20: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/mmc/host/omap_hsmmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index a379c45..ce2a929 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -291,7 +291,7 @@ static int omap_hsmmc_set_pbias(struct omap_hsmmc_host *host, bool power_on)
 				dev_err(host->dev, "pbias reg enable fail\n");
 				return ret;
 			}
-			host->pbias_enabled = 1;
+			host->pbias_enabled = true;
 		}
 	} else {
 		if (host->pbias_enabled == 1) {
@@ -300,7 +300,7 @@ static int omap_hsmmc_set_pbias(struct omap_hsmmc_host *host, bool power_on)
 				dev_err(host->dev, "pbias reg disable fail\n");
 				return ret;
 			}
-			host->pbias_enabled = 0;
+			host->pbias_enabled = false;
 		}
 	}

@@ -1863,7 +1863,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 	host->base	= base + pdata->reg_offset;
 	host->power_mode = MMC_POWER_OFF;
 	host->next_data.cookie = 1;
-	host->pbias_enabled = 0;
+	host->pbias_enabled = false;
 	host->vqmmc_enabled = 0;

 	platform_set_drvdata(pdev, host);
--
2.7.4


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

* [PATCH 5/6] mmc: davinci: use true,false for bool variable
  2019-12-24  7:32 [PATCH 0/6] mmc: use true,false for bool variable zhengbin
                   ` (3 preceding siblings ...)
  2019-12-24  7:32 ` [PATCH 4/6] mmc: omap_hsmmc: " zhengbin
@ 2019-12-24  7:32 ` zhengbin
  2019-12-24  7:32 ` [PATCH 6/6] mmc: owl: " zhengbin
  2020-01-16 14:39 ` [PATCH 0/6] mmc: " Ulf Hansson
  6 siblings, 0 replies; 8+ messages in thread
From: zhengbin @ 2019-12-24  7:32 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/mmc/host/davinci_mmc.c:480:1-13: WARNING: Assignment of 0/1 to bool variable
drivers/mmc/host/davinci_mmc.c:607:1-13: WARNING: Assignment of 0/1 to bool variable
drivers/mmc/host/davinci_mmc.c:1270:3-16: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/mmc/host/davinci_mmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index f01fecd..fe94907 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -477,7 +477,7 @@ static int mmc_davinci_start_dma_transfer(struct mmc_davinci_host *host,
 		}
 	}

-	host->do_dma = 1;
+	host->do_dma = true;
 	ret = mmc_davinci_send_dma_request(host, data);

 	return ret;
@@ -604,7 +604,7 @@ static void mmc_davinci_request(struct mmc_host *mmc, struct mmc_request *req)
 		return;
 	}

-	host->do_dma = 0;
+	host->do_dma = false;
 	mmc_davinci_prepare_data(host, req);
 	mmc_davinci_start_command(host, req->cmd);
 }
@@ -1267,7 +1267,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev)
 		if (ret == -EPROBE_DEFER)
 			goto dma_probe_defer;
 		else if (ret)
-			host->use_dma = 0;
+			host->use_dma = false;
 	}

 	mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
--
2.7.4


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

* [PATCH 6/6] mmc: owl: use true,false for bool variable
  2019-12-24  7:32 [PATCH 0/6] mmc: use true,false for bool variable zhengbin
                   ` (4 preceding siblings ...)
  2019-12-24  7:32 ` [PATCH 5/6] mmc: davinci: " zhengbin
@ 2019-12-24  7:32 ` zhengbin
  2020-01-16 14:39 ` [PATCH 0/6] mmc: " Ulf Hansson
  6 siblings, 0 replies; 8+ messages in thread
From: zhengbin @ 2019-12-24  7:32 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/mmc/host/owl-mmc.c:519:2-18: WARNING: Assignment of 0/1 to bool variable
drivers/mmc/host/owl-mmc.c:523:2-18: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@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 771e3d0..d3b1653 100644
--- a/drivers/mmc/host/owl-mmc.c
+++ b/drivers/mmc/host/owl-mmc.c
@@ -516,11 +516,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.7.4


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

* Re: [PATCH 0/6] mmc: use true,false for bool variable
  2019-12-24  7:32 [PATCH 0/6] mmc: use true,false for bool variable zhengbin
                   ` (5 preceding siblings ...)
  2019-12-24  7:32 ` [PATCH 6/6] mmc: owl: " zhengbin
@ 2020-01-16 14:39 ` Ulf Hansson
  6 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2020-01-16 14:39 UTC (permalink / raw)
  To: zhengbin; +Cc: linux-mmc, Linux Kernel Mailing List

On Tue, 24 Dec 2019 at 08:25, zhengbin <zhengbin13@huawei.com> wrote:
>
> zhengbin (6):
>   mmc: core: use true,false for bool variable
>   mmc: sdhci-tegra: use true,false for bool variable
>   mmc: sdhci-msm: use true,false for bool variable
>   mmc: omap_hsmmc: use true,false for bool variable
>   mmc: davinci: use true,false for bool variable
>   mmc: owl: use true,false for bool variable
>
>  drivers/mmc/core/core.c        | 2 +-
>  drivers/mmc/host/davinci_mmc.c | 6 +++---
>  drivers/mmc/host/omap_hsmmc.c  | 6 +++---
>  drivers/mmc/host/owl-mmc.c     | 4 ++--
>  drivers/mmc/host/sdhci-msm.c   | 4 ++--
>  drivers/mmc/host/sdhci-tegra.c | 2 +-
>  6 files changed, 12 insertions(+), 12 deletions(-)
>
> --
> 2.7.4
>

This is silly, it doesn't improve anything. So, no thanks!

Kind regards
Uffe

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

end of thread, other threads:[~2020-01-16 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-24  7:32 [PATCH 0/6] mmc: use true,false for bool variable zhengbin
2019-12-24  7:32 ` [PATCH 1/6] mmc: core: " zhengbin
2019-12-24  7:32 ` [PATCH 2/6] mmc: sdhci-tegra: " zhengbin
2019-12-24  7:32 ` [PATCH 3/6] mmc: sdhci-msm: " zhengbin
2019-12-24  7:32 ` [PATCH 4/6] mmc: omap_hsmmc: " zhengbin
2019-12-24  7:32 ` [PATCH 5/6] mmc: davinci: " zhengbin
2019-12-24  7:32 ` [PATCH 6/6] mmc: owl: " zhengbin
2020-01-16 14:39 ` [PATCH 0/6] mmc: " 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).