Re: [PATCH] usb: gadget: f_fs: show device name in debug message

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

 



Hi Linyu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next next-20230322]
[cannot apply to usb/usb-linus westeri-thunderbolt/next linus/master v6.3-rc3]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Linyu-Yuan/usb-gadget-f_fs-show-device-name-in-debug-message/20230322-183806
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link:    https://lore.kernel.org/r/1679481369-30094-1-git-send-email-quic_linyyuan%40quicinc.com
patch subject: [PATCH] usb: gadget: f_fs: show device name in debug message
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20230322/202303222334.NjjsL9jI-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/930fd85f08c8ea356961f750367a08d40235b599
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Linyu-Yuan/usb-gadget-f_fs-show-device-name-in-debug-message/20230322-183806
        git checkout 930fd85f08c8ea356961f750367a08d40235b599
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 olddefconfig
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/gadget/function/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303222334.NjjsL9jI-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/usb/gadget/function/f_fs.c: In function 'ffs_sb_make_inode':
>> drivers/usb/gadget/function/f_fs.c:1412:26: warning: unused variable 'ffs' [-Wunused-variable]
    1412 |         struct ffs_data *ffs = sb->s_fs_info;
         |                          ^~~
   In file included from include/linux/string.h:254,
                    from arch/x86/include/asm/page_32.h:18,
                    from arch/x86/include/asm/page.h:14,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:60,
                    from arch/x86/include/asm/preempt.h:9,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:56,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/highmem.h:5,
                    from include/linux/bvec.h:10,
                    from include/linux/blk_types.h:10,
                    from include/linux/blkdev.h:9,
                    from drivers/usb/gadget/function/f_fs.c:17:
   In function 'fortify_memcpy_chk',
       inlined from '__ffs_func_bind_do_os_desc' at drivers/usb/gadget/function/f_fs.c:3027:3:
   include/linux/fortify-string.h:529:25: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning]
     529 |                         __read_overflow2_field(q_size_field, size);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/ffs +1412 drivers/usb/gadget/function/f_fs.c

  1400	
  1401	/*
  1402	 * Mounting the file system creates a controller file, used first for
  1403	 * function configuration then later for event monitoring.
  1404	 */
  1405	
  1406	static struct inode *__must_check
  1407	ffs_sb_make_inode(struct super_block *sb, void *data,
  1408			  const struct file_operations *fops,
  1409			  const struct inode_operations *iops,
  1410			  struct ffs_file_perms *perms)
  1411	{
> 1412		struct ffs_data	*ffs = sb->s_fs_info;
  1413		struct inode *inode;
  1414	
  1415		ENTER_FFS();
  1416	
  1417		inode = new_inode(sb);
  1418	
  1419		if (inode) {
  1420			struct timespec64 ts = current_time(inode);
  1421	
  1422			inode->i_ino	 = get_next_ino();
  1423			inode->i_mode    = perms->mode;
  1424			inode->i_uid     = perms->uid;
  1425			inode->i_gid     = perms->gid;
  1426			inode->i_atime   = ts;
  1427			inode->i_mtime   = ts;
  1428			inode->i_ctime   = ts;
  1429			inode->i_private = data;
  1430			if (fops)
  1431				inode->i_fop = fops;
  1432			if (iops)
  1433				inode->i_op  = iops;
  1434		}
  1435	
  1436		return inode;
  1437	}
  1438	

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux