[staging:staging-testing 42/93] drivers/staging//media/tegra-vde/tegra-vde.c:265:5: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   64ce301c971bb323ab63f59014498d7e975586ee
commit: 42e764d05712c07e44318bc8f6b8665a9c216505 [42/93] staging: tegravde: replace bit assignment with macro
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 42e764d05712c07e44318bc8f6b8665a9c216505
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=sh 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:336:0,
                    from include/linux/kernel.h:14,
                    from include/linux/clk.h:16,
                    from drivers/staging//media/tegra-vde/tegra-vde.c:12:
   drivers/staging//media/tegra-vde/tegra-vde.c: In function 'tegra_vde_setup_iram_tables':
>> drivers/staging//media/tegra-vde/tegra-vde.c:265:5: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int' [-Wformat=]
        "\tFrame %d: frame_num = %d B_frame = %d\n",
        ^
   include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
      __dynamic_dev_dbg(&descriptor, dev, fmt, \
                                          ^~~
   include/linux/device.h:1463:23: note: in expansion of macro 'dev_fmt'
     dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
                          ^~~~~~~
>> drivers/staging//media/tegra-vde/tegra-vde.c:264:4: note: in expansion of macro 'dev_dbg'
       dev_dbg(vde->miscdev.parent,
       ^~~~~~~

vim +265 drivers/staging//media/tegra-vde/tegra-vde.c

cd6c56fe Dmitry Osipenko 2017-12-11  237  
cd6c56fe Dmitry Osipenko 2017-12-11  238  static void tegra_vde_setup_iram_tables(struct tegra_vde *vde,
cd6c56fe Dmitry Osipenko 2017-12-11  239  					struct video_frame *dpb_frames,
cd6c56fe Dmitry Osipenko 2017-12-11  240  					unsigned int ref_frames_nb,
cd6c56fe Dmitry Osipenko 2017-12-11  241  					unsigned int with_earlier_poc_nb)
cd6c56fe Dmitry Osipenko 2017-12-11  242  {
cd6c56fe Dmitry Osipenko 2017-12-11  243  	struct video_frame *frame;
cd6c56fe Dmitry Osipenko 2017-12-11  244  	u32 value, aux_addr;
cd6c56fe Dmitry Osipenko 2017-12-11  245  	int with_later_poc_nb;
cd6c56fe Dmitry Osipenko 2017-12-11  246  	unsigned int i, k;
cd6c56fe Dmitry Osipenko 2017-12-11  247  
cd6c56fe Dmitry Osipenko 2017-12-11  248  	dev_dbg(vde->miscdev.parent, "DPB: Frame 0: frame_num = %d\n",
cd6c56fe Dmitry Osipenko 2017-12-11  249  		dpb_frames[0].frame_num);
cd6c56fe Dmitry Osipenko 2017-12-11  250  
cd6c56fe Dmitry Osipenko 2017-12-11  251  	dev_dbg(vde->miscdev.parent, "REF L0:\n");
cd6c56fe Dmitry Osipenko 2017-12-11  252  
cd6c56fe Dmitry Osipenko 2017-12-11  253  	for (i = 0; i < 16; i++) {
cd6c56fe Dmitry Osipenko 2017-12-11  254  		if (i < ref_frames_nb) {
cd6c56fe Dmitry Osipenko 2017-12-11  255  			frame = &dpb_frames[i + 1];
cd6c56fe Dmitry Osipenko 2017-12-11  256  
cd6c56fe Dmitry Osipenko 2017-12-11  257  			aux_addr = frame->aux_addr;
cd6c56fe Dmitry Osipenko 2017-12-11  258  
cd6c56fe Dmitry Osipenko 2017-12-11  259  			value  = (i + 1) << 26;
cd6c56fe Dmitry Osipenko 2017-12-11  260  			value |= !(frame->flags & FLAG_B_FRAME) << 25;
cd6c56fe Dmitry Osipenko 2017-12-11  261  			value |= 1 << 24;
cd6c56fe Dmitry Osipenko 2017-12-11  262  			value |= frame->frame_num;
cd6c56fe Dmitry Osipenko 2017-12-11  263  
cd6c56fe Dmitry Osipenko 2017-12-11 @264  			dev_dbg(vde->miscdev.parent,
cd6c56fe Dmitry Osipenko 2017-12-11 @265  				"\tFrame %d: frame_num = %d B_frame = %d\n",
cd6c56fe Dmitry Osipenko 2017-12-11  266  				i + 1, frame->frame_num,
cd6c56fe Dmitry Osipenko 2017-12-11  267  				(frame->flags & FLAG_B_FRAME));
cd6c56fe Dmitry Osipenko 2017-12-11  268  		} else {
cd6c56fe Dmitry Osipenko 2017-12-11  269  			aux_addr = 0x6ADEAD00;
cd6c56fe Dmitry Osipenko 2017-12-11  270  			value = 0;
cd6c56fe Dmitry Osipenko 2017-12-11  271  		}
cd6c56fe Dmitry Osipenko 2017-12-11  272  
cd6c56fe Dmitry Osipenko 2017-12-11  273  		tegra_vde_setup_iram_entry(vde, 0, i, value, aux_addr);
cd6c56fe Dmitry Osipenko 2017-12-11  274  		tegra_vde_setup_iram_entry(vde, 1, i, value, aux_addr);
cd6c56fe Dmitry Osipenko 2017-12-11  275  		tegra_vde_setup_iram_entry(vde, 2, i, value, aux_addr);
cd6c56fe Dmitry Osipenko 2017-12-11  276  		tegra_vde_setup_iram_entry(vde, 3, i, value, aux_addr);
cd6c56fe Dmitry Osipenko 2017-12-11  277  	}
cd6c56fe Dmitry Osipenko 2017-12-11  278  
cd6c56fe Dmitry Osipenko 2017-12-11  279  	if (!(dpb_frames[0].flags & FLAG_B_FRAME))
cd6c56fe Dmitry Osipenko 2017-12-11  280  		return;
cd6c56fe Dmitry Osipenko 2017-12-11  281  
cd6c56fe Dmitry Osipenko 2017-12-11  282  	if (with_earlier_poc_nb >= ref_frames_nb)
cd6c56fe Dmitry Osipenko 2017-12-11  283  		return;
cd6c56fe Dmitry Osipenko 2017-12-11  284  
cd6c56fe Dmitry Osipenko 2017-12-11  285  	with_later_poc_nb = ref_frames_nb - with_earlier_poc_nb;
cd6c56fe Dmitry Osipenko 2017-12-11  286  
cd6c56fe Dmitry Osipenko 2017-12-11  287  	dev_dbg(vde->miscdev.parent,
cd6c56fe Dmitry Osipenko 2017-12-11  288  		"REF L1: with_later_poc_nb %d with_earlier_poc_nb %d\n",
cd6c56fe Dmitry Osipenko 2017-12-11  289  		 with_later_poc_nb, with_earlier_poc_nb);
cd6c56fe Dmitry Osipenko 2017-12-11  290  
cd6c56fe Dmitry Osipenko 2017-12-11  291  	for (i = 0, k = with_earlier_poc_nb; i < with_later_poc_nb; i++, k++) {
cd6c56fe Dmitry Osipenko 2017-12-11  292  		frame = &dpb_frames[k + 1];
cd6c56fe Dmitry Osipenko 2017-12-11  293  
cd6c56fe Dmitry Osipenko 2017-12-11  294  		aux_addr = frame->aux_addr;
cd6c56fe Dmitry Osipenko 2017-12-11  295  
cd6c56fe Dmitry Osipenko 2017-12-11  296  		value  = (k + 1) << 26;
cd6c56fe Dmitry Osipenko 2017-12-11  297  		value |= !(frame->flags & FLAG_B_FRAME) << 25;
cd6c56fe Dmitry Osipenko 2017-12-11  298  		value |= 1 << 24;
cd6c56fe Dmitry Osipenko 2017-12-11  299  		value |= frame->frame_num;
cd6c56fe Dmitry Osipenko 2017-12-11  300  
cd6c56fe Dmitry Osipenko 2017-12-11  301  		dev_dbg(vde->miscdev.parent,
cd6c56fe Dmitry Osipenko 2017-12-11  302  			"\tFrame %d: frame_num = %d\n",
cd6c56fe Dmitry Osipenko 2017-12-11  303  			k + 1, frame->frame_num);
cd6c56fe Dmitry Osipenko 2017-12-11  304  
cd6c56fe Dmitry Osipenko 2017-12-11  305  		tegra_vde_setup_iram_entry(vde, 2, i, value, aux_addr);
cd6c56fe Dmitry Osipenko 2017-12-11  306  	}
cd6c56fe Dmitry Osipenko 2017-12-11  307  
cd6c56fe Dmitry Osipenko 2017-12-11  308  	for (k = 0; i < ref_frames_nb; i++, k++) {
cd6c56fe Dmitry Osipenko 2017-12-11  309  		frame = &dpb_frames[k + 1];
cd6c56fe Dmitry Osipenko 2017-12-11  310  
cd6c56fe Dmitry Osipenko 2017-12-11  311  		aux_addr = frame->aux_addr;
cd6c56fe Dmitry Osipenko 2017-12-11  312  
cd6c56fe Dmitry Osipenko 2017-12-11  313  		value  = (k + 1) << 26;
cd6c56fe Dmitry Osipenko 2017-12-11  314  		value |= !(frame->flags & FLAG_B_FRAME) << 25;
cd6c56fe Dmitry Osipenko 2017-12-11  315  		value |= 1 << 24;
cd6c56fe Dmitry Osipenko 2017-12-11  316  		value |= frame->frame_num;
cd6c56fe Dmitry Osipenko 2017-12-11  317  
cd6c56fe Dmitry Osipenko 2017-12-11  318  		dev_dbg(vde->miscdev.parent,
cd6c56fe Dmitry Osipenko 2017-12-11  319  			"\tFrame %d: frame_num = %d\n",
cd6c56fe Dmitry Osipenko 2017-12-11  320  			k + 1, frame->frame_num);
cd6c56fe Dmitry Osipenko 2017-12-11  321  
cd6c56fe Dmitry Osipenko 2017-12-11  322  		tegra_vde_setup_iram_entry(vde, 2, i, value, aux_addr);
cd6c56fe Dmitry Osipenko 2017-12-11  323  	}
cd6c56fe Dmitry Osipenko 2017-12-11  324  }
cd6c56fe Dmitry Osipenko 2017-12-11  325  

:::::: The code at line 265 was first introduced by commit
:::::: cd6c56feb591f6fe66bebcbeb43ecc0e2acdcffa media: staging: media: Introduce NVIDIA Tegra video decoder driver

:::::: TO: Dmitry Osipenko <digetx@xxxxxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux