[PATCH 4/4] drivers: mmc: Change datatype to fix a warning
Michal Simek
michal.simek at amd.com
Fri Jan 6 13:41:19 CET 2023
mmc: zynq_sdhci: Fix wrong tuning_loop_counter datatype
On 1/6/23 13:00, Ashok Reddy Soma wrote:
> From: Algapally Santosh Sagar <santoshsagar.algapally at amd.com>
>
> tuning_loop_counter is of char type. Change to int to fix below warning.
> warning: comparison is always false due to limited range of data type.
Conceptually description should be done a way that you say I fixed this issue
because datatype wasn't correct.
And this was reported by spare.
And you are doing it because it is not correct not because there is a warning.
Warning just points to it.
M
>
> Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally at amd.com>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma at amd.com>
> ---
>
> drivers/mmc/zynq_sdhci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
> index 7dcf6ad842..be4075c97a 100644
> --- a/drivers/mmc/zynq_sdhci.c
> +++ b/drivers/mmc/zynq_sdhci.c
> @@ -249,7 +249,7 @@ static int arasan_sdhci_execute_tuning(struct mmc *mmc, u8 opcode)
> u32 ctrl;
> struct sdhci_host *host;
> struct arasan_sdhci_priv *priv = dev_get_priv(mmc->dev);
> - char tuning_loop_counter = SDHCI_TUNING_LOOP_COUNT;
> + int tuning_loop_counter = SDHCI_TUNING_LOOP_COUNT;
>
> dev_dbg(mmc->dev, "%s\n", __func__);
>
More information about the U-Boot
mailing list