All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-review:UPDATE-20200919-040329/Daniel-Vetter/managed-drm_device-absolute-final-leftover-bits/20200918-212606 2/4] drivers/gpu/drm/i915/selftests/mock_gem_device.c:147:58: warning: format specifies type 'int' but the argument has type 'long'
@ 2020-09-19  4:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-19  4:34 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20200919-040329/Daniel-Vetter/managed-drm_device-absolute-final-leftover-bits/20200918-212606
head:   94cdb5aa39405ff16ad98f65a8d44e9a8e55dac7
commit: 0eecbea55f799c9e404dcc6e3249af908252a240 [2/4] drm/i915/selftests: align more to real device lifetimes
config: x86_64-randconfig-a003-20200917 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed79827aea444e6995fb3d36abc2bfd36331773c)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout 0eecbea55f799c9e404dcc6e3249af908252a240
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/i915_gem.c:1397:
>> drivers/gpu/drm/i915/selftests/mock_gem_device.c:147:58: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
                   pr_err("Failed to allocate mock GEM device: err=%d\n", PTR_ERR(i915));
                                                                   ~~     ^~~~~~~~~~~~~
                                                                   %ld
   include/linux/printk.h:339:33: note: expanded from macro 'pr_err'
           printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
                                  ~~~     ^~~~~~~~~~~
   In file included from drivers/gpu/drm/i915/i915_gem.c:1397:
   drivers/gpu/drm/i915/selftests/mock_gem_device.c:124:6: warning: unused variable 'err' [-Wunused-variable]
           int err;
               ^
   2 warnings generated.

# https://github.com/0day-ci/linux/commit/0eecbea55f799c9e404dcc6e3249af908252a240
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20200919-040329/Daniel-Vetter/managed-drm_device-absolute-final-leftover-bits/20200918-212606
git checkout 0eecbea55f799c9e404dcc6e3249af908252a240
vim +147 drivers/gpu/drm/i915/selftests/mock_gem_device.c

   116	
   117	struct drm_i915_private *mock_gem_device(void)
   118	{
   119	#if IS_ENABLED(CONFIG_IOMMU_API) && defined(CONFIG_INTEL_IOMMU)
   120		static struct dev_iommu fake_iommu = { .priv = (void *)-1 };
   121	#endif
   122		struct drm_i915_private *i915;
   123		struct pci_dev *pdev;
   124		int err;
   125	
   126		pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
   127		if (!pdev)
   128			return NULL;
   129		device_initialize(&pdev->dev);
   130		pdev->class = PCI_BASE_CLASS_DISPLAY << 16;
   131		pdev->dev.release = release_dev;
   132		dev_set_name(&pdev->dev, "mock");
   133		dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
   134	
   135	#if IS_ENABLED(CONFIG_IOMMU_API) && defined(CONFIG_INTEL_IOMMU)
   136		/* HACK to disable iommu for the fake device; force identity mapping */
   137		pdev->dev.iommu = &fake_iommu;
   138	#endif
   139		if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) {
   140			put_device(&pdev->dev);
   141			return NULL;
   142		}
   143	
   144		i915 = devm_drm_dev_alloc(&pdev->dev, &mock_driver,
   145					  struct drm_i915_private, drm);
   146		if (IS_ERR(i915)) {
 > 147			pr_err("Failed to allocate mock GEM device: err=%d\n", PTR_ERR(i915));
   148			devres_release_group(&pdev->dev, NULL);
   149			put_device(&pdev->dev);
   150	
   151			return NULL;
   152		}
   153	
   154		pci_set_drvdata(pdev, i915);
   155		i915->drm.pdev = pdev;
   156	
   157		dev_pm_domain_set(&pdev->dev, &pm_domain);
   158		pm_runtime_enable(&pdev->dev);
   159		pm_runtime_dont_use_autosuspend(&pdev->dev);
   160		if (pm_runtime_enabled(&pdev->dev))
   161			WARN_ON(pm_runtime_get_sync(&pdev->dev));
   162	
   163	
   164		i915_params_copy(&i915->params, &i915_modparams);
   165	
   166		intel_runtime_pm_init_early(&i915->runtime_pm);
   167	
   168		/* Using the global GTT may ask questions about KMS users, so prepare */
   169		drm_mode_config_init(&i915->drm);
   170	
   171		mkwrite_device_info(i915)->gen = -1;
   172	
   173		mkwrite_device_info(i915)->page_sizes =
   174			I915_GTT_PAGE_SIZE_4K |
   175			I915_GTT_PAGE_SIZE_64K |
   176			I915_GTT_PAGE_SIZE_2M;
   177	
   178		mkwrite_device_info(i915)->memory_regions = REGION_SMEM;
   179		intel_memory_regions_hw_probe(i915);
   180	
   181		mock_uncore_init(&i915->uncore, i915);
   182	
   183		i915_gem_init__mm(i915);
   184		intel_gt_init_early(&i915->gt, i915);
   185		atomic_inc(&i915->gt.wakeref.count); /* disable; no hw support */
   186		i915->gt.awake = -ENODEV;
   187	
   188		i915->wq = alloc_ordered_workqueue("mock", 0);
   189		if (!i915->wq)
   190			goto err_drv;
   191	
   192		mock_init_contexts(i915);
   193	
   194		mock_init_ggtt(i915, &i915->ggtt);
   195		i915->gt.vm = i915_vm_get(&i915->ggtt.vm);
   196	
   197		mkwrite_device_info(i915)->platform_engine_mask = BIT(0);
   198		i915->gt.info.engine_mask = BIT(0);
   199	
   200		i915->gt.engine[RCS0] = mock_engine(i915, "mock", RCS0);
   201		if (!i915->gt.engine[RCS0])
   202			goto err_unlock;
   203	
   204		if (mock_engine_init(i915->gt.engine[RCS0]))
   205			goto err_context;
   206	
   207		__clear_bit(I915_WEDGED, &i915->gt.reset.flags);
   208		intel_engines_driver_register(i915);
   209	
   210		i915->do_release = true;
   211	
   212		return i915;
   213	
   214	err_context:
   215		intel_gt_driver_remove(&i915->gt);
   216	err_unlock:
   217		destroy_workqueue(i915->wq);
   218	err_drv:
   219		intel_gt_driver_late_release(&i915->gt);
   220		intel_memory_regions_driver_release(i915);
   221		drm_mode_config_cleanup(&i915->drm);
   222		mock_destroy_device(i915);
   223	
   224		return NULL;
   225	}
   226	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38695 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-19  4:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19  4:34 [linux-review:UPDATE-20200919-040329/Daniel-Vetter/managed-drm_device-absolute-final-leftover-bits/20200918-212606 2/4] drivers/gpu/drm/i915/selftests/mock_gem_device.c:147:58: warning: format specifies type 'int' but the argument has type 'long' kernel test robot

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.