Thread (4 messages) 4 messages, 3 authors, 2021-08-24

Re: [linux-next:master 8440/9522] drivers/cpufreq/qcom-cpufreq-hw.c:294:3: warning: Value stored to 'opp' is never read [clang-analyzer-deadcode.DeadStores]

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2021-08-24 07:11:42
Also in: oe-kbuild-all
Subsystem: arm/qualcomm mailing list, cpu frequency scaling framework, the rest · Maintainers: "Rafael J. Wysocki", Viresh Kumar, Linus Torvalds

On 24-08-21, 14:53, Chen, Rong A wrote:

On 8/23/2021 2:52 PM, Viresh Kumar wrote:
quoted
On 22-08-21, 19:41, kernel test robot wrote:
quoted
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
commit: 86afc1df661a99dcd6b8d264cae171f1ead2b7b8 [8440/9522] cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support
config: arm-randconfig-c002-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a83d99c55ebb14532c414066a5aa3bdb65389965)
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/next/linux-next.git/commit/?id=86afc1df661a99dcd6b8d264cae171f1ead2b7b8
         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
         git fetch --no-tags linux-next master
         git checkout 86afc1df661a99dcd6b8d264cae171f1ead2b7b8
         # save the attached .config 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 <redacted>
This doesn't look right, it says issues are with cpufreq-hw driver but
points at hid-core ?
Hi Viresh,

The warning with the prefix ">>" is pointed to this commit,
others are only for reference.
Fixed as this and pushed as Thara is away:
diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index 26293d3b15a4..a2be0df7e174 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -291,7 +291,7 @@ static void qcom_lmh_dcvs_notify(struct qcom_cpufreq_data *data)

        opp = dev_pm_opp_find_freq_floor(dev, &freq_hz);
        if (IS_ERR(opp) && PTR_ERR(opp) == -ERANGE)
-               opp = dev_pm_opp_find_freq_ceil(dev, &freq_hz);
+               dev_pm_opp_find_freq_ceil(dev, &freq_hz);

        throttled_freq = freq_hz / HZ_PER_KHZ;
-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help