All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [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: Sun, 27 Oct 2019 01:20:04 +0800	[thread overview]
Message-ID: <201910270102.on54ngfK%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5717 bytes --]

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@intel.com>

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 #2: config.gz --]
[-- Type: application/gzip, Size: 35971 bytes --]

                 reply	other threads:[~2019-10-26 17:20 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=201910270102.on54ngfK%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.