lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201811052043.AluJmrOh%fengguang.wu@intel.com>
Date:   Mon, 5 Nov 2018 20:10:01 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Ivan Roman <mr.ivanroman@...il.com>
Cc:     kbuild-all@...org, johan@...nel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, Ivan Roman <mr.ivanroman@...il.com>
Subject: Re: [PATCH] USB: serial: io_ti: Replaced simple_strtoul with
 kstrtoul + Formatting issues

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

Download attachment ".config.gz" of type "application/gzip" (30970 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ