[sailus-media-tree:media-ref 35/39] drivers/media/test-drivers/vim2m.c:1321:16: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int'

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

 



tree:   git://linuxtv.org/sailus/media_tree.git media-ref
head:   a31f71a73822ffd82d3595f199a57894097bc98e
commit: fd2866ddf223912813d12c6887730d2192bb3434 [35/39] koe
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20240124/202401241232.3sHqxkyA-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240124/202401241232.3sHqxkyA-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401241232.3sHqxkyA-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:22,
                    from arch/riscv/include/asm/bug.h:83,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/riscv/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:17,
                    from drivers/media/test-drivers/vim2m.c:16:
   drivers/media/test-drivers/vim2m.c: In function 'vim2m_probe':
>> drivers/media/test-drivers/vim2m.c:1321:16: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
    1321 |         printk("OBJECT vim2m %p, size %x\n", dev, sizeof(*dev));
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~       ~~~~~~~~~~~~
         |                                                   |
         |                                                   long unsigned int
   include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   drivers/media/test-drivers/vim2m.c:1321:9: note: in expansion of macro 'printk'
    1321 |         printk("OBJECT vim2m %p, size %x\n", dev, sizeof(*dev));
         |         ^~~~~~
   drivers/media/test-drivers/vim2m.c:1321:40: note: format string is defined here
    1321 |         printk("OBJECT vim2m %p, size %x\n", dev, sizeof(*dev));
         |                                       ~^
         |                                        |
         |                                        unsigned int
         |                                       %lx


vim +1321 drivers/media/test-drivers/vim2m.c

  1310	
  1311	static int vim2m_probe(struct platform_device *pdev)
  1312	{
  1313		struct vim2m_dev *dev;
  1314		struct video_device *vfd;
  1315		int ret;
  1316	
  1317		dev = kzalloc(sizeof(*dev), GFP_KERNEL);
  1318		if (!dev)
  1319			return -ENOMEM;
  1320	
> 1321		printk("OBJECT vim2m %p, size %x\n", dev, sizeof(*dev));
  1322	
  1323		ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
  1324		if (ret)
  1325			goto error_free;
  1326	
  1327		atomic_set(&dev->num_inst, 0);
  1328		mutex_init(&dev->dev_mutex);
  1329	
  1330		dev->vfd = vim2m_videodev;
  1331		vfd = &dev->vfd;
  1332		vfd->lock = &dev->dev_mutex;
  1333		vfd->v4l2_dev = &dev->v4l2_dev;
  1334	
  1335		video_set_drvdata(vfd, dev);
  1336		v4l2_info(&dev->v4l2_dev,
  1337			  "Device registered as /dev/video%d\n", vfd->num);
  1338	
  1339		platform_set_drvdata(pdev, dev);
  1340	
  1341		dev->m2m_dev = v4l2_m2m_init(&m2m_ops);
  1342		if (IS_ERR(dev->m2m_dev)) {
  1343			v4l2_err(&dev->v4l2_dev, "Failed to init mem2mem device\n");
  1344			ret = PTR_ERR(dev->m2m_dev);
  1345			dev->m2m_dev = NULL;
  1346			goto error_dev;
  1347		}
  1348	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux