From: Adrian Hunter <adrian.hunter@intel.com>
To: Victor Shih <victorshihgli@gmail.com>, ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
benchuanggli@gmail.com, HL.Liu@genesyslogic.com.tw,
Greg.tu@genesyslogic.com.tw, kernel test robot <lkp@intel.com>,
Ben Chuang <ben.chuang@genesyslogic.com.tw>,
Victor Shih <victor.shih@genesyslogic.com.tw>
Subject: Re: [PATCH V1] mmc: core: Correction a warning caused by incorrect type in assignment for UHS-II
Date: Fri, 8 Nov 2024 09:44:03 +0200 [thread overview]
Message-ID: <72b5788d-8b48-4794-8faf-9dab15e71e96@intel.com> (raw)
In-Reply-To: <20241105102901.351429-1-victorshihgli@gmail.com>
On 5/11/24 12:29, Victor Shih wrote:
> From: Victor Shih <victor.shih@genesyslogic.com.tw>
>
> There is a type issue in the assignment in the sd_uhs2_dev_init()
> that will generate a warning when building the kernel.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202411051248.wvjHSFNj-lkp@intel.com/
> Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
> Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
It is OK for now, so:
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
However it looks like in some other cases, the payload byte
order is wrong, but the value is zero which works anyway.
The UHS-II spec is a bit confusing because it says the DWORDs
are big endian, but the registers are 64-bits, so does that
mean the payload byte order is 3,2,1,0,7,6,5,4 ?
Perhaps someone could check. I don't have time right now,
sorry.
> ---
> drivers/mmc/core/sd_uhs2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/sd_uhs2.c b/drivers/mmc/core/sd_uhs2.c
> index c5847a2084d5..1c31d0dfa961 100644
> --- a/drivers/mmc/core/sd_uhs2.c
> +++ b/drivers/mmc/core/sd_uhs2.c
> @@ -181,7 +181,7 @@ static int sd_uhs2_dev_init(struct mmc_host *host)
> UHS2_DEV_INIT_COMPLETE_FLAG |
> ((gd & 0xF) << 4) |
> (gap & 0xF);
> - uhs2_cmd.payload[0] = payload0;
> + uhs2_cmd.payload[0] = (__force __be32)payload0;
>
> sd_uhs2_cmd_assemble(&cmd, &uhs2_cmd, UHS2_DEV_INIT_PAYLOAD_LEN,
> UHS2_DEV_INIT_RESP_LEN);
next prev parent reply other threads:[~2024-11-08 7:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 10:29 Victor Shih
2024-11-08 7:44 ` Adrian Hunter [this message]
2024-11-12 18:43 ` Ulf Hansson
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=72b5788d-8b48-4794-8faf-9dab15e71e96@intel.com \
--to=adrian.hunter@intel.com \
--cc=Greg.tu@genesyslogic.com.tw \
--cc=HL.Liu@genesyslogic.com.tw \
--cc=ben.chuang@genesyslogic.com.tw \
--cc=benchuanggli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=ulf.hansson@linaro.org \
--cc=victor.shih@genesyslogic.com.tw \
--cc=victorshihgli@gmail.com \
/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
all inboxes | Powered by JetHome®