[platform-drivers-x86:review-andy 38/41] drivers/platform/x86/intel_punit_ipc.c:234:48: sparse: sparse: incorrect type in argument 1 (different base types)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git review-andy
head:   c7c0524e842aa9d699aa222388f767a6e5b57aba
commit: ab3317e5cc7e68bda2c666babad3d9835f1a03bb [38/41] platform/x86: intel_punit_ipc: use devm_platform_ioremap_resource() to simplify code
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-dirty
        git checkout ab3317e5cc7e68bda2c666babad3d9835f1a03bb
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

>> drivers/platform/x86/intel_punit_ipc.c:234:48: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct platform_device *pdev @@    got atform_device *pdev @@
>> drivers/platform/x86/intel_punit_ipc.c:234:48: sparse:    expected struct platform_device *pdev
>> drivers/platform/x86/intel_punit_ipc.c:234:48: sparse:    got struct device *
   drivers/platform/x86/intel_punit_ipc.c:239:48: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct platform_device *pdev @@    got atform_device *pdev @@
   drivers/platform/x86/intel_punit_ipc.c:239:48: sparse:    expected struct platform_device *pdev
   drivers/platform/x86/intel_punit_ipc.c:239:48: sparse:    got struct device *
   drivers/platform/x86/intel_punit_ipc.c:251:48: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct platform_device *pdev @@    got atform_device *pdev @@
   drivers/platform/x86/intel_punit_ipc.c:251:48: sparse:    expected struct platform_device *pdev
   drivers/platform/x86/intel_punit_ipc.c:251:48: sparse:    got struct device *
   drivers/platform/x86/intel_punit_ipc.c:255:48: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct platform_device *pdev @@    got atform_device *pdev @@
   drivers/platform/x86/intel_punit_ipc.c:255:48: sparse:    expected struct platform_device *pdev
   drivers/platform/x86/intel_punit_ipc.c:255:48: sparse:    got struct device *
   drivers/platform/x86/intel_punit_ipc.c:259:48: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct platform_device *pdev @@    got atform_device *pdev @@
   drivers/platform/x86/intel_punit_ipc.c:259:48: sparse:    expected struct platform_device *pdev
   drivers/platform/x86/intel_punit_ipc.c:259:48: sparse:    got struct device *
   drivers/platform/x86/intel_punit_ipc.c:263:48: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct platform_device *pdev @@    got atform_device *pdev @@
   drivers/platform/x86/intel_punit_ipc.c:263:48: sparse:    expected struct platform_device *pdev
   drivers/platform/x86/intel_punit_ipc.c:263:48: sparse:    got struct device *

vim +234 drivers/platform/x86/intel_punit_ipc.c

   224	
   225	static int intel_punit_get_bars(struct platform_device *pdev)
   226	{
   227		void __iomem *addr;
   228	
   229		/*
   230		 * The following resources are required
   231		 * - BIOS_IPC BASE_DATA
   232		 * - BIOS_IPC BASE_IFACE
   233		 */
 > 234		addr = devm_platform_ioremap_resource(&pdev->dev, 0);
   235		if (IS_ERR(addr))
   236			return PTR_ERR(addr);
   237		punit_ipcdev->base[BIOS_IPC][BASE_DATA] = addr;
   238	
   239		addr = devm_platform_ioremap_resource(&pdev->dev, 1);
   240		if (IS_ERR(addr))
   241			return PTR_ERR(addr);
   242		punit_ipcdev->base[BIOS_IPC][BASE_IFACE] = addr;
   243	
   244		/*
   245		 * The following resources are optional
   246		 * - ISPDRIVER_IPC BASE_DATA
   247		 * - ISPDRIVER_IPC BASE_IFACE
   248		 * - GTDRIVER_IPC BASE_DATA
   249		 * - GTDRIVER_IPC BASE_IFACE
   250		 */
   251		addr = devm_platform_ioremap_resource(&pdev->dev, 2);
   252		if (!IS_ERR(addr))
   253			punit_ipcdev->base[ISPDRIVER_IPC][BASE_DATA] = addr;
   254	
   255		addr = devm_platform_ioremap_resource(&pdev->dev, 3);
   256		if (!IS_ERR(addr))
   257			punit_ipcdev->base[ISPDRIVER_IPC][BASE_IFACE] = addr;
   258	
   259		addr = devm_platform_ioremap_resource(&pdev->dev, 4);
   260		if (!IS_ERR(addr))
   261			punit_ipcdev->base[GTDRIVER_IPC][BASE_DATA] = addr;
   262	
   263		addr = devm_platform_ioremap_resource(&pdev->dev, 5);
   264		if (!IS_ERR(addr))
   265			punit_ipcdev->base[GTDRIVER_IPC][BASE_IFACE] = addr;
   266	
   267		return 0;
   268	}
   269	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux