From: Michal Simek <michal.simek@amd.com>
To: Ashok Reddy Soma <ashok.reddy.soma@amd.com>, <u-boot@lists.denx.de>
Cc: <peng.fan@nxp.com>, <jh80.chung@samsung.com>,
Algapally Santosh Sagar <santoshsagar.algapally@amd.com>
Subject: Re: [PATCH 4/4] drivers: mmc: Change datatype to fix a warning
Date: Fri, 6 Jan 2023 13:41:19 +0100 [thread overview]
Message-ID: <3a1697d2-54c7-dff0-b149-e14f31c06e65@amd.com> (raw)
In-Reply-To: <20230106120035.2183-5-ashok.reddy.soma@amd.com>
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@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@amd.com>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@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__);
>
next prev parent reply other threads:[~2023-01-06 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 12:00 [PATCH 0/4] Fix sparse warnings Ashok Reddy Soma
2023-01-06 12:00 ` [PATCH 1/4] xilinx: common: Add missing prototype for board_get_usable_ram_top Ashok Reddy Soma
2023-01-06 12:44 ` Michal Simek
2023-01-06 12:00 ` [PATCH 2/4] gpio: zynqmp: Remove unused variable ret Ashok Reddy Soma
2023-01-06 12:42 ` Michal Simek
2023-01-06 12:00 ` [PATCH 3/4] xilinx: versal: Add missing prototype Ashok Reddy Soma
2023-01-06 12:38 ` Michal Simek
2023-01-06 12:00 ` [PATCH 4/4] drivers: mmc: Change datatype to fix a warning Ashok Reddy Soma
2023-01-06 12:41 ` Michal Simek [this message]
2023-01-06 12:45 ` [PATCH 0/4] Fix sparse warnings Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a1697d2-54c7-dff0-b149-e14f31c06e65@amd.com \
--to=michal.simek@amd.com \
--cc=ashok.reddy.soma@amd.com \
--cc=jh80.chung@samsung.com \
--cc=peng.fan@nxp.com \
--cc=santoshsagar.algapally@amd.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox