Re: [PATCH v4 2/5] HID: nintendo: drc: add support for the Wii U gamepad

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

 



Hi Emmanuel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hid/for-next]
[cannot apply to jikos-hid/for-next jikos-trivial/for-next v5.15 next-20211105]
[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/Emmanuel-Gil-Peyrot/HID-nintendo-split-switch-support-into-its-own-file/20211019-200531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
config: x86_64-randconfig-r036-20211027 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72)
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/0day-ci/linux/commit/8f5b7e20f3960b78503b3a6239e3238493029852
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Emmanuel-Gil-Peyrot/HID-nintendo-split-switch-support-into-its-own-file/20211019-200531
        git checkout 8f5b7e20f3960b78503b3a6239e3238493029852
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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/hid/hid-nintendo.c:38:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (id->product == USB_DEVICE_ID_NINTENDO_WIIU_DRH)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo.c:45:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/hid/hid-nintendo.c:38:2: note: remove the 'if' if its condition is always true
           if (id->product == USB_DEVICE_ID_NINTENDO_WIIU_DRH)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-nintendo.c:35:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +38 drivers/hid/hid-nintendo.c

    31	
    32	static int nintendo_hid_probe(struct hid_device *hdev,
    33				      const struct hid_device_id *id)
    34	{
    35		int ret;
    36	
    37	#ifdef CONFIG_HID_NINTENDO_WIIU
  > 38		if (id->product == USB_DEVICE_ID_NINTENDO_WIIU_DRH)
    39			ret = wiiu_hid_probe(hdev, id);
    40	#endif
    41	#ifdef CONFIG_HID_NINTENDO_SWITCH
    42		if (id->product != USB_DEVICE_ID_NINTENDO_WIIU_DRH)
    43			ret = switch_hid_probe(hdev, id);
    44	#endif
    45		return ret;
    46	}
    47	

---
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 Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux