All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-12-09 20:13 kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-12-09 20:13 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 17707 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Alex Elder <elder@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2a987e65025e2b79c6d453b78cb5985ac6e5eb26
commit: 99e75a37bd0af8eb8a0560f48091672b1b6d9218 net: ipa: relax 64-bit build requirement
date:   9 months ago
:::::: branch date: 2 days ago
:::::: commit date: 9 months ago
config: arm-randconfig-c002-20211201 (https://download.01.org/0day-ci/archive/20211210/202112100459.2zN1UKNj-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 25eb7fa01d7ebbe67648ea03841cda55b4239ab2)
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=99e75a37bd0af8eb8a0560f48091672b1b6d9218
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 99e75a37bd0af8eb8a0560f48091672b1b6d9218
        # 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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
           ^
   drivers/virtio/virtio_ring.c:1128:15: note: Assuming 'total_sg' is <= field 'num'
           WARN_ON_ONCE(total_sg > vq->packed.vring.num && !vq->indirect);
                        ^
   include/asm-generic/bug.h:201:41: note: expanded from macro 'WARN_ON_ONCE'
   #define WARN_ON_ONCE(condition) WARN_ON(condition)
                                           ^~~~~~~~~
   include/asm-generic/bug.h:188:25: note: expanded from macro 'WARN_ON'
           int __ret_warn_on = !!(condition);                              \
                                  ^~~~~~~~~
   drivers/virtio/virtio_ring.c:1128:47: note: Left side of '&&' is false
           WARN_ON_ONCE(total_sg > vq->packed.vring.num && !vq->indirect);
                                                        ^
   drivers/virtio/virtio_ring.c:1134:15: note: Assuming 'descs_used' is <= field 'num_free'
           if (unlikely(vq->vq.num_free < descs_used)) {
                        ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   drivers/virtio/virtio_ring.c:1134:2: note: Taking false branch
           if (unlikely(vq->vq.num_free < descs_used)) {
           ^
   drivers/virtio/virtio_ring.c:1142:9: note: Assuming 'id' is not equal to field 'num'
           BUG_ON(id == vq->packed.vring.num);
                  ^
   include/asm-generic/bug.h:183:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   drivers/virtio/virtio_ring.c:1142:2: note: Taking false branch
           BUG_ON(id == vq->packed.vring.num);
           ^
   include/asm-generic/bug.h:183:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   drivers/virtio/virtio_ring.c:1142:2: note: Loop condition is false.  Exiting loop
           BUG_ON(id == vq->packed.vring.num);
           ^
   include/asm-generic/bug.h:183:27: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                             ^
   drivers/virtio/virtio_ring.c:1146:2: note: Loop condition is true.  Entering loop body
           for (n = 0; n < out_sgs + in_sgs; n++) {
           ^
   drivers/virtio/virtio_ring.c:1147:3: note: Loop condition is false. Execution continues on line 1146
                   for (sg = sgs[n]; sg; sg = sg_next(sg)) {
                   ^
   drivers/virtio/virtio_ring.c:1146:2: note: Loop condition is false. Execution continues on line 1183
           for (n = 0; n < out_sgs + in_sgs; n++) {
           ^
   drivers/virtio/virtio_ring.c:1183:6: note: 'i' is >= 'head'
           if (i < head)
               ^
   drivers/virtio/virtio_ring.c:1183:2: note: Taking false branch
           if (i < head)
           ^
   drivers/virtio/virtio_ring.c:1205:36: note: Assigned value is garbage or undefined
           vq->packed.vring.desc[head].flags = head_flags;
                                             ^ ~~~~~~~~~~
   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.
   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.
   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.
   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.
   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.
   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.
   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.
   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.
   24 warnings generated.
   Suppressed 24 warnings (24 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.
   6 warnings generated.
   Suppressed 6 warnings (6 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   5 warnings generated.
>> drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
                       ^~~
   drivers/net/ipa/ipa_qmi.c:128:14: note: Value stored to 'ipa' during its initialization is never read
           struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
                       ^~~
   Suppressed 4 warnings (4 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   include/asm-generic/bitops/non-atomic.h:106:16: warning: Array access (from variable 'addr') results in a null pointer dereference [clang-analyzer-core.NullDereference]
           return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
                         ^
   drivers/usb/gadget/function/u_serial.c:359:26: note: Left side of '&&' is false
           struct gs_port          *port = container_of(w, struct gs_port, push);
                                           ^
   include/linux/kernel.h:709:61: note: expanded from macro 'container_of'
           BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
                                                                      ^
   drivers/usb/gadget/function/u_serial.c:359:26: note: Taking false branch
           struct gs_port          *port = container_of(w, struct gs_port, push);
                                           ^
   include/linux/kernel.h:709:2: note: expanded from macro 'container_of'
           BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
           ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   include/linux/compiler_types.h:320:2: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ^
   include/linux/compiler_types.h:308:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:300:3: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                   ^
   drivers/usb/gadget/function/u_serial.c:359:26: note: Loop condition is false.  Exiting loop
           struct gs_port          *port = container_of(w, struct gs_port, push);
                                           ^
   include/linux/kernel.h:709:2: note: expanded from macro 'container_of'
           BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
           ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   include/linux/compiler_types.h:320:2: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ^
   include/linux/compiler_types.h:308:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:298:2: note: expanded from macro '__compiletime_assert'
           do {                                                            \
           ^
   drivers/usb/gadget/function/u_serial.c:366:2: note: Calling 'spin_lock_irq'
           spin_lock_irq(&port->port_lock);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/spinlock.h:379:2: note: Value assigned to field 'tty'
           raw_spin_lock_irq(&lock->rlock);
           ^
   include/linux/spinlock.h:282:34: note: expanded from macro 'raw_spin_lock_irq'
   #define raw_spin_lock_irq(lock)         _raw_spin_lock_irq(lock)
                                           ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/function/u_serial.c:366:2: note: Returning from 'spin_lock_irq'
           spin_lock_irq(&port->port_lock);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/function/u_serial.c:367:2: note: Value assigned to 'tty'
           tty = port->port.tty;
           ^~~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/function/u_serial.c:368:2: note: Loop condition is true.  Entering loop body
           while (!list_empty(queue)) {
           ^
   drivers/usb/gadget/function/u_serial.c:371:9: note: Left side of '&&' is false
                   req = list_first_entry(queue, struct usb_request, list);
                         ^
   include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   include/linux/kernel.h:709:61: note: expanded from macro 'container_of'
           BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
                                                                      ^
   drivers/usb/gadget/function/u_serial.c:371:9: note: Taking false branch
                   req = list_first_entry(queue, struct usb_request, list);

vim +/ipa +128 drivers/net/ipa/ipa_qmi.c

530f9216a9537b5 Alex Elder 2020-03-05  116  
530f9216a9537b5 Alex Elder 2020-03-05  117  /* Determine whether everything is ready to start normal operation.
530f9216a9537b5 Alex Elder 2020-03-05  118   * We know everything (else) is ready when we know the IPA driver on
530f9216a9537b5 Alex Elder 2020-03-05  119   * the modem is ready, and the microcontroller is ready.
530f9216a9537b5 Alex Elder 2020-03-05  120   *
530f9216a9537b5 Alex Elder 2020-03-05  121   * When the modem boots (or reboots), the handshake sequence starts
530f9216a9537b5 Alex Elder 2020-03-05  122   * with the AP sending the modem an INIT_DRIVER request.  Within
530f9216a9537b5 Alex Elder 2020-03-05  123   * that request, the uc_loaded flag will be zero (false) for an
530f9216a9537b5 Alex Elder 2020-03-05  124   * initial boot, non-zero (true) for a subsequent (SSR) boot.
530f9216a9537b5 Alex Elder 2020-03-05  125   */
530f9216a9537b5 Alex Elder 2020-03-05  126  static void ipa_qmi_ready(struct ipa_qmi *ipa_qmi)
530f9216a9537b5 Alex Elder 2020-03-05  127  {
530f9216a9537b5 Alex Elder 2020-03-05 @128  	struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
530f9216a9537b5 Alex Elder 2020-03-05  129  	int ret;
530f9216a9537b5 Alex Elder 2020-03-05  130  
530f9216a9537b5 Alex Elder 2020-03-05  131  	/* We aren't ready until the modem and microcontroller are */
530f9216a9537b5 Alex Elder 2020-03-05  132  	if (!ipa_qmi->modem_ready || !ipa_qmi->uc_ready)
530f9216a9537b5 Alex Elder 2020-03-05  133  		return;
530f9216a9537b5 Alex Elder 2020-03-05  134  
530f9216a9537b5 Alex Elder 2020-03-05  135  	/* Send the indication message if it was requested */
530f9216a9537b5 Alex Elder 2020-03-05  136  	ipa_qmi_indication(ipa_qmi);
530f9216a9537b5 Alex Elder 2020-03-05  137  
530f9216a9537b5 Alex Elder 2020-03-05  138  	/* The initial boot requires us to send the indication. */
530f9216a9537b5 Alex Elder 2020-03-05  139  	if (ipa_qmi->initial_boot) {
530f9216a9537b5 Alex Elder 2020-03-05  140  		if (!ipa_qmi->indication_sent)
530f9216a9537b5 Alex Elder 2020-03-05  141  			return;
530f9216a9537b5 Alex Elder 2020-03-05  142  
530f9216a9537b5 Alex Elder 2020-03-05  143  		/* The initial modem boot completed successfully */
530f9216a9537b5 Alex Elder 2020-03-05  144  		ipa_qmi->initial_boot = false;
530f9216a9537b5 Alex Elder 2020-03-05  145  	}
530f9216a9537b5 Alex Elder 2020-03-05  146  
530f9216a9537b5 Alex Elder 2020-03-05  147  	/* We're ready.  Start up normal operation */
530f9216a9537b5 Alex Elder 2020-03-05  148  	ipa = container_of(ipa_qmi, struct ipa, qmi);
530f9216a9537b5 Alex Elder 2020-03-05  149  	ret = ipa_modem_start(ipa);
530f9216a9537b5 Alex Elder 2020-03-05  150  	if (ret)
530f9216a9537b5 Alex Elder 2020-03-05  151  		dev_err(&ipa->pdev->dev, "error %d starting modem\n", ret);
530f9216a9537b5 Alex Elder 2020-03-05  152  }
530f9216a9537b5 Alex Elder 2020-03-05  153  

:::::: The code at line 128 was first introduced by commit
:::::: 530f9216a9537b58cdc2f967b5cd78f5dafb34c4 soc: qcom: ipa: AP/modem communications

:::::: TO: Alex Elder <elder@linaro.org>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-01-27  1:11 kernel test robot
  2022-01-27  7:16   ` kernel test robot
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-01-27  1:11 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 17623 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Alex Elder <elder@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0280e3c58f92b2fe0e8fbbdf8d386449168de4a8
commit: 99e75a37bd0af8eb8a0560f48091672b1b6d9218 net: ipa: relax 64-bit build requirement
date:   10 months ago
:::::: branch date: 31 hours ago
:::::: commit date: 10 months ago
config: arm-randconfig-c002-20220125 (https://download.01.org/0day-ci/archive/20220127/202201270925.F8g9FeNj-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 997e128e2a78f5a5434fc75997441ae1ee76f8a4)
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=99e75a37bd0af8eb8a0560f48091672b1b6d9218
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 99e75a37bd0af8eb8a0560f48091672b1b6d9218
        # 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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
   drivers/mtd/chips/cfi_util.c:317:2: note: Loop condition is false.  Exiting loop
           local_irq_disable();
           ^
   include/linux/irqflags.h:205:2: note: expanded from macro 'local_irq_disable'
           do {                                            \
           ^
   drivers/mtd/chips/cfi_util.c:321:2: note: Calling 'cfi_qry_mode_on'
           cfi_qry_mode_on(base, map, cfi);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mtd/chips/cfi_util.c:251:2: note: Calling 'cfi_send_gen_cmd'
           cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mtd/chips/cfi_util.c:209:8: note: Calling 'cfi_build_cmd'
           val = cfi_build_cmd(cmd, map, cfi);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mtd/chips/cfi_util.c:78:6: note: Assuming the condition is false
           if (map_bankwidth_is_large(map)) {
               ^
   include/linux/mtd/map.h:115:39: note: expanded from macro 'map_bankwidth_is_large'
   # define map_bankwidth_is_large(map) (map_bankwidth(map) > BITS_PER_LONG/8)
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mtd/map.h:113:29: note: expanded from macro 'map_bankwidth'
   # define map_bankwidth(map) ((map)->bankwidth)
                               ^
   drivers/mtd/chips/cfi_util.c:78:2: note: Taking false branch
           if (map_bankwidth_is_large(map)) {
           ^
   drivers/mtd/chips/cfi_util.c:91:2: note: Control jumps to 'case 4:'  at line 99
           switch (chip_mode) {
           ^
   drivers/mtd/chips/cfi_util.c:100:12: note: '?' condition is true
                   onecmd = cpu_to_cfi32(map, cmd);
                            ^
   include/linux/mtd/cfi_endian.h:30:30: note: expanded from macro 'cpu_to_cfi32'
   #define cpu_to_cfi32(map, x) _cpu_to_cfi(32, (map)->swap, (x))
                                ^
   include/linux/mtd/cfi_endian.h:36:31: note: expanded from macro '_cpu_to_cfi'
   #define _cpu_to_cfi(w, s, x) (cfi_host(s)?(x):_swap_to_cfi(w, s, x))
                                 ^
   include/linux/mtd/cfi_endian.h:25:22: note: expanded from macro 'cfi_host'
   #define cfi_host(s) (cfi_default(s) == CFI_HOST_ENDIAN)
                        ^
   include/linux/mtd/cfi_endian.h:22:25: note: expanded from macro 'cfi_default'
   #define cfi_default(s) ((s)?:CFI_DEFAULT_ENDIAN)
                           ^
   drivers/mtd/chips/cfi_util.c:100:12: note: Assuming the condition is true
                   onecmd = cpu_to_cfi32(map, cmd);
                            ^
   include/linux/mtd/cfi_endian.h:30:30: note: expanded from macro 'cpu_to_cfi32'
   #define cpu_to_cfi32(map, x) _cpu_to_cfi(32, (map)->swap, (x))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mtd/cfi_endian.h:36:31: note: expanded from macro '_cpu_to_cfi'
   #define _cpu_to_cfi(w, s, x) (cfi_host(s)?(x):_swap_to_cfi(w, s, x))
                                 ^~~~~~~~~~~
   include/linux/mtd/cfi_endian.h:25:22: note: expanded from macro 'cfi_host'
   #define cfi_host(s) (cfi_default(s) == CFI_HOST_ENDIAN)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mtd/cfi_endian.h:22:24: note: expanded from macro 'cfi_default'
   #define cfi_default(s) ((s)?:CFI_DEFAULT_ENDIAN)
                          ^
   drivers/mtd/chips/cfi_util.c:100:12: note: '?' condition is true
                   onecmd = cpu_to_cfi32(map, cmd);
                            ^
   include/linux/mtd/cfi_endian.h:30:30: note: expanded from macro 'cpu_to_cfi32'
   #define cpu_to_cfi32(map, x) _cpu_to_cfi(32, (map)->swap, (x))
                                ^
   include/linux/mtd/cfi_endian.h:36:31: note: expanded from macro '_cpu_to_cfi'
   #define _cpu_to_cfi(w, s, x) (cfi_host(s)?(x):_swap_to_cfi(w, s, x))
                                 ^
   include/linux/mtd/cfi_endian.h:25:21: note: expanded from macro 'cfi_host'
   #define cfi_host(s) (cfi_default(s) == CFI_HOST_ENDIAN)
                       ^
   drivers/mtd/chips/cfi_util.c:101:3: note:  Execution continues on line 106
                   break;
                   ^
   drivers/mtd/chips/cfi_util.c:106:2: note: Control jumps to 'case 2:'  at line 116
           switch (chips_per_word) {
           ^
   drivers/mtd/chips/cfi_util.c:117:21: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long'
                   onecmd |= (onecmd << (chip_mode * 8));
                                     ^  ~~~~~~~~~~~~~~~
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   9 warnings generated.
>> drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
                       ^~~
   drivers/net/ipa/ipa_qmi.c:128:14: note: Value stored to 'ipa' during its initialization is never read
           struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
                       ^~~
   Suppressed 8 warnings (8 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   7 warnings generated.
   Suppressed 7 warnings (7 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.
   8 warnings generated.
   include/asm-generic/bitops/non-atomic.h:106:16: warning: Array access (from variable 'addr') results in a null pointer dereference [clang-analyzer-core.NullDereference]
           return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
                         ^
   drivers/net/net_failover.c:644:16: note: Assuming the condition is false
           primary_dev = rtnl_dereference(nfo_info->primary_dev);
                         ^
   include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
           rcu_dereference_protected(p, lockdep_rtnl_is_held())
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:562:2: note: expanded from macro 'rcu_dereference_protected'
           __rcu_dereference_protected((p), (c), __rcu)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:381:2: note: expanded from macro '__rcu_dereference_protected'
           RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:318:7: note: expanded from macro 'RCU_LOCKDEP_WARN'
                   if (debug_lockdep_rcu_enabled() && !__warned && (c)) {  \
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/net_failover.c:644:16: note: Left side of '&&' is false
           primary_dev = rtnl_dereference(nfo_info->primary_dev);
                         ^
   include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
           rcu_dereference_protected(p, lockdep_rtnl_is_held())
           ^
   include/linux/rcupdate.h:562:2: note: expanded from macro 'rcu_dereference_protected'
           __rcu_dereference_protected((p), (c), __rcu)
           ^
   include/linux/rcupdate.h:381:2: note: expanded from macro '__rcu_dereference_protected'
           RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
           ^
   include/linux/rcupdate.h:318:35: note: expanded from macro 'RCU_LOCKDEP_WARN'
                   if (debug_lockdep_rcu_enabled() && !__warned && (c)) {  \
                                                   ^
   drivers/net/net_failover.c:644:16: note: Loop condition is false.  Exiting loop
           primary_dev = rtnl_dereference(nfo_info->primary_dev);
                         ^
   include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
           rcu_dereference_protected(p, lockdep_rtnl_is_held())
           ^
   include/linux/rcupdate.h:562:2: note: expanded from macro 'rcu_dereference_protected'
           __rcu_dereference_protected((p), (c), __rcu)
           ^
   include/linux/rcupdate.h:381:2: note: expanded from macro '__rcu_dereference_protected'
           RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
           ^
   include/linux/rcupdate.h:316:2: note: expanded from macro 'RCU_LOCKDEP_WARN'
           do {                                                            \
           ^
   drivers/net/net_failover.c:645:16: note: Assuming the condition is false
           standby_dev = rtnl_dereference(nfo_info->standby_dev);
                         ^
   include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
           rcu_dereference_protected(p, lockdep_rtnl_is_held())
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:562:2: note: expanded from macro 'rcu_dereference_protected'
           __rcu_dereference_protected((p), (c), __rcu)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:381:2: note: expanded from macro '__rcu_dereference_protected'
           RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:318:7: note: expanded from macro 'RCU_LOCKDEP_WARN'
                   if (debug_lockdep_rcu_enabled() && !__warned && (c)) {  \
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/net_failover.c:645:16: note: Left side of '&&' is false
           standby_dev = rtnl_dereference(nfo_info->standby_dev);
                         ^
   include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
           rcu_dereference_protected(p, lockdep_rtnl_is_held())
           ^
   include/linux/rcupdate.h:562:2: note: expanded from macro 'rcu_dereference_protected'
           __rcu_dereference_protected((p), (c), __rcu)
           ^
   include/linux/rcupdate.h:381:2: note: expanded from macro '__rcu_dereference_protected'
           RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
           ^
   include/linux/rcupdate.h:318:35: note: expanded from macro 'RCU_LOCKDEP_WARN'
                   if (debug_lockdep_rcu_enabled() && !__warned && (c)) {  \
                                                   ^
   drivers/net/net_failover.c:645:16: note: Loop condition is false.  Exiting loop
           standby_dev = rtnl_dereference(nfo_info->standby_dev);
                         ^
   include/linux/rtnetlink.h:81:2: note: expanded from macro 'rtnl_dereference'
           rcu_dereference_protected(p, lockdep_rtnl_is_held())

vim +/ipa +128 drivers/net/ipa/ipa_qmi.c

530f9216a9537b Alex Elder 2020-03-05  116  
530f9216a9537b Alex Elder 2020-03-05  117  /* Determine whether everything is ready to start normal operation.
530f9216a9537b Alex Elder 2020-03-05  118   * We know everything (else) is ready when we know the IPA driver on
530f9216a9537b Alex Elder 2020-03-05  119   * the modem is ready, and the microcontroller is ready.
530f9216a9537b Alex Elder 2020-03-05  120   *
530f9216a9537b Alex Elder 2020-03-05  121   * When the modem boots (or reboots), the handshake sequence starts
530f9216a9537b Alex Elder 2020-03-05  122   * with the AP sending the modem an INIT_DRIVER request.  Within
530f9216a9537b Alex Elder 2020-03-05  123   * that request, the uc_loaded flag will be zero (false) for an
530f9216a9537b Alex Elder 2020-03-05  124   * initial boot, non-zero (true) for a subsequent (SSR) boot.
530f9216a9537b Alex Elder 2020-03-05  125   */
530f9216a9537b Alex Elder 2020-03-05  126  static void ipa_qmi_ready(struct ipa_qmi *ipa_qmi)
530f9216a9537b Alex Elder 2020-03-05  127  {
530f9216a9537b Alex Elder 2020-03-05 @128  	struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
530f9216a9537b Alex Elder 2020-03-05  129  	int ret;
530f9216a9537b Alex Elder 2020-03-05  130  
530f9216a9537b Alex Elder 2020-03-05  131  	/* We aren't ready until the modem and microcontroller are */
530f9216a9537b Alex Elder 2020-03-05  132  	if (!ipa_qmi->modem_ready || !ipa_qmi->uc_ready)
530f9216a9537b Alex Elder 2020-03-05  133  		return;
530f9216a9537b Alex Elder 2020-03-05  134  
530f9216a9537b Alex Elder 2020-03-05  135  	/* Send the indication message if it was requested */
530f9216a9537b Alex Elder 2020-03-05  136  	ipa_qmi_indication(ipa_qmi);
530f9216a9537b Alex Elder 2020-03-05  137  
530f9216a9537b Alex Elder 2020-03-05  138  	/* The initial boot requires us to send the indication. */
530f9216a9537b Alex Elder 2020-03-05  139  	if (ipa_qmi->initial_boot) {
530f9216a9537b Alex Elder 2020-03-05  140  		if (!ipa_qmi->indication_sent)
530f9216a9537b Alex Elder 2020-03-05  141  			return;
530f9216a9537b Alex Elder 2020-03-05  142  
530f9216a9537b Alex Elder 2020-03-05  143  		/* The initial modem boot completed successfully */
530f9216a9537b Alex Elder 2020-03-05  144  		ipa_qmi->initial_boot = false;
530f9216a9537b Alex Elder 2020-03-05  145  	}
530f9216a9537b Alex Elder 2020-03-05  146  
530f9216a9537b Alex Elder 2020-03-05  147  	/* We're ready.  Start up normal operation */
530f9216a9537b Alex Elder 2020-03-05  148  	ipa = container_of(ipa_qmi, struct ipa, qmi);
530f9216a9537b Alex Elder 2020-03-05  149  	ret = ipa_modem_start(ipa);
530f9216a9537b Alex Elder 2020-03-05  150  	if (ret)
530f9216a9537b Alex Elder 2020-03-05  151  		dev_err(&ipa->pdev->dev, "error %d starting modem\n", ret);
530f9216a9537b Alex Elder 2020-03-05  152  }
530f9216a9537b Alex Elder 2020-03-05  153  

:::::: The code at line 128 was first introduced by commit
:::::: 530f9216a9537b58cdc2f967b5cd78f5dafb34c4 soc: qcom: ipa: AP/modem communications

:::::: TO: Alex Elder <elder@linaro.org>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
  2022-01-27  1:11 drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
@ 2022-01-27  7:16   ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-01-27  7:16 UTC (permalink / raw)
  To: Alex Elder; +Cc: llvm, kbuild-all, Linux Kernel Mailing List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0280e3c58f92b2fe0e8fbbdf8d386449168de4a8
commit: 99e75a37bd0af8eb8a0560f48091672b1b6d9218 net: ipa: relax 64-bit build requirement
date:   10 months ago
config: arm-randconfig-c002-20220125 (https://download.01.org/0day-ci/archive/20220127/202201270925.F8g9FeNj-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 997e128e2a78f5a5434fc75997441ae1ee76f8a4)
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=99e75a37bd0af8eb8a0560f48091672b1b6d9218
         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
         git fetch --no-tags linus master
         git checkout 99e75a37bd0af8eb8a0560f48091672b1b6d9218
         # 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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)

 >> drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
            struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
                        ^~~

vim +/ipa +128 drivers/net/ipa/ipa_qmi.c

530f9216a9537b Alex Elder 2020-03-05  116
530f9216a9537b Alex Elder 2020-03-05  117  /* Determine whether everything is ready to start normal operation.
530f9216a9537b Alex Elder 2020-03-05  118   * We know everything (else) is ready when we know the IPA driver on
530f9216a9537b Alex Elder 2020-03-05  119   * the modem is ready, and the microcontroller is ready.
530f9216a9537b Alex Elder 2020-03-05  120   *
530f9216a9537b Alex Elder 2020-03-05  121   * When the modem boots (or reboots), the handshake sequence starts
530f9216a9537b Alex Elder 2020-03-05  122   * with the AP sending the modem an INIT_DRIVER request.  Within
530f9216a9537b Alex Elder 2020-03-05  123   * that request, the uc_loaded flag will be zero (false) for an
530f9216a9537b Alex Elder 2020-03-05  124   * initial boot, non-zero (true) for a subsequent (SSR) boot.
530f9216a9537b Alex Elder 2020-03-05  125   */
530f9216a9537b Alex Elder 2020-03-05  126  static void ipa_qmi_ready(struct ipa_qmi *ipa_qmi)
530f9216a9537b Alex Elder 2020-03-05  127  {
530f9216a9537b Alex Elder 2020-03-05 @128  	struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
530f9216a9537b Alex Elder 2020-03-05  129  	int ret;
530f9216a9537b Alex Elder 2020-03-05  130
530f9216a9537b Alex Elder 2020-03-05  131  	/* We aren't ready until the modem and microcontroller are */
530f9216a9537b Alex Elder 2020-03-05  132  	if (!ipa_qmi->modem_ready || !ipa_qmi->uc_ready)
530f9216a9537b Alex Elder 2020-03-05  133  		return;
530f9216a9537b Alex Elder 2020-03-05  134
530f9216a9537b Alex Elder 2020-03-05  135  	/* Send the indication message if it was requested */
530f9216a9537b Alex Elder 2020-03-05  136  	ipa_qmi_indication(ipa_qmi);
530f9216a9537b Alex Elder 2020-03-05  137
530f9216a9537b Alex Elder 2020-03-05  138  	/* The initial boot requires us to send the indication. */
530f9216a9537b Alex Elder 2020-03-05  139  	if (ipa_qmi->initial_boot) {
530f9216a9537b Alex Elder 2020-03-05  140  		if (!ipa_qmi->indication_sent)
530f9216a9537b Alex Elder 2020-03-05  141  			return;
530f9216a9537b Alex Elder 2020-03-05  142
530f9216a9537b Alex Elder 2020-03-05  143  		/* The initial modem boot completed successfully */
530f9216a9537b Alex Elder 2020-03-05  144  		ipa_qmi->initial_boot = false;
530f9216a9537b Alex Elder 2020-03-05  145  	}
530f9216a9537b Alex Elder 2020-03-05  146
530f9216a9537b Alex Elder 2020-03-05  147  	/* We're ready.  Start up normal operation */
530f9216a9537b Alex Elder 2020-03-05 @148  	ipa = container_of(ipa_qmi, struct ipa, qmi);
530f9216a9537b Alex Elder 2020-03-05  149  	ret = ipa_modem_start(ipa);
530f9216a9537b Alex Elder 2020-03-05  150  	if (ret)
530f9216a9537b Alex Elder 2020-03-05  151  		dev_err(&ipa->pdev->dev, "error %d starting modem\n", ret);
530f9216a9537b Alex Elder 2020-03-05  152  }
530f9216a9537b Alex Elder 2020-03-05  153

:::::: The code at line 128 was first introduced by commit
:::::: 530f9216a9537b58cdc2f967b5cd78f5dafb34c4 soc: qcom: ipa: AP/modem communications

:::::: TO: Alex Elder <elder@linaro.org>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-01-27  7:16   ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-01-27  7:16 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4972 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0280e3c58f92b2fe0e8fbbdf8d386449168de4a8
commit: 99e75a37bd0af8eb8a0560f48091672b1b6d9218 net: ipa: relax 64-bit build requirement
date:   10 months ago
config: arm-randconfig-c002-20220125 (https://download.01.org/0day-ci/archive/20220127/202201270925.F8g9FeNj-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 997e128e2a78f5a5434fc75997441ae1ee76f8a4)
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=99e75a37bd0af8eb8a0560f48091672b1b6d9218
         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
         git fetch --no-tags linus master
         git checkout 99e75a37bd0af8eb8a0560f48091672b1b6d9218
         # 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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)

 >> drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
            struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
                        ^~~

vim +/ipa +128 drivers/net/ipa/ipa_qmi.c

530f9216a9537b Alex Elder 2020-03-05  116
530f9216a9537b Alex Elder 2020-03-05  117  /* Determine whether everything is ready to start normal operation.
530f9216a9537b Alex Elder 2020-03-05  118   * We know everything (else) is ready when we know the IPA driver on
530f9216a9537b Alex Elder 2020-03-05  119   * the modem is ready, and the microcontroller is ready.
530f9216a9537b Alex Elder 2020-03-05  120   *
530f9216a9537b Alex Elder 2020-03-05  121   * When the modem boots (or reboots), the handshake sequence starts
530f9216a9537b Alex Elder 2020-03-05  122   * with the AP sending the modem an INIT_DRIVER request.  Within
530f9216a9537b Alex Elder 2020-03-05  123   * that request, the uc_loaded flag will be zero (false) for an
530f9216a9537b Alex Elder 2020-03-05  124   * initial boot, non-zero (true) for a subsequent (SSR) boot.
530f9216a9537b Alex Elder 2020-03-05  125   */
530f9216a9537b Alex Elder 2020-03-05  126  static void ipa_qmi_ready(struct ipa_qmi *ipa_qmi)
530f9216a9537b Alex Elder 2020-03-05  127  {
530f9216a9537b Alex Elder 2020-03-05 @128  	struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi);
530f9216a9537b Alex Elder 2020-03-05  129  	int ret;
530f9216a9537b Alex Elder 2020-03-05  130
530f9216a9537b Alex Elder 2020-03-05  131  	/* We aren't ready until the modem and microcontroller are */
530f9216a9537b Alex Elder 2020-03-05  132  	if (!ipa_qmi->modem_ready || !ipa_qmi->uc_ready)
530f9216a9537b Alex Elder 2020-03-05  133  		return;
530f9216a9537b Alex Elder 2020-03-05  134
530f9216a9537b Alex Elder 2020-03-05  135  	/* Send the indication message if it was requested */
530f9216a9537b Alex Elder 2020-03-05  136  	ipa_qmi_indication(ipa_qmi);
530f9216a9537b Alex Elder 2020-03-05  137
530f9216a9537b Alex Elder 2020-03-05  138  	/* The initial boot requires us to send the indication. */
530f9216a9537b Alex Elder 2020-03-05  139  	if (ipa_qmi->initial_boot) {
530f9216a9537b Alex Elder 2020-03-05  140  		if (!ipa_qmi->indication_sent)
530f9216a9537b Alex Elder 2020-03-05  141  			return;
530f9216a9537b Alex Elder 2020-03-05  142
530f9216a9537b Alex Elder 2020-03-05  143  		/* The initial modem boot completed successfully */
530f9216a9537b Alex Elder 2020-03-05  144  		ipa_qmi->initial_boot = false;
530f9216a9537b Alex Elder 2020-03-05  145  	}
530f9216a9537b Alex Elder 2020-03-05  146
530f9216a9537b Alex Elder 2020-03-05  147  	/* We're ready.  Start up normal operation */
530f9216a9537b Alex Elder 2020-03-05 @148  	ipa = container_of(ipa_qmi, struct ipa, qmi);
530f9216a9537b Alex Elder 2020-03-05  149  	ret = ipa_modem_start(ipa);
530f9216a9537b Alex Elder 2020-03-05  150  	if (ret)
530f9216a9537b Alex Elder 2020-03-05  151  		dev_err(&ipa->pdev->dev, "error %d starting modem\n", ret);
530f9216a9537b Alex Elder 2020-03-05  152  }
530f9216a9537b Alex Elder 2020-03-05  153

:::::: The code at line 128 was first introduced by commit
:::::: 530f9216a9537b58cdc2f967b5cd78f5dafb34c4 soc: qcom: ipa: AP/modem communications

:::::: TO: Alex Elder <elder@linaro.org>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-27  7:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-27  1:11 drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2022-01-27  7:16 ` kernel test robot
2022-01-27  7:16   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-12-09 20:13 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.