Re: [PATCH] trivial: uapi: replace bitshifts with BIT macro

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

 



Hi Garrit,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.8-rc6 next-20200724]
[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/Garrit-Franke/trivial-uapi-replace-bitshifts-with-BIT-macro/20200725-030550
base:   git://linuxtv.org/media_tree.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:404,
                    from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from drivers/media/platform/video-mux.c:10:
   drivers/media/platform/video-mux.c: In function 'video_mux_link_setup':
>> drivers/media/platform/video-mux.c:67:19: warning: format '%d' expects argument of type 'int', but argument 8 has type 'long unsigned int' [-Wformat=]
      67 |  dev_dbg(sd->dev, "link setup '%s':%d->'%s':%d[%d]",
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
     125 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
     157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/media/platform/video-mux.c:67:2: note: in expansion of macro 'dev_dbg'
      67 |  dev_dbg(sd->dev, "link setup '%s':%d->'%s':%d[%d]",
         |  ^~~~~~~
   drivers/media/platform/video-mux.c:67:49: note: format string is defined here
      67 |  dev_dbg(sd->dev, "link setup '%s':%d->'%s':%d[%d]",
         |                                                ~^
         |                                                 |
         |                                                 int
         |                                                %ld

vim +67 drivers/media/platform/video-mux.c

68803ad4522f5de Philipp Zabel 2017-06-07   50  
68803ad4522f5de Philipp Zabel 2017-06-07   51  static int video_mux_link_setup(struct media_entity *entity,
68803ad4522f5de Philipp Zabel 2017-06-07   52  				const struct media_pad *local,
68803ad4522f5de Philipp Zabel 2017-06-07   53  				const struct media_pad *remote, u32 flags)
68803ad4522f5de Philipp Zabel 2017-06-07   54  {
68803ad4522f5de Philipp Zabel 2017-06-07   55  	struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
68803ad4522f5de Philipp Zabel 2017-06-07   56  	struct video_mux *vmux = v4l2_subdev_to_video_mux(sd);
fd32d5349653139 Chris Lesiak  2018-04-03   57  	u16 source_pad = entity->num_pads - 1;
68803ad4522f5de Philipp Zabel 2017-06-07   58  	int ret = 0;
68803ad4522f5de Philipp Zabel 2017-06-07   59  
68803ad4522f5de Philipp Zabel 2017-06-07   60  	/*
68803ad4522f5de Philipp Zabel 2017-06-07   61  	 * The mux state is determined by the enabled sink pad link.
68803ad4522f5de Philipp Zabel 2017-06-07   62  	 * Enabling or disabling the source pad link has no effect.
68803ad4522f5de Philipp Zabel 2017-06-07   63  	 */
68803ad4522f5de Philipp Zabel 2017-06-07   64  	if (local->flags & MEDIA_PAD_FL_SOURCE)
68803ad4522f5de Philipp Zabel 2017-06-07   65  		return 0;
68803ad4522f5de Philipp Zabel 2017-06-07   66  
68803ad4522f5de Philipp Zabel 2017-06-07  @67  	dev_dbg(sd->dev, "link setup '%s':%d->'%s':%d[%d]",
68803ad4522f5de Philipp Zabel 2017-06-07   68  		remote->entity->name, remote->index, local->entity->name,
68803ad4522f5de Philipp Zabel 2017-06-07   69  		local->index, flags & MEDIA_LNK_FL_ENABLED);
68803ad4522f5de Philipp Zabel 2017-06-07   70  
68803ad4522f5de Philipp Zabel 2017-06-07   71  	mutex_lock(&vmux->lock);
68803ad4522f5de Philipp Zabel 2017-06-07   72  
68803ad4522f5de Philipp Zabel 2017-06-07   73  	if (flags & MEDIA_LNK_FL_ENABLED) {
68803ad4522f5de Philipp Zabel 2017-06-07   74  		if (vmux->active == local->index)
68803ad4522f5de Philipp Zabel 2017-06-07   75  			goto out;
68803ad4522f5de Philipp Zabel 2017-06-07   76  
68803ad4522f5de Philipp Zabel 2017-06-07   77  		if (vmux->active >= 0) {
68803ad4522f5de Philipp Zabel 2017-06-07   78  			ret = -EBUSY;
68803ad4522f5de Philipp Zabel 2017-06-07   79  			goto out;
68803ad4522f5de Philipp Zabel 2017-06-07   80  		}
68803ad4522f5de Philipp Zabel 2017-06-07   81  
68803ad4522f5de Philipp Zabel 2017-06-07   82  		dev_dbg(sd->dev, "setting %d active\n", local->index);
435945e08551ef0 Philipp Zabel 2017-07-18   83  		ret = mux_control_try_select(vmux->mux, local->index);
68803ad4522f5de Philipp Zabel 2017-06-07   84  		if (ret < 0)
68803ad4522f5de Philipp Zabel 2017-06-07   85  			goto out;
68803ad4522f5de Philipp Zabel 2017-06-07   86  		vmux->active = local->index;
fd32d5349653139 Chris Lesiak  2018-04-03   87  
fd32d5349653139 Chris Lesiak  2018-04-03   88  		/* Propagate the active format to the source */
fd32d5349653139 Chris Lesiak  2018-04-03   89  		vmux->format_mbus[source_pad] = vmux->format_mbus[vmux->active];
68803ad4522f5de Philipp Zabel 2017-06-07   90  	} else {
68803ad4522f5de Philipp Zabel 2017-06-07   91  		if (vmux->active != local->index)
68803ad4522f5de Philipp Zabel 2017-06-07   92  			goto out;
68803ad4522f5de Philipp Zabel 2017-06-07   93  
68803ad4522f5de Philipp Zabel 2017-06-07   94  		dev_dbg(sd->dev, "going inactive\n");
435945e08551ef0 Philipp Zabel 2017-07-18   95  		mux_control_deselect(vmux->mux);
68803ad4522f5de Philipp Zabel 2017-06-07   96  		vmux->active = -1;
68803ad4522f5de Philipp Zabel 2017-06-07   97  	}
68803ad4522f5de Philipp Zabel 2017-06-07   98  
68803ad4522f5de Philipp Zabel 2017-06-07   99  out:
68803ad4522f5de Philipp Zabel 2017-06-07  100  	mutex_unlock(&vmux->lock);
68803ad4522f5de Philipp Zabel 2017-06-07  101  	return ret;
68803ad4522f5de Philipp Zabel 2017-06-07  102  }
68803ad4522f5de Philipp Zabel 2017-06-07  103  

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

Attachment: .config.gz
Description: application/gzip


[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