linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [asahilinux:bits/090-spi-hid 16/22] drivers/soc/apple/dockchannel.c:225:25: sparse: sparse: cast removes address space '__iomem' of expression
@ 2022-09-18 20:04 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-09-18 20:04 UTC (permalink / raw)
  To: Hector Martin; +Cc: kbuild-all, linux-kernel

tree:   https://github.com/AsahiLinux/linux bits/090-spi-hid
head:   ecf1fb81499a2f1724cb90497ca3c1cec831c9b6
commit: 47ac6f2f8d709398ea9d50e20f9babc21ef6ea47 [16/22] soc: apple: Add DockChannel driver
config: arm64-randconfig-s052-20220918 (https://download.01.org/0day-ci/archive/20220919/202209190428.CeFvhMYP-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://github.com/AsahiLinux/linux/commit/47ac6f2f8d709398ea9d50e20f9babc21ef6ea47
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux bits/090-spi-hid
        git checkout 47ac6f2f8d709398ea9d50e20f9babc21ef6ea47
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/hid/ drivers/soc/apple/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/soc/apple/dockchannel.c:225:25: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/soc/apple/dockchannel.c:229:25: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/soc/apple/dockchannel.c: note: in included file (through arch/arm64/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:379:22: sparse:     expected unsigned int [usertype] val
   include/asm-generic/io.h:379:22: sparse:     got restricted __le32 [usertype]

vim +/__iomem +225 drivers/soc/apple/dockchannel.c

   211	
   212	struct dockchannel *dockchannel_init(struct platform_device *pdev)
   213	{
   214		struct device *dev = &pdev->dev;
   215		struct dockchannel *dockchannel;
   216		int ret;
   217	
   218		dockchannel = devm_kzalloc(dev, sizeof(*dockchannel), GFP_KERNEL);
   219		if (!dockchannel)
   220			return ERR_PTR(-ENOMEM);
   221	
   222		dockchannel->dev = dev;
   223		dockchannel->config_base = devm_platform_ioremap_resource_byname(pdev, "config");
   224		if (IS_ERR(dockchannel->config_base))
 > 225			return (void *)dockchannel->config_base;
   226	
   227		dockchannel->data_base = devm_platform_ioremap_resource_byname(pdev, "data");
   228		if (IS_ERR(dockchannel->data_base))
   229			return (void *)dockchannel->data_base;
   230	
   231		ret = of_property_read_u32(dev->of_node, "apple,fifo-size", &dockchannel->fifo_size);
   232		if (ret)
   233			return ERR_PTR(dev_err_probe(dev, ret, "Missing apple,fifo-size property"));
   234	
   235		init_completion(&dockchannel->tx_comp);
   236		init_completion(&dockchannel->rx_comp);
   237	
   238		dockchannel->tx_irq = platform_get_irq_byname(pdev, "tx");
   239		if (dockchannel->tx_irq <= 0) {
   240			return ERR_PTR(dev_err_probe(dev, dockchannel->tx_irq,
   241					     "Failed to get TX IRQ"));
   242		}
   243	
   244		dockchannel->rx_irq = platform_get_irq_byname(pdev, "rx");
   245		if (dockchannel->rx_irq <= 0) {
   246			return ERR_PTR(dev_err_probe(dev, dockchannel->rx_irq,
   247					     "Failed to get RX IRQ"));
   248		}
   249	
   250		ret = devm_request_irq(dev, dockchannel->tx_irq, dockchannel_tx_irq, IRQF_NO_AUTOEN,
   251				       "apple-dockchannel-tx", dockchannel);
   252		if (ret)
   253			return ERR_PTR(dev_err_probe(dev, ret, "Failed to request TX IRQ"));
   254	
   255		ret = devm_request_threaded_irq(dev, dockchannel->rx_irq, dockchannel_rx_irq,
   256						dockchannel_rx_irq_thread, IRQF_NO_AUTOEN,
   257						"apple-dockchannel-rx", dockchannel);
   258		if (ret)
   259			return ERR_PTR(dev_err_probe(dev, ret, "Failed to request RX IRQ"));
   260	
   261		return dockchannel;
   262	}
   263	EXPORT_SYMBOL(dockchannel_init);
   264	
   265	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2022-09-18 20:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-18 20:04 [asahilinux:bits/090-spi-hid 16/22] drivers/soc/apple/dockchannel.c:225:25: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot

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).