[usb:usb-testing 34/39] drivers/usb/gadget/configfs.c:824:13: warning: variable 'ret' set but not used

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head:   cf13d6e4a9aa6639c173fd630d82d586a2322ff9
commit: 15a7cf8caabee4613764abe7814dd3162cb64137 [34/39] usb: gadget: configfs: Support arbitrary string descriptors
config: arm64-buildonly-randconfig-r002-20230207 (https://download.01.org/0day-ci/archive/20230207/202302071942.wrmMMxiA-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=15a7cf8caabee4613764abe7814dd3162cb64137
        git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
        git fetch --no-tags usb usb-testing
        git checkout 15a7cf8caabee4613764abe7814dd3162cb64137
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/usb/gadget/

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

All warnings (new ones prefixed by >>):

   drivers/usb/gadget/configfs.c: In function 'gadget_string_s_store':
>> drivers/usb/gadget/configfs.c:824:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     824 |         int ret;
         |             ^~~


vim +/ret +824 drivers/usb/gadget/configfs.c

   818	
   819	static ssize_t gadget_string_s_store(struct config_item *item, const char *page,
   820					     size_t len)
   821	{
   822		struct gadget_string *string = to_gadget_string(item);
   823		int size = min(sizeof(string->string), len + 1);
 > 824		int ret;
   825	
   826		if (len > USB_MAX_STRING_LEN)
   827			return -EINVAL;
   828	
   829		ret = strscpy(string->string, page, size);
   830		return len;
   831	}
   832	CONFIGFS_ATTR(gadget_string_, s);
   833	

-- 
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