[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ece430b5-fa6b-4ad0-adfd-73778bae539b@intel.com>
Date: Wed, 30 Oct 2024 15:07:52 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Victor Shih <victorshihgli@...il.com>, ulf.hansson@...aro.org
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
benchuanggli@...il.com, HL.Liu@...esyslogic.com.tw,
Greg.tu@...esyslogic.com.tw, kernel test robot <lkp@...el.com>,
Ben Chuang <ben.chuang@...esyslogic.com.tw>,
Victor Shih <victor.shih@...esyslogic.com.tw>
Subject: Re: [PATCH V1] mmc: sdhci-uhs2: correction of incorrect type in
argument
On 30/10/24 13:22, Victor Shih wrote:
> From: Victor Shih <victor.shih@...esyslogic.com.tw>
>
> There is a type issue in the argument in the __sdhci_uhs2_send_command()
> that will generate a warning when building the kernel.
>
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202410260525.ZUuPhMJz-lkp@intel.com/
> Signed-off-by: Ben Chuang <ben.chuang@...esyslogic.com.tw>
> Signed-off-by: Victor Shih <victor.shih@...esyslogic.com.tw>
> ---
> drivers/mmc/host/sdhci-uhs2.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
> index 43820eb5a7ea..7f41ca67b069 100644
> --- a/drivers/mmc/host/sdhci-uhs2.c
> +++ b/drivers/mmc/host/sdhci-uhs2.c
> @@ -649,7 +649,8 @@ static void __sdhci_uhs2_send_command(struct sdhci_host *host, struct mmc_comman
> * MSB when preparing config read/write commands.
> */
> for (j = 0; j < cmd->uhs2_cmd->payload_len / sizeof(u32); j++) {
> - sdhci_writel(host, *(cmd->uhs2_cmd->payload + j), SDHCI_UHS2_CMD_PACKET + i);
> + sdhci_writel(host, *(__force u32 *)(cmd->uhs2_cmd->payload + j),
> + SDHCI_UHS2_CMD_PACKET + i);
> i += 4;
> }
>
Thanks for doing this.
I just noticed there is another issue that was reported but
did not get highlighted:
>> drivers/mmc/host/sdhci-uhs2.c:73:16: sparse: sparse: cast to restricted __be16
So the following is needed also:
diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
index 0a597240d299..c53b64d50c0d 100644
--- a/drivers/mmc/host/sdhci-uhs2.c
+++ b/drivers/mmc/host/sdhci-uhs2.c
@@ -70,7 +70,7 @@ EXPORT_SYMBOL_GPL(sdhci_uhs2_dump_regs);
static inline u16 uhs2_dev_cmd(struct mmc_command *cmd)
{
- return be16_to_cpu((__be16)cmd->uhs2_cmd->arg) & UHS2_ARG_IOADR_MASK;
+ return be16_to_cpu((__force __be16)cmd->uhs2_cmd->arg) & UHS2_ARG_IOADR_MASK;
}
static inline int mmc_opt_regulator_set_ocr(struct mmc_host *mmc,
Powered by blists - more mailing lists