[PATCH v3 8/8] drm: Upcast struct drm_device.dev to struct pci_device; replace pdev

kernel test robot lkp at intel.com
Thu Jan 7 09:45:30 UTC 2021


Hi Thomas,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next linus/master v5.11-rc2 next-20210104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/drm-Move-struct-drm_device-pdev-to-legacy/20210107-161007
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-s021-20210107 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://github.com/0day-ci/linux/commit/380912f7b62c23322562c40e19efd7ad84d57e9c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Thomas-Zimmermann/drm-Move-struct-drm_device-pdev-to-legacy/20210107-161007
        git checkout 380912f7b62c23322562c40e19efd7ad84d57e9c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/gma500/oaktrail_device.c: In function 'oaktrail_chip_setup':
>> drivers/gpu/drm/gma500/oaktrail_device.c:509:26: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     509 |  if (pci_enable_msi(dev->pdev))
         |                          ^~~~
         |                          dev
--
   drivers/gpu/drm/gma500/oaktrail_lvds.c: In function 'oaktrail_lvds_set_power':
>> drivers/gpu/drm/gma500/oaktrail_lvds.c:63:25: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
      63 |   pm_request_idle(&dev->pdev->dev);
         |                         ^~~~
         |                         dev
--
   drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c: In function 'get_clock':
   drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c:69:11: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]
      69 |  u32 val, tmp;
         |           ^~~
   drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c: In function 'get_data':
   drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c:83:11: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]
      83 |  u32 val, tmp;
         |           ^~~
   drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c: In function 'oaktrail_lvds_i2c_init':
>> drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c:148:35: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     148 |  chan->adapter.dev.parent = &dev->pdev->dev;
         |                                   ^~~~
         |                                   dev
--
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c: In function 'vmw_driver_load':
>> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:661:22: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     661 |  pci_set_master(dev->pdev);
         |                      ^~~~
         |                      dev
   In file included from drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:31:
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:690:47: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     690 |  dev_priv->io_start = pci_resource_start(dev->pdev, 0);
         |                                               ^~~~
   include/linux/pci.h:1854:40: note: in definition of macro 'pci_resource_start'
    1854 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
         |                                        ^~~
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:691:49: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     691 |  dev_priv->vram_start = pci_resource_start(dev->pdev, 1);
         |                                                 ^~~~
   include/linux/pci.h:1854:40: note: in definition of macro 'pci_resource_start'
    1854 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
         |                                        ^~~
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:692:49: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     692 |  dev_priv->mmio_start = pci_resource_start(dev->pdev, 2);
         |                                                 ^~~~
   include/linux/pci.h:1854:40: note: in definition of macro 'pci_resource_start'
    1854 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
         |                                        ^~~
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:842:33: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     842 |  ret = pci_request_regions(dev->pdev, "vmwgfx probe");
         |                                 ^~~~
         |                                 dev
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:851:33: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     851 |   ret = pci_request_region(dev->pdev, 2, "vmwgfx stealth probe");
         |                                 ^~~~
         |                                 dev
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:859:35: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     859 |   ret = vmw_irq_install(dev, dev->pdev->irq);
         |                                   ^~~~
         |                                   dev
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:1005:27: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1005 |   pci_release_region(dev->pdev, 2);
         |                           ^~~~
         |                           dev
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:1007:28: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1007 |   pci_release_regions(dev->pdev);
         |                            ^~~~
         |                            dev
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c: In function 'vmw_driver_unload':
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:1056:27: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1056 |   pci_release_region(dev->pdev, 2);
         |                           ^~~~
         |                           dev
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:1058:28: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1058 |   pci_release_regions(dev->pdev);
         |                            ^~~~
         |                            dev
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c: In function 'vmw_probe':
   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:1522:7: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1522 |  dev->pdev = pdev;
         |       ^~~~
         |       dev
--
   drivers/gpu/drm/vmwgfx/vmwgfx_fb.c: In function 'vmw_fb_init':
>> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c:641:42: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
     641 |  struct device *device = &vmw_priv->dev->pdev->dev;
         |                                          ^~~~
         |                                          dev
   In file included from drivers/gpu/drm/vmwgfx/vmwgfx_fb.c:35:
   At top level:
   drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:256:23: warning: 'vmw_cursor_plane_formats' defined but not used [-Wunused-const-variable=]
     256 | static const uint32_t vmw_cursor_plane_formats[] = {
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:248:23: warning: 'vmw_primary_plane_formats' defined but not used [-Wunused-const-variable=]
     248 | static const uint32_t vmw_primary_plane_formats[] = {
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c: In function 'vmw_cmdbuf_set_pool_size':
>> drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:1233:48: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1233 |  man->map = dma_alloc_coherent(&dev_priv->dev->pdev->dev, size,
         |                                                ^~~~
         |                                                dev
   drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c: In function 'vmw_cmdbuf_man_create':
   drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:1316:28: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1316 |            &dev_priv->dev->pdev->dev,
         |                            ^~~~
         |                            dev
   drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:1325:22: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1325 |      &dev_priv->dev->pdev->dev,
         |                      ^~~~
         |                      dev
   drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c: In function 'vmw_cmdbuf_remove_pool':
   drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:1390:42: error: 'struct drm_device' has no member named 'pdev'; did you mean 'dev'?
    1390 |   dma_free_coherent(&man->dev_priv->dev->pdev->dev,
         |                                          ^~~~
         |                                          dev


vim +509 drivers/gpu/drm/gma500/oaktrail_device.c

1b082ccf5901108 Alan Cox           2011-11-03  503  
1b22edfd6efd02b Alan Cox           2011-11-29  504  static int oaktrail_chip_setup(struct drm_device *dev)
aa0c45fdca0cff3 Alan Cox           2011-11-29  505  {
1b22edfd6efd02b Alan Cox           2011-11-29  506  	struct drm_psb_private *dev_priv = dev->dev_private;
1b22edfd6efd02b Alan Cox           2011-11-29  507  	int ret;
1b22edfd6efd02b Alan Cox           2011-11-29  508  	
9c0b6fcdc9faee5 Alan Cox           2012-05-11 @509  	if (pci_enable_msi(dev->pdev))
9c0b6fcdc9faee5 Alan Cox           2012-05-11  510  		dev_warn(dev->dev, "Enabling MSI failed!\n");
9c0b6fcdc9faee5 Alan Cox           2012-05-11  511  
8512e0748729a49 Alan Cox           2012-05-11  512  	dev_priv->regmap = oaktrail_regmap;
8512e0748729a49 Alan Cox           2012-05-11  513  
1b22edfd6efd02b Alan Cox           2011-11-29  514  	ret = mid_chip_setup(dev);
aa0c45fdca0cff3 Alan Cox           2011-11-29  515  	if (ret < 0)
aa0c45fdca0cff3 Alan Cox           2011-11-29  516  		return ret;
4086b1e2b19729e Kirill A. Shutemov 2012-05-03  517  	if (!dev_priv->has_gct) {
aa0c45fdca0cff3 Alan Cox           2011-11-29  518  		/* Now pull the BIOS data */
d839ede47a56ff5 Alan Cox           2012-05-03  519  		psb_intel_opregion_init(dev);
aa0c45fdca0cff3 Alan Cox           2011-11-29  520  		psb_intel_init_bios(dev);
aa0c45fdca0cff3 Alan Cox           2011-11-29  521  	}
6528c897966c7d5 Patrik Jakobsson   2013-11-07  522  	gma_intel_setup_gmbus(dev);
5f503148efdda26 Alan Cox           2012-05-03  523  	oaktrail_hdmi_setup(dev);
aa0c45fdca0cff3 Alan Cox           2011-11-29  524  	return 0;
aa0c45fdca0cff3 Alan Cox           2011-11-29  525  }
aa0c45fdca0cff3 Alan Cox           2011-11-29  526  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35839 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210107/a791e9ad/attachment-0001.gz>


More information about the amd-gfx mailing list