[<prev] [next>] [day] [month] [year] [list]
Message-ID: <200de1bd-0f01-c334-ca18-43eed783dfac@intel.com>
Date: Thu, 27 Jan 2022 15:16:21 +0800
From: kernel test robot <yujie.liu@...el.com>
To: Alex Elder <elder@...aro.org>
CC: <llvm@...ts.linux.dev>, <kbuild-all@...ts.01.org>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: drivers/net/ipa/ipa_qmi.c:128:14: warning: Value stored to 'ipa'
during its initialization is never read [clang-analyzer-deadcode.DeadStores]
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@...el.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@...aro.org>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists