[platform-drivers-x86:review-andy 38/41] drivers/platform/x86/intel_punit_ipc.c:234:40: warning: passing argument 1 of 'devm_platform_ioremap_resource' from incompatible pointer type

[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
config: x86_64-randconfig-s0-201942 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.2-10+deb8u1) 4.9.2
reproduce:
        git checkout ab3317e5cc7e68bda2c666babad3d9835f1a03bb
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   drivers/platform/x86/intel_punit_ipc.c: In function 'intel_punit_get_bars':
>> drivers/platform/x86/intel_punit_ipc.c:234:40: warning: passing argument 1 of 'devm_platform_ioremap_resource' from incompatible pointer type
     addr = devm_platform_ioremap_resource(&pdev->dev, 0);
                                           ^
   In file included from drivers/platform/x86/intel_punit_ipc.c:19:0:
   include/linux/platform_device.h:58:1: note: expected 'struct platform_device *' but argument is of type 'struct device *'
    devm_platform_ioremap_resource(struct platform_device *pdev,
    ^
   drivers/platform/x86/intel_punit_ipc.c:239:40: warning: passing argument 1 of 'devm_platform_ioremap_resource' from incompatible pointer type
     addr = devm_platform_ioremap_resource(&pdev->dev, 1);
                                           ^
   In file included from drivers/platform/x86/intel_punit_ipc.c:19:0:
   include/linux/platform_device.h:58:1: note: expected 'struct platform_device *' but argument is of type 'struct device *'
    devm_platform_ioremap_resource(struct platform_device *pdev,
    ^
   drivers/platform/x86/intel_punit_ipc.c:251:40: warning: passing argument 1 of 'devm_platform_ioremap_resource' from incompatible pointer type
     addr = devm_platform_ioremap_resource(&pdev->dev, 2);
                                           ^
   In file included from drivers/platform/x86/intel_punit_ipc.c:19:0:
   include/linux/platform_device.h:58:1: note: expected 'struct platform_device *' but argument is of type 'struct device *'
    devm_platform_ioremap_resource(struct platform_device *pdev,
    ^
   drivers/platform/x86/intel_punit_ipc.c:255:40: warning: passing argument 1 of 'devm_platform_ioremap_resource' from incompatible pointer type
     addr = devm_platform_ioremap_resource(&pdev->dev, 3);
                                           ^
   In file included from drivers/platform/x86/intel_punit_ipc.c:19:0:
   include/linux/platform_device.h:58:1: note: expected 'struct platform_device *' but argument is of type 'struct device *'
    devm_platform_ioremap_resource(struct platform_device *pdev,
    ^
   drivers/platform/x86/intel_punit_ipc.c:259:40: warning: passing argument 1 of 'devm_platform_ioremap_resource' from incompatible pointer type
     addr = devm_platform_ioremap_resource(&pdev->dev, 4);
                                           ^
   In file included from drivers/platform/x86/intel_punit_ipc.c:19:0:
   include/linux/platform_device.h:58:1: note: expected 'struct platform_device *' but argument is of type 'struct device *'
    devm_platform_ioremap_resource(struct platform_device *pdev,
    ^
   drivers/platform/x86/intel_punit_ipc.c:263:40: warning: passing argument 1 of 'devm_platform_ioremap_resource' from incompatible pointer type
     addr = devm_platform_ioremap_resource(&pdev->dev, 5);
                                           ^
   In file included from drivers/platform/x86/intel_punit_ipc.c:19:0:
   include/linux/platform_device.h:58:1: note: expected 'struct platform_device *' but argument is of type 'struct device *'
    devm_platform_ioremap_resource(struct platform_device *pdev,
    ^

vim +/devm_platform_ioremap_resource +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

Attachment: .config.gz
Description: application/gzip


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

  Powered by Linux