CC: [email protected]
CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Johan Hovold <[email protected]>
CC: "Greg Kroah-Hartman" <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   f022814633e1c600507b3a99691b4d624c2813f0
commit: 7a14fac0c94472ad2d11ac14cefbeab5bf98e303 USB: serial: io_ti: add 
send-port-command helper
date:   12 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 12 months ago
config: arm-randconfig-c002-20220324 
(https://download.01.org/0day-ci/archive/20220327/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
902f4708fe1d03b0de7e5315ef875006a6adc319)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7a14fac0c94472ad2d11ac14cefbeab5bf98e303
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7a14fac0c94472ad2d11ac14cefbeab5bf98e303
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
clang-analyzer 

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


clang-analyzer warnings: (new ones prefixed by >>)
           if (verbose) {                                                       
   \
           ^
   kernel/locking/locktorture.c:925:4: note: Loop condition is false.  Exiting 
loop
                           VERBOSE_TOROUT_STRING("cxt.lwsa: Out of memory");
                           ^
   include/linux/torture.h:34:34: note: expanded from macro 
'VERBOSE_TOROUT_STRING'
   #define VERBOSE_TOROUT_STRING(s) \
                                    ^
   kernel/locking/locktorture.c:927:4: note: Control jumps to line 1058
                           goto unwind;
                           ^
   kernel/locking/locktorture.c:1059:2: note: Calling 'lock_torture_cleanup'
           lock_torture_cleanup();
           ^~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:794:6: note: Assuming the condition is false
           if (torture_cleanup_begin())
               ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:794:2: note: Taking false branch
           if (torture_cleanup_begin())
           ^
   kernel/locking/locktorture.c:804:6: note: Assuming field 'lwsa' is non-null
           if (!cxt.lwsa && !cxt.lrsa)
               ^~~~~~~~~
   kernel/locking/locktorture.c:804:16: note: Left side of '&&' is false
           if (!cxt.lwsa && !cxt.lrsa)
                         ^
   kernel/locking/locktorture.c:807:6: note: Assuming 'writer_tasks' is null
           if (writer_tasks) {
               ^~~~~~~~~~~~
   kernel/locking/locktorture.c:807:2: note: Taking false branch
           if (writer_tasks) {
           ^
   kernel/locking/locktorture.c:815:6: note: Assuming 'reader_tasks' is null
           if (reader_tasks) {
               ^~~~~~~~~~~~
   kernel/locking/locktorture.c:815:2: note: Taking false branch
           if (reader_tasks) {
           ^
   kernel/locking/locktorture.c:824:2: note: Calling 'lock_torture_stats_print'
           lock_torture_stats_print();  /* -After- the stats thread is stopped! 
*/
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:731:6: note: Assuming field 'readlock' is null
           if (cxt.cur_ops->readlock)
               ^~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:731:2: note: Taking false branch
           if (cxt.cur_ops->readlock)
           ^
   kernel/locking/locktorture.c:734:8: note: Calling 'kmalloc'
           buf = kmalloc(size, GFP_KERNEL);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/slab.h:542:2: note: Taking false branch
           if (__builtin_constant_p(size)) {
           ^
   include/linux/slab.h:559:9: note: Value assigned to 'cxt.lwsa'
           return __kmalloc(size, flags);
                  ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/slab.h:559:2: note: Returning pointer, which participates in a 
condition later
           return __kmalloc(size, flags);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:734:8: note: Returning from 'kmalloc'
           buf = kmalloc(size, GFP_KERNEL);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:735:6: note: Assuming 'buf' is non-null
           if (!buf) {
               ^~~~
   kernel/locking/locktorture.c:735:2: note: Taking false branch
           if (!buf) {
           ^
   kernel/locking/locktorture.c:741:29: note: Passing value via 2nd parameter 
'statp'
           __torture_print_stats(buf, cxt.lwsa, true);
                                      ^~~~~~~~
   kernel/locking/locktorture.c:741:2: note: Calling '__torture_print_stats'
           __torture_print_stats(buf, cxt.lwsa, true);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:695:22: note: Assuming 'statp' is null
           long max = 0, min = statp ? statp[0].n_lock_acquired : 0;
                               ^~~~~
   kernel/locking/locktorture.c:695:22: note: '?' condition is false
   kernel/locking/locktorture.c:698:13: note: 'write' is true
           n_stress = write ? cxt.nrealwriters_stress : cxt.nrealreaders_stress;
                      ^~~~~
   kernel/locking/locktorture.c:698:13: note: '?' condition is true
   kernel/locking/locktorture.c:699:14: note: Assuming 'i' is < 'n_stress'
           for (i = 0; i < n_stress; i++) {
                       ^~~~~~~~~~~~
   kernel/locking/locktorture.c:699:2: note: Loop condition is true.  Entering 
loop body
           for (i = 0; i < n_stress; i++) {
           ^
   kernel/locking/locktorture.c:700:7: note: Dereference of null pointer
                   if (statp[i].n_lock_fail)
                       ^~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:708:2: warning: Value stored to 'page' is never 
read [clang-analyzer-deadcode.DeadStores]
           page += sprintf(page,
           ^       ~~~~~~~~~~~~~
   kernel/locking/locktorture.c:708:2: note: Value stored to 'page' is never 
read
           page += sprintf(page,
           ^       ~~~~~~~~~~~~~
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   10 warnings generated.
>> drivers/usb/serial/io_ti.c:298:6: warning: Value stored to 'port_number' 
>> during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           int port_number = port->port_number;
               ^~~~~~~~~~~   ~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:298:6: note: Value stored to 'port_number' during 
its initialization is never read
           int port_number = port->port_number;
               ^~~~~~~~~~~   ~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:749:17: warning: Value stored to 'dev' during its 
initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = &serial->serial->dev->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:749:17: note: Value stored to 'dev' during its 
initialization is never read
           struct device *dev = &serial->serial->dev->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:772:2: warning: Value stored to 'desc' is never 
read [clang-analyzer-deadcode.DeadStores]
           desc = (struct edge_ti_manuf_descriptor *)buffer;
           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:772:2: note: Value stored to 'desc' is never read
           desc = (struct edge_ti_manuf_descriptor *)buffer;
           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:856:17: warning: Value stored to 'dev' during its 
initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = &serial->serial->dev->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:856:17: note: Value stored to 'dev' during its 
initialization is never read
           struct device *dev = &serial->serial->dev->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:1230:4: warning: Value stored to 'status' is 
never read [clang-analyzer-deadcode.DeadStores]
                           status = ti_vsend_sync(serial->serial->dev,
                           ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:1230:4: note: Value stored to 'status' is never 
read
                           status = ti_vsend_sync(serial->serial->dev,
                           ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:1372:17: warning: Value stored to 'dev' during 
its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = &serial->serial->interface->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:1372:17: note: Value stored to 'dev' during its 
initialization is never read
           struct device *dev = &serial->serial->interface->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:1375:26: warning: Value stored to 'fw_hdr' during 
its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data;
                                   ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:1375:26: note: Value stored to 'fw_hdr' during 
its initialization is never read
           struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data;
                                   ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:1744:2: warning: Value stored to 'port_number' is 
never read [clang-analyzer-deadcode.DeadStores]
           port_number = edge_port->port->port_number;
           ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:1744:2: note: Value stored to 'port_number' is 
never read
           port_number = edge_port->port->port_number;
           ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:2210:17: warning: Value stored to 'dev' during 
its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = &edge_port->port->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/serial/io_ti.c:2210:17: note: Value stored to 'dev' during its 
initialization is never read
           struct device *dev = &edge_port->port->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~~~~
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   2 warnings generated.
   drivers/w1/slaves/w1_ds2438.c:60:3: warning: Value stored to 'crc' is never 
read [clang-analyzer-deadcode.DeadStores]
                   crc = 0;
                   ^     ~
   drivers/w1/slaves/w1_ds2438.c:60:3: note: Value stored to 'crc' is never read
                   crc = 0;
                   ^     ~
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   1 warning generated.
   Suppressed 1 warnings (1 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.

vim +/port_number +298 drivers/usb/serial/io_ti.c

^1da177e4c3f415 Linus Torvalds     2005-04-16  294  
^1da177e4c3f415 Linus Torvalds     2005-04-16  295  /* clear tx/rx buffers and 
fifo in TI UMP */
2742fd889932834 Alan Cox           2008-04-29  296  static int 
purge_port(struct usb_serial_port *port, __u16 mask)
^1da177e4c3f415 Linus Torvalds     2005-04-16  297  {
1143832eca8f1d6 Greg Kroah-Hartman 2013-06-06 @298      int port_number = 
port->port_number;
^1da177e4c3f415 Linus Torvalds     2005-04-16  299  
67e6da702753dac Greg Kroah-Hartman 2012-09-14  300      dev_dbg(&port->dev, "%s 
- port %d, mask %x\n", __func__, port_number, mask);
^1da177e4c3f415 Linus Torvalds     2005-04-16  301  
7a14fac0c94472a Johan Hovold       2021-04-12  302      return 
send_port_cmd(port, UMPC_PURGE_PORT, mask, NULL, 0);
^1da177e4c3f415 Linus Torvalds     2005-04-16  303  }
^1da177e4c3f415 Linus Torvalds     2005-04-16  304  

:::::: The code at line 298 was first introduced by commit
:::::: 1143832eca8f1d64da7d85642c956ae9d25c69e1 USB: serial: ports: add minor 
and port number

:::::: TO: Greg Kroah-Hartman <[email protected]>
:::::: CC: Greg Kroah-Hartman <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to