From: kernel test robot <lkp@intel.com>
To: Victor Shih <victor.shih@genesyslogic.com.tw>
Cc: oe-kbuild-all@lists.linux.dev,
Ulf Hansson <ulf.hansson@linaro.org>,
Ben Chuang <ben.chuang@genesyslogic.com.tw>,
AKASHI Takahiro <takahiro.akashi@linaro.org>
Subject: [ulfh-mmc:next 48/61] drivers/mmc/host/sdhci-uhs2.c:649:36: sparse: sparse: incorrect type in argument 2 (different base types)
Date: Sat, 26 Oct 2024 05:58:36 +0800 [thread overview]
Message-ID: <202410260525.ZUuPhMJz-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git next
head: 3c0946b6a378fb92658aabcda5c70ea3e83143bf
commit: 9cbb2358bb1f17b61bf75cbebc2c9746b3a29e32 [48/61] mmc: sdhci-uhs2: add request() and others
config: x86_64-randconfig-r131-20241025 (https://download.01.org/0day-ci/archive/20241026/202410260525.ZUuPhMJz-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241026/202410260525.ZUuPhMJz-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410260525.ZUuPhMJz-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/mmc/host/sdhci-uhs2.c:649:36: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __be32 @@
drivers/mmc/host/sdhci-uhs2.c:649:36: sparse: expected unsigned int [usertype] val
drivers/mmc/host/sdhci-uhs2.c:649:36: sparse: got restricted __be32
>> drivers/mmc/host/sdhci-uhs2.c:73:16: sparse: sparse: cast to restricted __be16
>> drivers/mmc/host/sdhci-uhs2.c:73:16: sparse: sparse: cast to restricted __be16
>> drivers/mmc/host/sdhci-uhs2.c:73:16: sparse: sparse: cast to restricted __be16
vim +649 drivers/mmc/host/sdhci-uhs2.c
630
631 static void __sdhci_uhs2_send_command(struct sdhci_host *host, struct mmc_command *cmd)
632 {
633 int i, j;
634 int cmd_reg;
635
636 i = 0;
637 sdhci_writel(host,
638 ((u32)cmd->uhs2_cmd->arg << 16) |
639 (u32)cmd->uhs2_cmd->header,
640 SDHCI_UHS2_CMD_PACKET + i);
641 i += 4;
642
643 /*
644 * Per spec, payload (config) should be MSB before sending out.
645 * But we don't need convert here because had set payload as
646 * MSB when preparing config read/write commands.
647 */
648 for (j = 0; j < cmd->uhs2_cmd->payload_len / sizeof(u32); j++) {
> 649 sdhci_writel(host, *(cmd->uhs2_cmd->payload + j), SDHCI_UHS2_CMD_PACKET + i);
650 i += 4;
651 }
652
653 for ( ; i < SDHCI_UHS2_CMD_PACK_MAX_LEN; i += 4)
654 sdhci_writel(host, 0, SDHCI_UHS2_CMD_PACKET + i);
655
656 DBG("UHS2 CMD packet_len = %d.\n", cmd->uhs2_cmd->packet_len);
657 for (i = 0; i < cmd->uhs2_cmd->packet_len; i++)
658 DBG("UHS2 CMD_PACKET[%d] = 0x%x.\n", i,
659 sdhci_readb(host, SDHCI_UHS2_CMD_PACKET + i));
660
661 cmd_reg = FIELD_PREP(SDHCI_UHS2_CMD_PACK_LEN_MASK, cmd->uhs2_cmd->packet_len);
662 if ((cmd->flags & MMC_CMD_MASK) == MMC_CMD_ADTC)
663 cmd_reg |= SDHCI_UHS2_CMD_DATA;
664 if (cmd->opcode == MMC_STOP_TRANSMISSION)
665 cmd_reg |= SDHCI_UHS2_CMD_CMD12;
666
667 /* UHS2 Native ABORT */
668 if ((cmd->uhs2_cmd->header & UHS2_NATIVE_PACKET) &&
669 (uhs2_dev_cmd(cmd) == UHS2_DEV_CMD_TRANS_ABORT))
670 cmd_reg |= SDHCI_UHS2_CMD_TRNS_ABORT;
671
672 /* UHS2 Native DORMANT */
673 if ((cmd->uhs2_cmd->header & UHS2_NATIVE_PACKET) &&
674 (uhs2_dev_cmd(cmd) == UHS2_DEV_CMD_GO_DORMANT_STATE))
675 cmd_reg |= SDHCI_UHS2_CMD_DORMANT;
676
677 DBG("0x%x is set to UHS2 CMD register.\n", cmd_reg);
678
679 sdhci_writew(host, cmd_reg, SDHCI_UHS2_CMD);
680 }
681
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-10-25 21:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202410260525.ZUuPhMJz-lkp@intel.com \
--to=lkp@intel.com \
--cc=ben.chuang@genesyslogic.com.tw \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=takahiro.akashi@linaro.org \
--cc=ulf.hansson@linaro.org \
--cc=victor.shih@genesyslogic.com.tw \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.