CC: [email protected]
In-Reply-To: 
<9b5902665dcc4c0fca7546987303e348d8657f59.1626383424.git.apark0...@student.cerritos.edu>
References: 
<9b5902665dcc4c0fca7546987303e348d8657f59.1626383424.git.apark0...@student.cerritos.edu>
TO: Amy Parker <[email protected]>
TO: [email protected]
CC: Amy Parker <[email protected]>
CC: [email protected]
CC: [email protected]

Hi Amy,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.14-rc1 next-20210715]
[cannot apply to pavel-linux-leds/for-next wireless-drivers-next/master 
wireless-drivers/master]
[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/Amy-Parker/leds-change-led_brightness-definition-from-enum-to-typedef/20210716-052140
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
dd9c7df94c1b23feacd54112f33ad95d93f64533
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: i386-randconfig-m021-20210715 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/hid/hid-corsair.c:157 k90_backlight_get() warn: signedness bug 
returning '(-12)'

vim +157 drivers/hid/hid-corsair.c

6f78193ee9ea55 Clément Vuchener 2015-09-30  144  
b14a971f104520 Amy Parker       2021-07-15  145  static led_brightness 
k90_backlight_get(struct led_classdev *led_cdev)
6f78193ee9ea55 Clément Vuchener 2015-09-30  146  {
6f78193ee9ea55 Clément Vuchener 2015-09-30  147         int ret;
6f78193ee9ea55 Clément Vuchener 2015-09-30  148         struct k90_led *led = 
container_of(led_cdev, struct k90_led, cdev);
6f78193ee9ea55 Clément Vuchener 2015-09-30  149         struct device *dev = 
led->cdev.dev->parent;
6f78193ee9ea55 Clément Vuchener 2015-09-30  150         struct usb_interface 
*usbif = to_usb_interface(dev->parent);
6f78193ee9ea55 Clément Vuchener 2015-09-30  151         struct usb_device 
*usbdev = interface_to_usbdev(usbif);
6f78193ee9ea55 Clément Vuchener 2015-09-30  152         int brightness;
6d104af38b570d Johan Hovold     2017-01-12  153         char *data;
6d104af38b570d Johan Hovold     2017-01-12  154  
6d104af38b570d Johan Hovold     2017-01-12  155         data = kmalloc(8, 
GFP_KERNEL);
6d104af38b570d Johan Hovold     2017-01-12  156         if (!data)
6d104af38b570d Johan Hovold     2017-01-12 @157                 return -ENOMEM;
6f78193ee9ea55 Clément Vuchener 2015-09-30  158  
6f78193ee9ea55 Clément Vuchener 2015-09-30  159         ret = 
usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0),
6f78193ee9ea55 Clément Vuchener 2015-09-30  160                               
K90_REQUEST_STATUS,
6f78193ee9ea55 Clément Vuchener 2015-09-30  161                               
USB_DIR_IN | USB_TYPE_VENDOR |
6f78193ee9ea55 Clément Vuchener 2015-09-30  162                               
USB_RECIP_DEVICE, 0, 0, data, 8,
6f78193ee9ea55 Clément Vuchener 2015-09-30  163                               
USB_CTRL_SET_TIMEOUT);
7a546af50eb78a Johan Hovold     2017-01-12  164         if (ret < 5) {
6f78193ee9ea55 Clément Vuchener 2015-09-30  165                 dev_warn(dev, 
"Failed to get K90 initial state (error %d).\n",
6f78193ee9ea55 Clément Vuchener 2015-09-30  166                          ret);
6d104af38b570d Johan Hovold     2017-01-12  167                 ret = -EIO;
6d104af38b570d Johan Hovold     2017-01-12  168                 goto out;
6f78193ee9ea55 Clément Vuchener 2015-09-30  169         }
6f78193ee9ea55 Clément Vuchener 2015-09-30  170         brightness = data[4];
6f78193ee9ea55 Clément Vuchener 2015-09-30  171         if (brightness < 0 || 
brightness > 3) {
6f78193ee9ea55 Clément Vuchener 2015-09-30  172                 dev_warn(dev,
6f78193ee9ea55 Clément Vuchener 2015-09-30  173                          "Read 
invalid backlight brightness: %02hhx.\n",
6f78193ee9ea55 Clément Vuchener 2015-09-30  174                          
data[4]);
6d104af38b570d Johan Hovold     2017-01-12  175                 ret = -EIO;
6d104af38b570d Johan Hovold     2017-01-12  176                 goto out;
6f78193ee9ea55 Clément Vuchener 2015-09-30  177         }
6d104af38b570d Johan Hovold     2017-01-12  178         ret = brightness;
6d104af38b570d Johan Hovold     2017-01-12  179  out:
6d104af38b570d Johan Hovold     2017-01-12  180         kfree(data);
6d104af38b570d Johan Hovold     2017-01-12  181  
6d104af38b570d Johan Hovold     2017-01-12  182         return ret;
6f78193ee9ea55 Clément Vuchener 2015-09-30  183  }
6f78193ee9ea55 Clément Vuchener 2015-09-30  184  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to