All of lore.kernel.org
 help / color / mirror / Atom feed
* [ulfh-mmc:next 48/61] drivers/mmc/host/sdhci-uhs2.c:649:36: sparse: sparse: incorrect type in argument 2 (different base types)
@ 2024-10-25 21:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-25 21:58 UTC (permalink / raw)
  To: Victor Shih; +Cc: oe-kbuild-all, Ulf Hansson, Ben Chuang, AKASHI Takahiro

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-25 21:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 21:58 [ulfh-mmc:next 48/61] drivers/mmc/host/sdhci-uhs2.c:649:36: sparse: sparse: incorrect type in argument 2 (different base types) kernel test robot

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.