lkml.org 
[lkml]   [2022]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[asahilinux:bits/090-spi-hid 16/18] drivers/soc/apple/dockchannel.c:225:25: sparse: sparse: cast removes address space '__iomem' of expression
tree:   https://github.com/AsahiLinux/linux bits/090-spi-hid
head: 2902ed1bd2d6ac439a835c53841122c7f3455a6c
commit: 6b3956f7b0e18f8280252c5e03f4773c361768cf [16/18] soc: apple: Add DockChannel driver
config: parisc-randconfig-s041-20220715 (https://download.01.org/0day-ci/archive/20220716/202207162221.jMZrbhSG-lkp@intel.com/config)
compiler: hppa64-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/6b3956f7b0e18f8280252c5e03f4773c361768cf
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux bits/090-spi-hid
git checkout 6b3956f7b0e18f8280252c5e03f4773c361768cf
# 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=parisc64 SHELL=/bin/bash drivers/bluetooth/ drivers/media/i2c/ drivers/net/wireless/broadcom/brcm80211/brcmfmac/ drivers/pci/ drivers/soc/apple/ kernel/trace/ security/apparmor/ sound/soc/codecs/

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

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

\
 
 \ /
  Last update: 2022-07-16 16:29    [W:0.193 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site