Re: [PATCH V2] dmabuf: ensure unique directory name for dmabuf stats

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

 



Hi Charan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.18-rc6 next-20220510]
[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/intel-lab-lkp/linux/commits/Charan-Teja-Kalla/dmabuf-ensure-unique-directory-name-for-dmabuf-stats/20220510-221009
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9be9ed2612b5aedb52a2c240edb1630b6b743cb6
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220511/202205110511.E0d8TXXC-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 11.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
        # https://github.com/intel-lab-lkp/linux/commit/1bc947824de94b4d4a87c48772c0d36872eaf731
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Charan-Teja-Kalla/dmabuf-ensure-unique-directory-name-for-dmabuf-stats/20220510-221009
        git checkout 1bc947824de94b4d4a87c48772c0d36872eaf731
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/dma-buf/

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

All warnings (new ones prefixed by >>):

   drivers/dma-buf/dma-buf-sysfs-stats.c: In function 'dma_buf_stats_setup':
>> drivers/dma-buf/dma-buf-sysfs-stats.c:196:43: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 's64' {aka 'long long int'} [-Wformat=]
     196 |                                    "%lu-%lu", file_inode(dmabuf->file)->i_ino,
         |                                         ~~^
         |                                           |
         |                                           long unsigned int
         |                                         %llu
     197 |                                    atomic64_add_return(1, &unique_id));
         |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                    |
         |                                    s64 {aka long long int}


vim +196 drivers/dma-buf/dma-buf-sysfs-stats.c

   170	
   171	int dma_buf_stats_setup(struct dma_buf *dmabuf)
   172	{
   173		struct dma_buf_sysfs_entry *sysfs_entry;
   174		int ret;
   175		static atomic64_t unique_id = ATOMIC_INIT(0);
   176	
   177		if (!dmabuf || !dmabuf->file)
   178			return -EINVAL;
   179	
   180		if (!dmabuf->exp_name) {
   181			pr_err("exporter name must not be empty if stats needed\n");
   182			return -EINVAL;
   183		}
   184	
   185		sysfs_entry = kzalloc(sizeof(struct dma_buf_sysfs_entry), GFP_KERNEL);
   186		if (!sysfs_entry)
   187			return -ENOMEM;
   188	
   189		sysfs_entry->kobj.kset = dma_buf_per_buffer_stats_kset;
   190		sysfs_entry->dmabuf = dmabuf;
   191	
   192		dmabuf->sysfs_entry = sysfs_entry;
   193	
   194		/* create the directory for buffer stats */
   195		ret = kobject_init_and_add(&sysfs_entry->kobj, &dma_buf_ktype, NULL,
 > 196					   "%lu-%lu", file_inode(dmabuf->file)->i_ino,

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[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