From: kernel test robot <lkp@intel.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: drivers/mmc/host/sdhci-of-esdhc.c:900:33: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Tue, 15 Dec 2020 00:14:41 +0800 [thread overview]
Message-ID: <202012150038.VM8oI2SU-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5638 bytes --]
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2c85ebc57b3e1817b6ce1a6b703928e113a90442
commit: 54d8454436a205682bd89d66d8d9eedbc8452d15 mmc: host: Enable compile testing of multiple drivers
date: 3 months ago
config: openrisc-randconfig-s031-20201214 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=54d8454436a205682bd89d66d8d9eedbc8452d15
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 54d8454436a205682bd89d66d8d9eedbc8452d15
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/mmc/host/sdhci-of-esdhc.c:900:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *[assigned] scfg_base @@
drivers/mmc/host/sdhci-of-esdhc.c:900:33: sparse: expected void *addr
drivers/mmc/host/sdhci-of-esdhc.c:900:33: sparse: got void [noderef] __iomem *[assigned] scfg_base
vim +900 drivers/mmc/host/sdhci-of-esdhc.c
ea35645a3c66a74 yangbo lu 2017-04-20 858
ea35645a3c66a74 yangbo lu 2017-04-20 859 static int esdhc_signal_voltage_switch(struct mmc_host *mmc,
ea35645a3c66a74 yangbo lu 2017-04-20 860 struct mmc_ios *ios)
ea35645a3c66a74 yangbo lu 2017-04-20 861 {
ea35645a3c66a74 yangbo lu 2017-04-20 862 struct sdhci_host *host = mmc_priv(mmc);
ea35645a3c66a74 yangbo lu 2017-04-20 863 struct device_node *scfg_node;
ea35645a3c66a74 yangbo lu 2017-04-20 864 void __iomem *scfg_base = NULL;
ea35645a3c66a74 yangbo lu 2017-04-20 865 u32 sdhciovselcr;
ea35645a3c66a74 yangbo lu 2017-04-20 866 u32 val;
ea35645a3c66a74 yangbo lu 2017-04-20 867
ea35645a3c66a74 yangbo lu 2017-04-20 868 /*
ea35645a3c66a74 yangbo lu 2017-04-20 869 * Signal Voltage Switching is only applicable for Host Controllers
ea35645a3c66a74 yangbo lu 2017-04-20 870 * v3.00 and above.
ea35645a3c66a74 yangbo lu 2017-04-20 871 */
ea35645a3c66a74 yangbo lu 2017-04-20 872 if (host->version < SDHCI_SPEC_300)
ea35645a3c66a74 yangbo lu 2017-04-20 873 return 0;
ea35645a3c66a74 yangbo lu 2017-04-20 874
ea35645a3c66a74 yangbo lu 2017-04-20 875 val = sdhci_readl(host, ESDHC_PROCTL);
ea35645a3c66a74 yangbo lu 2017-04-20 876
ea35645a3c66a74 yangbo lu 2017-04-20 877 switch (ios->signal_voltage) {
ea35645a3c66a74 yangbo lu 2017-04-20 878 case MMC_SIGNAL_VOLTAGE_330:
ea35645a3c66a74 yangbo lu 2017-04-20 879 val &= ~ESDHC_VOLT_SEL;
ea35645a3c66a74 yangbo lu 2017-04-20 880 sdhci_writel(host, val, ESDHC_PROCTL);
ea35645a3c66a74 yangbo lu 2017-04-20 881 return 0;
ea35645a3c66a74 yangbo lu 2017-04-20 882 case MMC_SIGNAL_VOLTAGE_180:
ea35645a3c66a74 yangbo lu 2017-04-20 883 scfg_node = of_find_matching_node(NULL, scfg_device_ids);
ea35645a3c66a74 yangbo lu 2017-04-20 884 if (scfg_node)
ea35645a3c66a74 yangbo lu 2017-04-20 885 scfg_base = of_iomap(scfg_node, 0);
ea35645a3c66a74 yangbo lu 2017-04-20 886 if (scfg_base) {
ea35645a3c66a74 yangbo lu 2017-04-20 887 sdhciovselcr = SDHCIOVSELCR_TGLEN |
ea35645a3c66a74 yangbo lu 2017-04-20 888 SDHCIOVSELCR_VSELVAL;
ea35645a3c66a74 yangbo lu 2017-04-20 889 iowrite32be(sdhciovselcr,
ea35645a3c66a74 yangbo lu 2017-04-20 890 scfg_base + SCFG_SDHCIOVSELCR);
ea35645a3c66a74 yangbo lu 2017-04-20 891
ea35645a3c66a74 yangbo lu 2017-04-20 892 val |= ESDHC_VOLT_SEL;
ea35645a3c66a74 yangbo lu 2017-04-20 893 sdhci_writel(host, val, ESDHC_PROCTL);
ea35645a3c66a74 yangbo lu 2017-04-20 894 mdelay(5);
ea35645a3c66a74 yangbo lu 2017-04-20 895
ea35645a3c66a74 yangbo lu 2017-04-20 896 sdhciovselcr = SDHCIOVSELCR_TGLEN |
ea35645a3c66a74 yangbo lu 2017-04-20 897 SDHCIOVSELCR_SDHC_VS;
ea35645a3c66a74 yangbo lu 2017-04-20 898 iowrite32be(sdhciovselcr,
ea35645a3c66a74 yangbo lu 2017-04-20 899 scfg_base + SCFG_SDHCIOVSELCR);
ea35645a3c66a74 yangbo lu 2017-04-20 @900 iounmap(scfg_base);
ea35645a3c66a74 yangbo lu 2017-04-20 901 } else {
ea35645a3c66a74 yangbo lu 2017-04-20 902 val |= ESDHC_VOLT_SEL;
ea35645a3c66a74 yangbo lu 2017-04-20 903 sdhci_writel(host, val, ESDHC_PROCTL);
ea35645a3c66a74 yangbo lu 2017-04-20 904 }
ea35645a3c66a74 yangbo lu 2017-04-20 905 return 0;
ea35645a3c66a74 yangbo lu 2017-04-20 906 default:
ea35645a3c66a74 yangbo lu 2017-04-20 907 return 0;
ea35645a3c66a74 yangbo lu 2017-04-20 908 }
ea35645a3c66a74 yangbo lu 2017-04-20 909 }
ea35645a3c66a74 yangbo lu 2017-04-20 910
:::::: The code at line 900 was first introduced by commit
:::::: ea35645a3c66a74af92d3bbb4eb131220fc3e58a mmc: sdhci-of-esdhc: add support for signal voltage switch
:::::: TO: yangbo lu <yangbo.lu@nxp.com>
:::::: CC: Ulf Hansson <ulf.hansson@linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33383 bytes --]
reply other threads:[~2020-12-14 16:16 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=202012150038.VM8oI2SU-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).