Hi Ivan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.20-rc1 next-20181105]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Ivan-Roman/USB-serial-io_ti-Replaced-simple_strtoul-with-kstrtoul-Formatting-issues/20181105-194308
config: x86_64-randconfig-x018-201844 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/posix_types.h:5:0,
                    from include/uapi/linux/types.h:14,
                    from include/linux/compiler.h:163,
                    from include/linux/export.h:45,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:7,
                    from drivers/usb/serial/io_ti.c:16:
   drivers/usb/serial/io_ti.c: In function 'uart_mode_store':
>> include/linux/stddef.h:8:14: warning: passing argument 2 of 'kstrtoul' makes 
>> integer from pointer without a cast [-Wint-conversion]
    #define NULL ((void *)0)
                 ^
>> drivers/usb/serial/io_ti.c:2656:36: note: in expansion of macro 'NULL'
     unsigned int v = kstrtoul(valbuf, NULL, 0);
                                       ^~~~
   In file included from drivers/usb/serial/io_ti.c:16:0:
   include/linux/kernel.h:366:32: note: expected 'unsigned int' but argument is 
of type 'void *'
    static inline int __must_check kstrtoul(const char *s, unsigned int base, 
unsigned long *res)
                                   ^~~~~~~~
--
   In file included from include/uapi/linux/posix_types.h:5:0,
                    from include/uapi/linux/types.h:14,
                    from include/linux/compiler.h:163,
                    from include/linux/export.h:45,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:7,
                    from drivers/usb//serial/io_ti.c:16:
   drivers/usb//serial/io_ti.c: In function 'uart_mode_store':
>> include/linux/stddef.h:8:14: warning: passing argument 2 of 'kstrtoul' makes 
>> integer from pointer without a cast [-Wint-conversion]
    #define NULL ((void *)0)
                 ^
   drivers/usb//serial/io_ti.c:2656:36: note: in expansion of macro 'NULL'
     unsigned int v = kstrtoul(valbuf, NULL, 0);
                                       ^~~~
   In file included from drivers/usb//serial/io_ti.c:16:0:
   include/linux/kernel.h:366:32: note: expected 'unsigned int' but argument is 
of type 'void *'
    static inline int __must_check kstrtoul(const char *s, unsigned int base, 
unsigned long *res)
                                   ^~~~~~~~

vim +/NULL +2656 drivers/usb/serial/io_ti.c

  2650  
  2651  static ssize_t uart_mode_store(struct device *dev,
  2652          struct device_attribute *attr, const char *valbuf, size_t count)
  2653  {
  2654          struct usb_serial_port *port = to_usb_serial_port(dev);
  2655          struct edgeport_port *edge_port = 
usb_get_serial_port_data(port);
> 2656          unsigned int v = kstrtoul(valbuf, NULL, 0);
  2657  
  2658          dev_dbg(dev, "%s: setting uart_mode = %d\n", __func__, v);
  2659  
  2660          if (v < 256)
  2661                  edge_port->bUartMode = v;
  2662          else
  2663                  dev_err(dev, "%s - uart_mode %d is invalid\n", 
__func__, v);
  2664  
  2665          return count;
  2666  }
  2667  static DEVICE_ATTR_RW(uart_mode);
  2668  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to