drivers/cpufreq/qcom-cpufreq-hw.c:333 qcom_lmh_dcvs_notify() error: uninitialized symbol 'throttled_freq'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
CC: Viresh Kumar <viresh.kumar(a)linaro.org>
CC: Vladimir Zapolskiy <vladimir.zapolskiy(a)linaro.org>
CC: Bjorn Andersson <bjorn.andersson(a)linaro.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2a5699b0de4ee623d77f183c8e8e62691bd60a70
commit: 6240aaad75e1a623872a830d13393d7aabf1052c cpufreq: qcom-hw: fix the opp entries refcounting
date: 8 weeks ago
:::::: branch date: 2 hours ago
:::::: commit date: 8 weeks ago
config: arm64-randconfig-m031-20220531 (https://download.01.org/0day-ci/archive/20220601/202206010736.NcY0Y2fK-lk...)
compiler: aarch64-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/cpufreq/qcom-cpufreq-hw.c:333 qcom_lmh_dcvs_notify() error: uninitialized symbol 'throttled_freq'.
vim +/throttled_freq +333 drivers/cpufreq/qcom-cpufreq-hw.c
275157b367f479 Thara Gopinath 2021-08-09 289
275157b367f479 Thara Gopinath 2021-08-09 290 static void qcom_lmh_dcvs_notify(struct qcom_cpufreq_data *data)
275157b367f479 Thara Gopinath 2021-08-09 291 {
275157b367f479 Thara Gopinath 2021-08-09 292 struct cpufreq_policy *policy = data->policy;
5e4f009da6be56 Dmitry Baryshkov 2022-03-26 293 int cpu = cpumask_first(policy->related_cpus);
275157b367f479 Thara Gopinath 2021-08-09 294 struct device *dev = get_cpu_device(cpu);
0258cb19c77deb Lukasz Luba 2021-11-09 295 unsigned long freq_hz, throttled_freq;
275157b367f479 Thara Gopinath 2021-08-09 296 struct dev_pm_opp *opp;
275157b367f479 Thara Gopinath 2021-08-09 297 unsigned int freq;
275157b367f479 Thara Gopinath 2021-08-09 298
275157b367f479 Thara Gopinath 2021-08-09 299 /*
275157b367f479 Thara Gopinath 2021-08-09 300 * Get the h/w throttled frequency, normalize it using the
275157b367f479 Thara Gopinath 2021-08-09 301 * registered opp table and use it to calculate thermal pressure.
275157b367f479 Thara Gopinath 2021-08-09 302 */
275157b367f479 Thara Gopinath 2021-08-09 303 freq = qcom_lmh_get_throttle_freq(data);
275157b367f479 Thara Gopinath 2021-08-09 304 freq_hz = freq * HZ_PER_KHZ;
275157b367f479 Thara Gopinath 2021-08-09 305
275157b367f479 Thara Gopinath 2021-08-09 306 opp = dev_pm_opp_find_freq_floor(dev, &freq_hz);
275157b367f479 Thara Gopinath 2021-08-09 307 if (IS_ERR(opp) && PTR_ERR(opp) == -ERANGE)
6240aaad75e1a6 Dmitry Baryshkov 2022-03-26 308 opp = dev_pm_opp_find_freq_ceil(dev, &freq_hz);
275157b367f479 Thara Gopinath 2021-08-09 309
6240aaad75e1a6 Dmitry Baryshkov 2022-03-26 310 if (IS_ERR(opp)) {
6240aaad75e1a6 Dmitry Baryshkov 2022-03-26 311 dev_warn(dev, "Can't find the OPP for throttling: %pe!\n", opp);
6240aaad75e1a6 Dmitry Baryshkov 2022-03-26 312 } else {
275157b367f479 Thara Gopinath 2021-08-09 313 throttled_freq = freq_hz / HZ_PER_KHZ;
275157b367f479 Thara Gopinath 2021-08-09 314
0258cb19c77deb Lukasz Luba 2021-11-09 315 /* Update thermal pressure (the boost frequencies are accepted) */
0258cb19c77deb Lukasz Luba 2021-11-09 316 arch_update_thermal_pressure(policy->related_cpus, throttled_freq);
275157b367f479 Thara Gopinath 2021-08-09 317
6240aaad75e1a6 Dmitry Baryshkov 2022-03-26 318 dev_pm_opp_put(opp);
6240aaad75e1a6 Dmitry Baryshkov 2022-03-26 319 }
6240aaad75e1a6 Dmitry Baryshkov 2022-03-26 320
275157b367f479 Thara Gopinath 2021-08-09 321 /*
275157b367f479 Thara Gopinath 2021-08-09 322 * In the unlikely case policy is unregistered do not enable
275157b367f479 Thara Gopinath 2021-08-09 323 * polling or h/w interrupt
275157b367f479 Thara Gopinath 2021-08-09 324 */
275157b367f479 Thara Gopinath 2021-08-09 325 mutex_lock(&data->throttle_lock);
275157b367f479 Thara Gopinath 2021-08-09 326 if (data->cancel_throttle)
275157b367f479 Thara Gopinath 2021-08-09 327 goto out;
275157b367f479 Thara Gopinath 2021-08-09 328
275157b367f479 Thara Gopinath 2021-08-09 329 /*
275157b367f479 Thara Gopinath 2021-08-09 330 * If h/w throttled frequency is higher than what cpufreq has requested
275157b367f479 Thara Gopinath 2021-08-09 331 * for, then stop polling and switch back to interrupt mechanism.
275157b367f479 Thara Gopinath 2021-08-09 332 */
275157b367f479 Thara Gopinath 2021-08-09 @333 if (throttled_freq >= qcom_cpufreq_hw_get(cpu))
275157b367f479 Thara Gopinath 2021-08-09 334 enable_irq(data->throttle_irq);
275157b367f479 Thara Gopinath 2021-08-09 335 else
275157b367f479 Thara Gopinath 2021-08-09 336 mod_delayed_work(system_highpri_wq, &data->throttle_work,
275157b367f479 Thara Gopinath 2021-08-09 337 msecs_to_jiffies(10));
275157b367f479 Thara Gopinath 2021-08-09 338
275157b367f479 Thara Gopinath 2021-08-09 339 out:
275157b367f479 Thara Gopinath 2021-08-09 340 mutex_unlock(&data->throttle_lock);
275157b367f479 Thara Gopinath 2021-08-09 341 }
275157b367f479 Thara Gopinath 2021-08-09 342
:::::: The code at line 333 was first introduced by commit
:::::: 275157b367f479334f3e2df7be93a3dd772f359c cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support
:::::: TO: Thara Gopinath <thara.gopinath(a)linaro.org>
:::::: CC: Viresh Kumar <viresh.kumar(a)linaro.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 4 days
arch/mips/kernel/proc.c:61:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provide...
by kernel test robot
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: arch/mips/kernel/proc.c:61:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]"
::::::
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Arnd Bergmann <arnd(a)arndb.de>
CC: Masahiro Yamada <masahiroy(a)kernel.org>
CC: Alex Shi <alexs(a)kernel.org>
CC: Nick Desaulniers <ndesaulniers(a)google.com>
CC: Miguel Ojeda <ojeda(a)kernel.org>
CC: Nathan Chancellor <nathan(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e1cbc3b96a9974746b2a80c3a6c8a0f7eff7b1b5
commit: e8c07082a810fbb9db303a2b66b66b8d7e588b53 Kbuild: move to -std=gnu11
date: 3 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 3 months ago
config: mips-randconfig-c004-20220531 (https://download.01.org/0day-ci/archive/20220601/202206010621.oF970f8F-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c825abd6b0198fb088d9752f556a70705bc99dfd)
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 mips cross compiling tool for clang build
# apt-get install binutils-mipsel-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e8c07082a810fbb9db303a2b66b66b8d7e588b53
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~
arch/mips/mm/tlbex.c:1940:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:1940:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:1968:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(p, 0, handle_tlbs_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:1968:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(p, 0, handle_tlbs_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:1969:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:1969:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:1970:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:1970:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:1998:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(p, 0, handle_tlbm_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:1998:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(p, 0, handle_tlbm_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:1999:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:1999:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:2000:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:2000:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:2115:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(p, 0, handle_tlbl_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:2115:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(p, 0, handle_tlbl_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:2116:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:2116:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:2117:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:2117:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:2316:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(p, 0, handle_tlbs_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:2316:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(p, 0, handle_tlbs_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:2317:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:2317:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:2318:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:2318:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:2372:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(p, 0, handle_tlbm_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:2372:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(p, 0, handle_tlbm_end - (char *)p);
^~~~~~
arch/mips/mm/tlbex.c:2373:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:2373:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(labels, 0, sizeof(labels));
^~~~~~
arch/mips/mm/tlbex.c:2374:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(relocs, 0, sizeof(relocs));
^~~~~~
arch/mips/mm/tlbex.c:2374:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(relocs, 0, sizeof(relocs));
^~~~~~
Suppressed 35 warnings (31 in non-user code, 4 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
32 warnings generated.
>> arch/mips/kernel/proc.c:61:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n",
^~~~~~~
arch/mips/kernel/proc.c:61:2: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n",
^~~~~~~
arch/mips/kernel/proc.c:296:2: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
sprintf(fmt, "VCE%%c exceptions\t\t: %s\n",
^~~~~~~
arch/mips/kernel/proc.c:296:2: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
sprintf(fmt, "VCE%%c exceptions\t\t: %s\n",
^~~~~~~
Suppressed 30 warnings (30 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.
30 warnings generated.
Suppressed 30 warnings (30 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.
31 warnings generated.
Suppressed 31 warnings (31 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.
39 warnings generated.
Suppressed 39 warnings (39 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.
31 warnings generated.
Suppressed 31 warnings (31 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.
15 warnings generated.
Suppressed 15 warnings (15 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.
32 warnings generated.
Suppressed 32 warnings (31 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
55 warnings generated.
fs/btrfs/sysfs.c:626:8: warning: Dereference of null pointer (loaded from variable 'value_ptr') [clang-analyzer-core.NullDereference]
val = *value_ptr;
^
fs/btrfs/sysfs.c:644:34: note: Calling 'to_fs_info'
struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent);
^~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/sysfs.c:1097:6: note: Assuming the condition is false
if (kobj->ktype != &btrfs_ktype)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/sysfs.c:1097:2: note: Taking false branch
if (kobj->ktype != &btrfs_ktype)
^
fs/btrfs/sysfs.c:1099:2: note: Returning pointer
return to_fs_devs(kobj)->fs_info;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/sysfs.c:644:34: note: Returning from 'to_fs_info'
struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent);
^~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/sysfs.c:644:2: note: 'fs_info' initialized here
struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/sysfs.c:645:2: note: 'block_rsv' initialized here
struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/sysfs.c:646:24: note: Passing value via 1st parameter 'value_ptr'
return btrfs_show_u64(&block_rsv->reserved, &block_rsv->lock, buf);
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/sysfs.c:646:9: note: Calling 'btrfs_show_u64'
return btrfs_show_u64(&block_rsv->reserved, &block_rsv->lock, buf);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/sysfs.c:624:6: note: Assuming 'lock' is null
if (lock)
^~~~
fs/btrfs/sysfs.c:624:2: note: Taking false branch
if (lock)
^
fs/btrfs/sysfs.c:626:8: note: Dereference of null pointer (loaded from variable 'value_ptr')
val = *value_ptr;
^~~~~~~~~~
fs/btrfs/sysfs.c:802:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(fs_info->super_copy->label, 0, BTRFS_LABEL_SIZE);
^~~~~~
fs/btrfs/sysfs.c:802:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(fs_info->super_copy->label, 0, BTRFS_LABEL_SIZE);
^~~~~~
fs/btrfs/sysfs.c:803:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(fs_info->super_copy->label, buf, p_len);
^~~~~~
fs/btrfs/sysfs.c:803:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(fs_info->super_copy->label, buf, p_len);
^~~~~~
fs/btrfs/sysfs.c:1079:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(&fs_devs->fsid_kobj, 0, sizeof(struct kobject));
^~~~~~
fs/btrfs/sysfs.c:1079:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(&fs_devs->fsid_kobj, 0, sizeof(struct kobject));
^~~~~~
fs/btrfs/sysfs.c:1280:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(btrfs_feature_attrs, 0, sizeof(btrfs_feature_attrs));
^~~~~~
fs/btrfs/sysfs.c:1280:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(btrfs_feature_attrs, 0, sizeof(btrfs_feature_attrs));
^~~~~~
fs/btrfs/sysfs.c:1281:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(btrfs_unknown_feature_names, 0,
vim +61 arch/mips/kernel/proc.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 49
^1da177e4c3f41 Linus Torvalds 2005-04-16 50 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 51 * For the first processor also print the system type
^1da177e4c3f41 Linus Torvalds 2005-04-16 52 */
487d70d0b8bd1c Gabor Juhos 2010-11-23 53 if (n == 0) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 54 seq_printf(m, "system type\t\t: %s\n", get_system_type());
487d70d0b8bd1c Gabor Juhos 2010-11-23 55 if (mips_get_machine_name())
487d70d0b8bd1c Gabor Juhos 2010-11-23 56 seq_printf(m, "machine\t\t\t: %s\n",
487d70d0b8bd1c Gabor Juhos 2010-11-23 57 mips_get_machine_name());
487d70d0b8bd1c Gabor Juhos 2010-11-23 58 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 59
^1da177e4c3f41 Linus Torvalds 2005-04-16 60 seq_printf(m, "processor\t\t: %ld\n", n);
^1da177e4c3f41 Linus Torvalds 2005-04-16 @61 sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n",
e04582b7bc70b4 Atsushi Nemoto 2006-10-09 62 cpu_data[n].options & MIPS_CPU_FPU ? " FPU V%d.%d" : "");
e47c659b55aff7 Johannes Dickgreber 2008-10-13 63 seq_printf(m, fmt, __cpu_name[n],
^1da177e4c3f41 Linus Torvalds 2005-04-16 64 (version >> 4) & 0x0f, version & 0x0f,
^1da177e4c3f41 Linus Torvalds 2005-04-16 65 (fp_vers >> 4) & 0x0f, fp_vers & 0x0f);
5636919b5c909f Ralf Baechle 2009-02-28 66 seq_printf(m, "BogoMIPS\t\t: %u.%02u\n",
0ac354801a8791 Ralf Baechle 2005-02-21 67 cpu_data[n].udelay_val / (500000/HZ),
0ac354801a8791 Ralf Baechle 2005-02-21 68 (cpu_data[n].udelay_val / (5000/HZ)) % 100);
^1da177e4c3f41 Linus Torvalds 2005-04-16 69 seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no");
^1da177e4c3f41 Linus Torvalds 2005-04-16 70 seq_printf(m, "microsecond timers\t: %s\n",
^1da177e4c3f41 Linus Torvalds 2005-04-16 71 cpu_has_counter ? "yes" : "no");
31aa36658a1232 Karl-Johan Karlsson 2006-10-08 72 seq_printf(m, "tlb_entries\t\t: %d\n", cpu_data[n].tlbsize);
^1da177e4c3f41 Linus Torvalds 2005-04-16 73 seq_printf(m, "extra interrupt vector\t: %s\n",
^1da177e4c3f41 Linus Torvalds 2005-04-16 74 cpu_has_divec ? "yes" : "no");
654f57bfb46799 David Daney 2008-09-23 75 seq_printf(m, "hardware watchpoint\t: %s",
654f57bfb46799 David Daney 2008-09-23 76 cpu_has_watch ? "yes, " : "no\n");
654f57bfb46799 David Daney 2008-09-23 77 if (cpu_has_watch) {
654f57bfb46799 David Daney 2008-09-23 78 seq_printf(m, "count: %d, address/irw mask: [",
654f57bfb46799 David Daney 2008-09-23 79 cpu_data[n].watch_reg_count);
654f57bfb46799 David Daney 2008-09-23 80 for (i = 0; i < cpu_data[n].watch_reg_count; i++)
654f57bfb46799 David Daney 2008-09-23 81 seq_printf(m, "%s0x%04x", i ? ", " : "",
654f57bfb46799 David Daney 2008-09-23 82 cpu_data[n].watch_reg_masks[i]);
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 83 seq_puts(m, "]\n");
654f57bfb46799 David Daney 2008-09-23 84 }
41315b6ec108e9 Aaro Koskinen 2013-12-31 85
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 86 seq_puts(m, "isa\t\t\t:");
e5f5a5b06e51a3 Maciej W. Rozycki 2017-07-08 87 if (cpu_has_mips_1)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 88 seq_puts(m, " mips1");
a96102be700f87 Steven J. Hill 2012-12-07 89 if (cpu_has_mips_2)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 90 seq_puts(m, " mips2");
a96102be700f87 Steven J. Hill 2012-12-07 91 if (cpu_has_mips_3)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 92 seq_puts(m, " mips3");
a96102be700f87 Steven J. Hill 2012-12-07 93 if (cpu_has_mips_4)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 94 seq_puts(m, " mips4");
a96102be700f87 Steven J. Hill 2012-12-07 95 if (cpu_has_mips_5)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 96 seq_puts(m, " mips5");
a96102be700f87 Steven J. Hill 2012-12-07 97 if (cpu_has_mips32r1)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 98 seq_puts(m, " mips32r1");
a96102be700f87 Steven J. Hill 2012-12-07 99 if (cpu_has_mips32r2)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 100 seq_puts(m, " mips32r2");
ab7c01fdc3cfe0 Serge Semin 2020-05-21 101 if (cpu_has_mips32r5)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 102 seq_puts(m, " mips32r5");
515a6393dbac4f Markos Chandras 2014-11-14 103 if (cpu_has_mips32r6)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 104 seq_puts(m, " mips32r6");
a96102be700f87 Steven J. Hill 2012-12-07 105 if (cpu_has_mips64r1)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 106 seq_puts(m, " mips64r1");
a96102be700f87 Steven J. Hill 2012-12-07 107 if (cpu_has_mips64r2)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 108 seq_puts(m, " mips64r2");
ab7c01fdc3cfe0 Serge Semin 2020-05-21 109 if (cpu_has_mips64r5)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 110 seq_puts(m, " mips64r5");
515a6393dbac4f Markos Chandras 2014-11-14 111 if (cpu_has_mips64r6)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 112 seq_puts(m, " mips64r6");
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 113 seq_puts(m, "\n");
981ef0de49869c Ralf Baechle 2012-08-20 114
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 115 seq_puts(m, "ASEs implemented\t:");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 116 if (cpu_has_mips16)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 117 seq_puts(m, " mips16");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 118 if (cpu_has_mips16e2)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 119 seq_puts(m, " mips16e2");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 120 if (cpu_has_mdmx)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 121 seq_puts(m, " mdmx");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 122 if (cpu_has_mips3d)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 123 seq_puts(m, " mips3d");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 124 if (cpu_has_smartmips)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 125 seq_puts(m, " smartmips");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 126 if (cpu_has_dsp)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 127 seq_puts(m, " dsp");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 128 if (cpu_has_dsp2)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 129 seq_puts(m, " dsp2");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 130 if (cpu_has_dsp3)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 131 seq_puts(m, " dsp3");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 132 if (cpu_has_mipsmt)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 133 seq_puts(m, " mt");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 134 if (cpu_has_mmips)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 135 seq_puts(m, " micromips");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 136 if (cpu_has_vz)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 137 seq_puts(m, " vz");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 138 if (cpu_has_msa)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 139 seq_puts(m, " msa");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 140 if (cpu_has_eva)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 141 seq_puts(m, " eva");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 142 if (cpu_has_htw)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 143 seq_puts(m, " htw");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 144 if (cpu_has_xpa)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 145 seq_puts(m, " xpa");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 146 if (cpu_has_loongson_mmi)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 147 seq_puts(m, " loongson-mmi");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 148 if (cpu_has_loongson_cam)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 149 seq_puts(m, " loongson-cam");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 150 if (cpu_has_loongson_ext)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 151 seq_puts(m, " loongson-ext");
01fde9a0e497c7 Ilya Lipnitskiy 2021-10-13 152 if (cpu_has_loongson_ext2)
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 153 seq_puts(m, " loongson-ext2");
1ad964ae1a9150 Ilya Lipnitskiy 2021-10-13 154 seq_puts(m, "\n");
981ef0de49869c Ralf Baechle 2012-08-20 155
bce860833ab1e4 Steven J. Hill 2013-03-25 156 if (cpu_has_mmips) {
bce860833ab1e4 Steven J. Hill 2013-03-25 157 seq_printf(m, "micromips kernel\t: %s\n",
bce860833ab1e4 Steven J. Hill 2013-03-25 158 (read_c0_config3() & MIPS_CONF3_ISA_OE) ? "yes" : "no");
bce860833ab1e4 Steven J. Hill 2013-03-25 159 }
626bfa03729959 Hauke Mehrtens 2021-10-13 160
626bfa03729959 Hauke Mehrtens 2021-10-13 161 seq_puts(m, "Options implemented\t:");
626bfa03729959 Hauke Mehrtens 2021-10-13 162 if (cpu_has_tlb)
626bfa03729959 Hauke Mehrtens 2021-10-13 163 seq_puts(m, " tlb");
626bfa03729959 Hauke Mehrtens 2021-10-13 164 if (cpu_has_ftlb)
626bfa03729959 Hauke Mehrtens 2021-10-13 165 seq_puts(m, " ftlb");
626bfa03729959 Hauke Mehrtens 2021-10-13 166 if (cpu_has_tlbinv)
626bfa03729959 Hauke Mehrtens 2021-10-13 167 seq_puts(m, " tlbinv");
626bfa03729959 Hauke Mehrtens 2021-10-13 168 if (cpu_has_segments)
626bfa03729959 Hauke Mehrtens 2021-10-13 169 seq_puts(m, " segments");
626bfa03729959 Hauke Mehrtens 2021-10-13 170 if (cpu_has_rixiex)
626bfa03729959 Hauke Mehrtens 2021-10-13 171 seq_puts(m, " rixiex");
626bfa03729959 Hauke Mehrtens 2021-10-13 172 if (cpu_has_ldpte)
626bfa03729959 Hauke Mehrtens 2021-10-13 173 seq_puts(m, " ldpte");
626bfa03729959 Hauke Mehrtens 2021-10-13 174 if (cpu_has_maar)
626bfa03729959 Hauke Mehrtens 2021-10-13 175 seq_puts(m, " maar");
626bfa03729959 Hauke Mehrtens 2021-10-13 176 if (cpu_has_rw_llb)
626bfa03729959 Hauke Mehrtens 2021-10-13 177 seq_puts(m, " rw_llb");
626bfa03729959 Hauke Mehrtens 2021-10-13 178 if (cpu_has_4kex)
626bfa03729959 Hauke Mehrtens 2021-10-13 179 seq_puts(m, " 4kex");
626bfa03729959 Hauke Mehrtens 2021-10-13 180 if (cpu_has_3k_cache)
626bfa03729959 Hauke Mehrtens 2021-10-13 181 seq_puts(m, " 3k_cache");
626bfa03729959 Hauke Mehrtens 2021-10-13 182 if (cpu_has_4k_cache)
626bfa03729959 Hauke Mehrtens 2021-10-13 183 seq_puts(m, " 4k_cache");
626bfa03729959 Hauke Mehrtens 2021-10-13 184 if (cpu_has_tx39_cache)
626bfa03729959 Hauke Mehrtens 2021-10-13 185 seq_puts(m, " tx39_cache");
626bfa03729959 Hauke Mehrtens 2021-10-13 186 if (cpu_has_octeon_cache)
626bfa03729959 Hauke Mehrtens 2021-10-13 187 seq_puts(m, " octeon_cache");
1cab5bd69eb1f9 Tiezhu Yang 2021-11-25 188 if (raw_cpu_has_fpu)
626bfa03729959 Hauke Mehrtens 2021-10-13 189 seq_puts(m, " fpu");
626bfa03729959 Hauke Mehrtens 2021-10-13 190 if (cpu_has_32fpr)
626bfa03729959 Hauke Mehrtens 2021-10-13 191 seq_puts(m, " 32fpr");
626bfa03729959 Hauke Mehrtens 2021-10-13 192 if (cpu_has_cache_cdex_p)
626bfa03729959 Hauke Mehrtens 2021-10-13 193 seq_puts(m, " cache_cdex_p");
626bfa03729959 Hauke Mehrtens 2021-10-13 194 if (cpu_has_cache_cdex_s)
626bfa03729959 Hauke Mehrtens 2021-10-13 195 seq_puts(m, " cache_cdex_s");
626bfa03729959 Hauke Mehrtens 2021-10-13 196 if (cpu_has_prefetch)
626bfa03729959 Hauke Mehrtens 2021-10-13 197 seq_puts(m, " prefetch");
626bfa03729959 Hauke Mehrtens 2021-10-13 198 if (cpu_has_mcheck)
626bfa03729959 Hauke Mehrtens 2021-10-13 199 seq_puts(m, " mcheck");
626bfa03729959 Hauke Mehrtens 2021-10-13 200 if (cpu_has_ejtag)
626bfa03729959 Hauke Mehrtens 2021-10-13 201 seq_puts(m, " ejtag");
626bfa03729959 Hauke Mehrtens 2021-10-13 202 if (cpu_has_llsc)
626bfa03729959 Hauke Mehrtens 2021-10-13 203 seq_puts(m, " llsc");
626bfa03729959 Hauke Mehrtens 2021-10-13 204 if (cpu_has_guestctl0ext)
626bfa03729959 Hauke Mehrtens 2021-10-13 205 seq_puts(m, " guestctl0ext");
626bfa03729959 Hauke Mehrtens 2021-10-13 206 if (cpu_has_guestctl1)
626bfa03729959 Hauke Mehrtens 2021-10-13 207 seq_puts(m, " guestctl1");
626bfa03729959 Hauke Mehrtens 2021-10-13 208 if (cpu_has_guestctl2)
626bfa03729959 Hauke Mehrtens 2021-10-13 209 seq_puts(m, " guestctl2");
626bfa03729959 Hauke Mehrtens 2021-10-13 210 if (cpu_has_guestid)
626bfa03729959 Hauke Mehrtens 2021-10-13 211 seq_puts(m, " guestid");
626bfa03729959 Hauke Mehrtens 2021-10-13 212 if (cpu_has_drg)
626bfa03729959 Hauke Mehrtens 2021-10-13 213 seq_puts(m, " drg");
626bfa03729959 Hauke Mehrtens 2021-10-13 214 if (cpu_has_rixi)
626bfa03729959 Hauke Mehrtens 2021-10-13 215 seq_puts(m, " rixi");
626bfa03729959 Hauke Mehrtens 2021-10-13 216 if (cpu_has_lpa)
626bfa03729959 Hauke Mehrtens 2021-10-13 217 seq_puts(m, " lpa");
626bfa03729959 Hauke Mehrtens 2021-10-13 218 if (cpu_has_mvh)
626bfa03729959 Hauke Mehrtens 2021-10-13 219 seq_puts(m, " mvh");
626bfa03729959 Hauke Mehrtens 2021-10-13 220 if (cpu_has_vtag_icache)
626bfa03729959 Hauke Mehrtens 2021-10-13 221 seq_puts(m, " vtag_icache");
626bfa03729959 Hauke Mehrtens 2021-10-13 222 if (cpu_has_dc_aliases)
626bfa03729959 Hauke Mehrtens 2021-10-13 223 seq_puts(m, " dc_aliases");
626bfa03729959 Hauke Mehrtens 2021-10-13 224 if (cpu_has_ic_fills_f_dc)
626bfa03729959 Hauke Mehrtens 2021-10-13 225 seq_puts(m, " ic_fills_f_dc");
626bfa03729959 Hauke Mehrtens 2021-10-13 226 if (cpu_has_pindexed_dcache)
626bfa03729959 Hauke Mehrtens 2021-10-13 227 seq_puts(m, " pindexed_dcache");
626bfa03729959 Hauke Mehrtens 2021-10-13 228 if (cpu_has_userlocal)
626bfa03729959 Hauke Mehrtens 2021-10-13 229 seq_puts(m, " userlocal");
626bfa03729959 Hauke Mehrtens 2021-10-13 230 if (cpu_has_nofpuex)
626bfa03729959 Hauke Mehrtens 2021-10-13 231 seq_puts(m, " nofpuex");
626bfa03729959 Hauke Mehrtens 2021-10-13 232 if (cpu_has_vint)
626bfa03729959 Hauke Mehrtens 2021-10-13 233 seq_puts(m, " vint");
626bfa03729959 Hauke Mehrtens 2021-10-13 234 if (cpu_has_veic)
626bfa03729959 Hauke Mehrtens 2021-10-13 235 seq_puts(m, " veic");
626bfa03729959 Hauke Mehrtens 2021-10-13 236 if (cpu_has_inclusive_pcaches)
626bfa03729959 Hauke Mehrtens 2021-10-13 237 seq_puts(m, " inclusive_pcaches");
626bfa03729959 Hauke Mehrtens 2021-10-13 238 if (cpu_has_perf_cntr_intr_bit)
626bfa03729959 Hauke Mehrtens 2021-10-13 239 seq_puts(m, " perf_cntr_intr_bit");
626bfa03729959 Hauke Mehrtens 2021-10-13 240 if (cpu_has_ufr)
626bfa03729959 Hauke Mehrtens 2021-10-13 241 seq_puts(m, " ufr");
626bfa03729959 Hauke Mehrtens 2021-10-13 242 if (cpu_has_fre)
626bfa03729959 Hauke Mehrtens 2021-10-13 243 seq_puts(m, " fre");
626bfa03729959 Hauke Mehrtens 2021-10-13 244 if (cpu_has_cdmm)
626bfa03729959 Hauke Mehrtens 2021-10-13 245 seq_puts(m, " cdmm");
626bfa03729959 Hauke Mehrtens 2021-10-13 246 if (cpu_has_small_pages)
626bfa03729959 Hauke Mehrtens 2021-10-13 247 seq_puts(m, " small_pages");
626bfa03729959 Hauke Mehrtens 2021-10-13 248 if (cpu_has_nan_legacy)
626bfa03729959 Hauke Mehrtens 2021-10-13 249 seq_puts(m, " nan_legacy");
626bfa03729959 Hauke Mehrtens 2021-10-13 250 if (cpu_has_nan_2008)
626bfa03729959 Hauke Mehrtens 2021-10-13 251 seq_puts(m, " nan_2008");
626bfa03729959 Hauke Mehrtens 2021-10-13 252 if (cpu_has_ebase_wg)
626bfa03729959 Hauke Mehrtens 2021-10-13 253 seq_puts(m, " ebase_wg");
626bfa03729959 Hauke Mehrtens 2021-10-13 254 if (cpu_has_badinstr)
626bfa03729959 Hauke Mehrtens 2021-10-13 255 seq_puts(m, " badinstr");
626bfa03729959 Hauke Mehrtens 2021-10-13 256 if (cpu_has_badinstrp)
626bfa03729959 Hauke Mehrtens 2021-10-13 257 seq_puts(m, " badinstrp");
626bfa03729959 Hauke Mehrtens 2021-10-13 258 if (cpu_has_contextconfig)
626bfa03729959 Hauke Mehrtens 2021-10-13 259 seq_puts(m, " contextconfig");
626bfa03729959 Hauke Mehrtens 2021-10-13 260 if (cpu_has_perf)
626bfa03729959 Hauke Mehrtens 2021-10-13 261 seq_puts(m, " perf");
626bfa03729959 Hauke Mehrtens 2021-10-13 262 if (cpu_has_mac2008_only)
626bfa03729959 Hauke Mehrtens 2021-10-13 263 seq_puts(m, " mac2008_only");
626bfa03729959 Hauke Mehrtens 2021-10-13 264 if (cpu_has_ftlbparex)
626bfa03729959 Hauke Mehrtens 2021-10-13 265 seq_puts(m, " ftlbparex");
626bfa03729959 Hauke Mehrtens 2021-10-13 266 if (cpu_has_gsexcex)
626bfa03729959 Hauke Mehrtens 2021-10-13 267 seq_puts(m, " gsexcex");
626bfa03729959 Hauke Mehrtens 2021-10-13 268 if (cpu_has_shared_ftlb_ram)
626bfa03729959 Hauke Mehrtens 2021-10-13 269 seq_puts(m, " shared_ftlb_ram");
626bfa03729959 Hauke Mehrtens 2021-10-13 270 if (cpu_has_shared_ftlb_entries)
626bfa03729959 Hauke Mehrtens 2021-10-13 271 seq_puts(m, " shared_ftlb_entries");
626bfa03729959 Hauke Mehrtens 2021-10-13 272 if (cpu_has_mipsmt_pertccounters)
626bfa03729959 Hauke Mehrtens 2021-10-13 273 seq_puts(m, " mipsmt_pertccounters");
626bfa03729959 Hauke Mehrtens 2021-10-13 274 if (cpu_has_mmid)
626bfa03729959 Hauke Mehrtens 2021-10-13 275 seq_puts(m, " mmid");
626bfa03729959 Hauke Mehrtens 2021-10-13 276 if (cpu_has_mm_sysad)
626bfa03729959 Hauke Mehrtens 2021-10-13 277 seq_puts(m, " mm_sysad");
626bfa03729959 Hauke Mehrtens 2021-10-13 278 if (cpu_has_mm_full)
626bfa03729959 Hauke Mehrtens 2021-10-13 279 seq_puts(m, " mm_full");
626bfa03729959 Hauke Mehrtens 2021-10-13 280 seq_puts(m, "\n");
626bfa03729959 Hauke Mehrtens 2021-10-13 281
f6771dbb27c704 Ralf Baechle 2007-11-08 282 seq_printf(m, "shadow register sets\t: %d\n",
f6771dbb27c704 Ralf Baechle 2007-11-08 283 cpu_data[n].srsets);
e77c32fe284a4d David Daney 2010-12-21 284 seq_printf(m, "kscratch registers\t: %d\n",
e77c32fe284a4d David Daney 2010-12-21 285 hweight8(cpu_data[n].kscratch_mask));
bda4584cd943d7 Huacai Chen 2014-06-26 286 seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package);
f875a832d20285 Paul Burton 2017-08-12 287 seq_printf(m, "core\t\t\t: %d\n", cpu_core(&cpu_data[n]));
5508d456e9992b Ralf Baechle 2014-04-03 288
:::::: The code at line 61 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 4 days
fs/ksmbd/transport_ipc.c:235 ipc_msg_alloc() warn: Please consider using kvzalloc instead of kvmalloc
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Namjae Jeon <namjae.jeon(a)samsung.com>
CC: Christoph Hellwig <hch(a)lst.de>
CC: Steve French <stfrench(a)microsoft.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e1cbc3b96a9974746b2a80c3a6c8a0f7eff7b1b5
commit: 1a93084b9a89818aec0ac7b59a5a51f2112bf203 ksmbd: move fs/cifsd to fs/ksmbd
date: 11 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 11 months ago
config: arm64-randconfig-m031-20220531 (https://download.01.org/0day-ci/archive/20220601/202206010547.sX3JaQw1-lk...)
compiler: aarch64-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
fs/ksmbd/transport_ipc.c:235 ipc_msg_alloc() warn: Please consider using kvzalloc instead of kvmalloc
fs/ksmbd/transport_ipc.c:274 handle_response() warn: Please consider using kvzalloc instead of kvmalloc
fs/ksmbd/smb2pdu.c:556 smb2_allocate_rsp_buf() warn: Please consider using kvzalloc instead of kvmalloc
fs/ksmbd/smb2pdu.c:5817 smb2_read_pipe() warn: Please consider using kvzalloc instead of kvmalloc
fs/ksmbd/smb2pdu.c:5931 smb2_read() warn: Please consider using kvzalloc instead of kvmalloc
fs/ksmbd/smb2pdu.c:6104 smb2_write_rdma_channel() warn: Please consider using kvzalloc instead of kvmalloc
fs/ksmbd/vfs.c:426 ksmbd_vfs_stream_write() warn: Please consider using kvzalloc instead of kvmalloc
fs/ksmbd/vfs.c:908 ksmbd_vfs_listxattr() warn: Please consider using kvzalloc instead of kvmalloc
Old smatch warnings:
fs/ksmbd/smb2pdu.c:1717 smb2_sess_setup() error: uninitialized symbol 'sess'.
fs/ksmbd/smb2pdu.c:3102 smb2_open() warn: Function too hairy. No more merges.
fs/ksmbd/smb2pdu.c:6628 smb2_lock() warn: inconsistent indenting
fs/ksmbd/smb2pdu.c:6636 smb2_lock() warn: inconsistent indenting
fs/ksmbd/vfs.c:1700 ksmbd_vfs_xattr_stream_name() warn: inconsistent indenting
vim +235 fs/ksmbd/transport_ipc.c
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 229
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 230 static struct ksmbd_ipc_msg *ipc_msg_alloc(size_t sz)
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 231 {
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 232 struct ksmbd_ipc_msg *msg;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 233 size_t msg_sz = sz + sizeof(struct ksmbd_ipc_msg);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 234
79f6b11a104f3a fs/cifsd/transport_ipc.c Namjae Jeon 2021-04-02 @235 msg = kvmalloc(msg_sz, GFP_KERNEL | __GFP_ZERO);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 236 if (msg)
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 237 msg->sz = sz;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 238 return msg;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 239 }
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 240
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 241 static void ipc_msg_free(struct ksmbd_ipc_msg *msg)
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 242 {
79f6b11a104f3a fs/cifsd/transport_ipc.c Namjae Jeon 2021-04-02 243 kvfree(msg);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 244 }
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 245
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 246 static void ipc_msg_handle_free(int handle)
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 247 {
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 248 if (handle >= 0)
d40012a83f87f4 fs/cifsd/transport_ipc.c Namjae Jeon 2021-04-13 249 ksmbd_release_id(&ipc_ida, handle);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 250 }
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 251
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 252 static int handle_response(int type, void *payload, size_t sz)
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 253 {
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 254 int handle = KSMBD_IPC_MSG_HANDLE(payload);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 255 struct ipc_msg_table_entry *entry;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 256 int ret = 0;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 257
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 258 ipc_update_last_active();
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 259 down_read(&ipc_msg_table_lock);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 260 hash_for_each_possible(ipc_msg_table, entry, ipc_table_hlist, handle) {
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 261 if (handle != entry->handle)
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 262 continue;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 263
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 264 entry->response = NULL;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 265 /*
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 266 * Response message type value should be equal to
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 267 * request message type + 1.
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 268 */
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 269 if (entry->type + 1 != type) {
bde1694aecdb53 fs/cifsd/transport_ipc.c Namjae Jeon 2021-06-28 270 pr_err("Waiting for IPC type %d, got %d. Ignore.\n",
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 271 entry->type + 1, type);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 272 }
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 273
79f6b11a104f3a fs/cifsd/transport_ipc.c Namjae Jeon 2021-04-02 @274 entry->response = kvmalloc(sz, GFP_KERNEL | __GFP_ZERO);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 275 if (!entry->response) {
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 276 ret = -ENOMEM;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 277 break;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 278 }
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 279
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 280 memcpy(entry->response, payload, sz);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 281 wake_up_interruptible(&entry->wait);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 282 ret = 0;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 283 break;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 284 }
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 285 up_read(&ipc_msg_table_lock);
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 286
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 287 return ret;
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 288 }
0626e6641f6b46 fs/cifsd/transport_ipc.c Namjae Jeon 2021-03-16 289
:::::: The code at line 235 was first introduced by commit
:::::: 79f6b11a104f3a32f4f4a6f7808a02c301c19710 cifsd: remove wrappers of kvmalloc/kvfree
:::::: TO: Namjae Jeon <namjae.jeon(a)samsung.com>
:::::: CC: Steve French <stfrench(a)microsoft.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 4 days
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_0_ppt.c:1031 smu_v13_0_0_force_clk_levels() error: buffer overflow 'single_dpm_table->dpm_levels' 16 <= 31
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Evan Quan <evan.quan(a)amd.com>
CC: Alex Deucher <alexander.deucher(a)amd.com>
CC: Lijo Lazar <lijo.lazar(a)amd.com>
CC: Hawking Zhang <Hawking.Zhang(a)amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e1cbc3b96a9974746b2a80c3a6c8a0f7eff7b1b5
commit: 276c03a0547068026241decd2c1159df0be5941f drm/amd/smu: Update SMU13 support for SMU 13.0.0
date: 4 weeks ago
:::::: branch date: 5 hours ago
:::::: commit date: 4 weeks ago
config: ia64-randconfig-m031-20220530 (https://download.01.org/0day-ci/archive/20220601/202206010526.g4lk4W3k-lk...)
compiler: ia64-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_0_ppt.c:1031 smu_v13_0_0_force_clk_levels() error: buffer overflow 'single_dpm_table->dpm_levels' 16 <= 31
vim +1031 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_0_ppt.c
276c03a0547068 Evan Quan 2022-04-06 968
276c03a0547068 Evan Quan 2022-04-06 969 static int smu_v13_0_0_force_clk_levels(struct smu_context *smu,
276c03a0547068 Evan Quan 2022-04-06 970 enum smu_clk_type clk_type,
276c03a0547068 Evan Quan 2022-04-06 971 uint32_t mask)
276c03a0547068 Evan Quan 2022-04-06 972 {
276c03a0547068 Evan Quan 2022-04-06 973 struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
276c03a0547068 Evan Quan 2022-04-06 974 struct smu_13_0_dpm_context *dpm_context = smu_dpm->dpm_context;
276c03a0547068 Evan Quan 2022-04-06 975 struct smu_13_0_dpm_table *single_dpm_table;
276c03a0547068 Evan Quan 2022-04-06 976 uint32_t soft_min_level, soft_max_level;
276c03a0547068 Evan Quan 2022-04-06 977 uint32_t min_freq, max_freq;
276c03a0547068 Evan Quan 2022-04-06 978 int ret = 0;
276c03a0547068 Evan Quan 2022-04-06 979
276c03a0547068 Evan Quan 2022-04-06 980 soft_min_level = mask ? (ffs(mask) - 1) : 0;
276c03a0547068 Evan Quan 2022-04-06 981 soft_max_level = mask ? (fls(mask) - 1) : 0;
276c03a0547068 Evan Quan 2022-04-06 982
276c03a0547068 Evan Quan 2022-04-06 983 switch (clk_type) {
276c03a0547068 Evan Quan 2022-04-06 984 case SMU_GFXCLK:
276c03a0547068 Evan Quan 2022-04-06 985 case SMU_SCLK:
276c03a0547068 Evan Quan 2022-04-06 986 single_dpm_table = &(dpm_context->dpm_tables.gfx_table);
276c03a0547068 Evan Quan 2022-04-06 987 break;
276c03a0547068 Evan Quan 2022-04-06 988 case SMU_MCLK:
276c03a0547068 Evan Quan 2022-04-06 989 case SMU_UCLK:
276c03a0547068 Evan Quan 2022-04-06 990 single_dpm_table = &(dpm_context->dpm_tables.uclk_table);
276c03a0547068 Evan Quan 2022-04-06 991 break;
276c03a0547068 Evan Quan 2022-04-06 992 case SMU_SOCCLK:
276c03a0547068 Evan Quan 2022-04-06 993 single_dpm_table = &(dpm_context->dpm_tables.soc_table);
276c03a0547068 Evan Quan 2022-04-06 994 break;
276c03a0547068 Evan Quan 2022-04-06 995 case SMU_FCLK:
276c03a0547068 Evan Quan 2022-04-06 996 single_dpm_table = &(dpm_context->dpm_tables.fclk_table);
276c03a0547068 Evan Quan 2022-04-06 997 break;
276c03a0547068 Evan Quan 2022-04-06 998 case SMU_VCLK:
276c03a0547068 Evan Quan 2022-04-06 999 case SMU_VCLK1:
276c03a0547068 Evan Quan 2022-04-06 1000 single_dpm_table = &(dpm_context->dpm_tables.vclk_table);
276c03a0547068 Evan Quan 2022-04-06 1001 break;
276c03a0547068 Evan Quan 2022-04-06 1002 case SMU_DCLK:
276c03a0547068 Evan Quan 2022-04-06 1003 case SMU_DCLK1:
276c03a0547068 Evan Quan 2022-04-06 1004 single_dpm_table = &(dpm_context->dpm_tables.dclk_table);
276c03a0547068 Evan Quan 2022-04-06 1005 break;
276c03a0547068 Evan Quan 2022-04-06 1006 default:
276c03a0547068 Evan Quan 2022-04-06 1007 break;
276c03a0547068 Evan Quan 2022-04-06 1008 }
276c03a0547068 Evan Quan 2022-04-06 1009
276c03a0547068 Evan Quan 2022-04-06 1010 switch (clk_type) {
276c03a0547068 Evan Quan 2022-04-06 1011 case SMU_GFXCLK:
276c03a0547068 Evan Quan 2022-04-06 1012 case SMU_SCLK:
276c03a0547068 Evan Quan 2022-04-06 1013 case SMU_MCLK:
276c03a0547068 Evan Quan 2022-04-06 1014 case SMU_UCLK:
276c03a0547068 Evan Quan 2022-04-06 1015 case SMU_SOCCLK:
276c03a0547068 Evan Quan 2022-04-06 1016 case SMU_FCLK:
276c03a0547068 Evan Quan 2022-04-06 1017 case SMU_VCLK:
276c03a0547068 Evan Quan 2022-04-06 1018 case SMU_VCLK1:
276c03a0547068 Evan Quan 2022-04-06 1019 case SMU_DCLK:
276c03a0547068 Evan Quan 2022-04-06 1020 case SMU_DCLK1:
276c03a0547068 Evan Quan 2022-04-06 1021 if (single_dpm_table->is_fine_grained) {
276c03a0547068 Evan Quan 2022-04-06 1022 /* There is only 2 levels for fine grained DPM */
276c03a0547068 Evan Quan 2022-04-06 1023 soft_max_level = (soft_max_level >= 1 ? 1 : 0);
276c03a0547068 Evan Quan 2022-04-06 1024 soft_min_level = (soft_min_level >= 1 ? 1 : 0);
276c03a0547068 Evan Quan 2022-04-06 1025 } else {
276c03a0547068 Evan Quan 2022-04-06 1026 if ((soft_max_level >= single_dpm_table->count) ||
276c03a0547068 Evan Quan 2022-04-06 1027 (soft_min_level >= single_dpm_table->count))
276c03a0547068 Evan Quan 2022-04-06 1028 return -EINVAL;
276c03a0547068 Evan Quan 2022-04-06 1029 }
276c03a0547068 Evan Quan 2022-04-06 1030
276c03a0547068 Evan Quan 2022-04-06 @1031 min_freq = single_dpm_table->dpm_levels[soft_min_level].value;
276c03a0547068 Evan Quan 2022-04-06 1032 max_freq = single_dpm_table->dpm_levels[soft_max_level].value;
276c03a0547068 Evan Quan 2022-04-06 1033
276c03a0547068 Evan Quan 2022-04-06 1034 ret = smu_v13_0_set_soft_freq_limited_range(smu,
276c03a0547068 Evan Quan 2022-04-06 1035 clk_type,
276c03a0547068 Evan Quan 2022-04-06 1036 min_freq,
276c03a0547068 Evan Quan 2022-04-06 1037 max_freq);
276c03a0547068 Evan Quan 2022-04-06 1038 break;
276c03a0547068 Evan Quan 2022-04-06 1039 case SMU_DCEFCLK:
276c03a0547068 Evan Quan 2022-04-06 1040 case SMU_PCIE:
276c03a0547068 Evan Quan 2022-04-06 1041 default:
276c03a0547068 Evan Quan 2022-04-06 1042 break;
276c03a0547068 Evan Quan 2022-04-06 1043 }
276c03a0547068 Evan Quan 2022-04-06 1044
276c03a0547068 Evan Quan 2022-04-06 1045 return ret;
276c03a0547068 Evan Quan 2022-04-06 1046 }
276c03a0547068 Evan Quan 2022-04-06 1047
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 4 days
drivers/irqchip/irq-apple-aic.c:941 aic_of_ic_init() error: uninitialized symbol 'off'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Hector Martin <marcan(a)marcan.st>
CC: Marc Zyngier <maz(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab2afa23bd197df47819a87f0265c0ac95c5b6a
commit: dc97fd6fec009957e81026055fc99a03877ff3b8 irqchip/apple-aic: Dynamically compute register offsets
date: 3 months ago
:::::: branch date: 24 hours ago
:::::: commit date: 3 months ago
config: arm64-randconfig-m031-20220530 (https://download.01.org/0day-ci/archive/20220601/202206010439.LRgjym7t-lk...)
compiler: aarch64-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/irqchip/irq-apple-aic.c:941 aic_of_ic_init() error: uninitialized symbol 'off'.
Old smatch warnings:
drivers/irqchip/irq-apple-aic.c:920 aic_of_ic_init() warn: possible memory leak of 'irqc'
drivers/irqchip/irq-apple-aic.c:998 aic_of_ic_init() warn: 'regs' from of_iomap() not released on lines: 914,920.
vim +/off +941 drivers/irqchip/irq-apple-aic.c
b6ca556c352979 Marc Zyngier 2021-02-28 899
76cde26394114f Hector Martin 2021-01-21 900 static int __init aic_of_ic_init(struct device_node *node, struct device_node *parent)
76cde26394114f Hector Martin 2021-01-21 901 {
76cde26394114f Hector Martin 2021-01-21 902 int i;
dc97fd6fec0099 Hector Martin 2022-03-10 903 u32 off;
76cde26394114f Hector Martin 2021-01-21 904 void __iomem *regs;
76cde26394114f Hector Martin 2021-01-21 905 struct aic_irq_chip *irqc;
2cf68211664acd Hector Martin 2022-03-10 906 const struct of_device_id *match;
76cde26394114f Hector Martin 2021-01-21 907
76cde26394114f Hector Martin 2021-01-21 908 regs = of_iomap(node, 0);
76cde26394114f Hector Martin 2021-01-21 909 if (WARN_ON(!regs))
76cde26394114f Hector Martin 2021-01-21 910 return -EIO;
76cde26394114f Hector Martin 2021-01-21 911
76cde26394114f Hector Martin 2021-01-21 912 irqc = kzalloc(sizeof(*irqc), GFP_KERNEL);
76cde26394114f Hector Martin 2021-01-21 913 if (!irqc)
76cde26394114f Hector Martin 2021-01-21 914 return -ENOMEM;
76cde26394114f Hector Martin 2021-01-21 915
76cde26394114f Hector Martin 2021-01-21 916 irqc->base = regs;
76cde26394114f Hector Martin 2021-01-21 917
2cf68211664acd Hector Martin 2022-03-10 918 match = of_match_node(aic_info_match, node);
2cf68211664acd Hector Martin 2022-03-10 919 if (!match)
2cf68211664acd Hector Martin 2022-03-10 920 return -ENODEV;
2cf68211664acd Hector Martin 2022-03-10 921
2cf68211664acd Hector Martin 2022-03-10 922 irqc->info = *(struct aic_info *)match->data;
2cf68211664acd Hector Martin 2022-03-10 923
2cf68211664acd Hector Martin 2022-03-10 924 aic_irqc = irqc;
2cf68211664acd Hector Martin 2022-03-10 925
dc97fd6fec0099 Hector Martin 2022-03-10 926 switch (irqc->info.version) {
dc97fd6fec0099 Hector Martin 2022-03-10 927 case 1: {
dc97fd6fec0099 Hector Martin 2022-03-10 928 u32 info;
dc97fd6fec0099 Hector Martin 2022-03-10 929
76cde26394114f Hector Martin 2021-01-21 930 info = aic_ic_read(irqc, AIC_INFO);
7c841f5f6fa3f9 Hector Martin 2022-03-10 931 irqc->nr_irq = FIELD_GET(AIC_INFO_NR_IRQ, info);
dc97fd6fec0099 Hector Martin 2022-03-10 932 irqc->max_irq = AIC_MAX_IRQ;
dc97fd6fec0099 Hector Martin 2022-03-10 933
dc97fd6fec0099 Hector Martin 2022-03-10 934 off = irqc->info.target_cpu;
dc97fd6fec0099 Hector Martin 2022-03-10 935 off += sizeof(u32) * irqc->max_irq; /* TARGET_CPU */
dc97fd6fec0099 Hector Martin 2022-03-10 936
dc97fd6fec0099 Hector Martin 2022-03-10 937 break;
dc97fd6fec0099 Hector Martin 2022-03-10 938 }
dc97fd6fec0099 Hector Martin 2022-03-10 939 }
dc97fd6fec0099 Hector Martin 2022-03-10 940
dc97fd6fec0099 Hector Martin 2022-03-10 @941 irqc->info.sw_set = off;
dc97fd6fec0099 Hector Martin 2022-03-10 942 off += sizeof(u32) * (irqc->max_irq >> 5); /* SW_SET */
dc97fd6fec0099 Hector Martin 2022-03-10 943 irqc->info.sw_clr = off;
dc97fd6fec0099 Hector Martin 2022-03-10 944 off += sizeof(u32) * (irqc->max_irq >> 5); /* SW_CLR */
dc97fd6fec0099 Hector Martin 2022-03-10 945 irqc->info.mask_set = off;
dc97fd6fec0099 Hector Martin 2022-03-10 946 off += sizeof(u32) * (irqc->max_irq >> 5); /* MASK_SET */
dc97fd6fec0099 Hector Martin 2022-03-10 947 irqc->info.mask_clr = off;
dc97fd6fec0099 Hector Martin 2022-03-10 948 off += sizeof(u32) * (irqc->max_irq >> 5); /* MASK_CLR */
dc97fd6fec0099 Hector Martin 2022-03-10 949 off += sizeof(u32) * (irqc->max_irq >> 5); /* HW_STATE */
76cde26394114f Hector Martin 2021-01-21 950
2cf68211664acd Hector Martin 2022-03-10 951 if (irqc->info.fast_ipi)
2cf68211664acd Hector Martin 2022-03-10 952 static_branch_enable(&use_fast_ipi);
2cf68211664acd Hector Martin 2022-03-10 953 else
2cf68211664acd Hector Martin 2022-03-10 954 static_branch_disable(&use_fast_ipi);
2cf68211664acd Hector Martin 2022-03-10 955
7c841f5f6fa3f9 Hector Martin 2022-03-10 956 irqc->hw_domain = irq_domain_create_tree(of_node_to_fwnode(node),
76cde26394114f Hector Martin 2021-01-21 957 &aic_irq_domain_ops, irqc);
76cde26394114f Hector Martin 2021-01-21 958 if (WARN_ON(!irqc->hw_domain)) {
76cde26394114f Hector Martin 2021-01-21 959 iounmap(irqc->base);
76cde26394114f Hector Martin 2021-01-21 960 kfree(irqc);
76cde26394114f Hector Martin 2021-01-21 961 return -ENODEV;
76cde26394114f Hector Martin 2021-01-21 962 }
76cde26394114f Hector Martin 2021-01-21 963
76cde26394114f Hector Martin 2021-01-21 964 irq_domain_update_bus_token(irqc->hw_domain, DOMAIN_BUS_WIRED);
76cde26394114f Hector Martin 2021-01-21 965
76cde26394114f Hector Martin 2021-01-21 966 if (aic_init_smp(irqc, node)) {
76cde26394114f Hector Martin 2021-01-21 967 irq_domain_remove(irqc->hw_domain);
76cde26394114f Hector Martin 2021-01-21 968 iounmap(irqc->base);
76cde26394114f Hector Martin 2021-01-21 969 kfree(irqc);
76cde26394114f Hector Martin 2021-01-21 970 return -ENODEV;
76cde26394114f Hector Martin 2021-01-21 971 }
76cde26394114f Hector Martin 2021-01-21 972
76cde26394114f Hector Martin 2021-01-21 973 set_handle_irq(aic_handle_irq);
76cde26394114f Hector Martin 2021-01-21 974 set_handle_fiq(aic_handle_fiq);
76cde26394114f Hector Martin 2021-01-21 975
7c841f5f6fa3f9 Hector Martin 2022-03-10 976 for (i = 0; i < BITS_TO_U32(irqc->nr_irq); i++)
dc97fd6fec0099 Hector Martin 2022-03-10 977 aic_ic_write(irqc, irqc->info.mask_set + i * 4, U32_MAX);
7c841f5f6fa3f9 Hector Martin 2022-03-10 978 for (i = 0; i < BITS_TO_U32(irqc->nr_irq); i++)
dc97fd6fec0099 Hector Martin 2022-03-10 979 aic_ic_write(irqc, irqc->info.sw_clr + i * 4, U32_MAX);
7c841f5f6fa3f9 Hector Martin 2022-03-10 980 for (i = 0; i < irqc->nr_irq; i++)
dc97fd6fec0099 Hector Martin 2022-03-10 981 aic_ic_write(irqc, irqc->info.target_cpu + i * 4, 1);
76cde26394114f Hector Martin 2021-01-21 982
76cde26394114f Hector Martin 2021-01-21 983 if (!is_kernel_in_hyp_mode())
76cde26394114f Hector Martin 2021-01-21 984 pr_info("Kernel running in EL1, mapping interrupts");
76cde26394114f Hector Martin 2021-01-21 985
2cf68211664acd Hector Martin 2022-03-10 986 if (static_branch_likely(&use_fast_ipi))
2cf68211664acd Hector Martin 2022-03-10 987 pr_info("Using Fast IPIs");
2cf68211664acd Hector Martin 2022-03-10 988
76cde26394114f Hector Martin 2021-01-21 989 cpuhp_setup_state(CPUHP_AP_IRQ_APPLE_AIC_STARTING,
76cde26394114f Hector Martin 2021-01-21 990 "irqchip/apple-aic/ipi:starting",
76cde26394114f Hector Martin 2021-01-21 991 aic_init_cpu, NULL);
76cde26394114f Hector Martin 2021-01-21 992
b6ca556c352979 Marc Zyngier 2021-02-28 993 vgic_set_kvm_info(&vgic_info);
b6ca556c352979 Marc Zyngier 2021-02-28 994
dc97fd6fec0099 Hector Martin 2022-03-10 995 pr_info("Initialized with %d/%d IRQs, %d FIQs, %d vIPIs",
dc97fd6fec0099 Hector Martin 2022-03-10 996 irqc->nr_irq, irqc->max_irq, AIC_NR_FIQ, AIC_NR_SWIPI);
76cde26394114f Hector Martin 2021-01-21 997
76cde26394114f Hector Martin 2021-01-21 998 return 0;
76cde26394114f Hector Martin 2021-01-21 999 }
76cde26394114f Hector Martin 2021-01-21 1000
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 4 days
[ammarfaizi2-block:dhowells/linux-fs/cifs-netfs 21/41] fs/netfs/buffered_read.c:262:12-13: WARNING opportunity for min()
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: "GNU/Weeb Mailing List" <gwml(a)vger.gnuweeb.org>
CC: linux-kernel(a)vger.kernel.org
TO: David Howells <dhowells(a)redhat.com>
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/cifs-netfs
head: 1fc71b6b30f6d2a981c163b77c9aee0aecaecb29
commit: 7dda728e404354bcb6e11492413a1e92fe16b35d [21/41] netfs: Implement support for DIO read
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
config: openrisc-randconfig-c003-20220531 (https://download.01.org/0day-ci/archive/20220601/202206010053.m39d9soU-lk...)
compiler: or1k-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> fs/netfs/buffered_read.c:262:12-13: WARNING opportunity for min()
vim +262 fs/netfs/buffered_read.c
16211268fcb366 David Howells 2022-03-01 214
16211268fcb366 David Howells 2022-03-01 215 /**
16211268fcb366 David Howells 2022-03-01 216 * netfs_readpage - Helper to manage a readpage request
16211268fcb366 David Howells 2022-03-01 217 * @file: The file to read from
16211268fcb366 David Howells 2022-03-01 218 * @subpage: A subpage of the folio to read
16211268fcb366 David Howells 2022-03-01 219 *
16211268fcb366 David Howells 2022-03-01 220 * Fulfil a readpage request by drawing data from the cache if possible, or the
16211268fcb366 David Howells 2022-03-01 221 * netfs if not. Space beyond the EOF is zero-filled. Multiple I/O requests
16211268fcb366 David Howells 2022-03-01 222 * from different sources will get munged together.
16211268fcb366 David Howells 2022-03-01 223 *
16211268fcb366 David Howells 2022-03-01 224 * The calling netfs must initialise a netfs context contiguous to the vfs
16211268fcb366 David Howells 2022-03-01 225 * inode before calling this.
16211268fcb366 David Howells 2022-03-01 226 *
16211268fcb366 David Howells 2022-03-01 227 * This is usable whether or not caching is enabled.
16211268fcb366 David Howells 2022-03-01 228 */
16211268fcb366 David Howells 2022-03-01 229 int netfs_readpage(struct file *file, struct page *subpage)
16211268fcb366 David Howells 2022-03-01 230 {
16211268fcb366 David Howells 2022-03-01 231 struct folio *folio = page_folio(subpage);
16211268fcb366 David Howells 2022-03-01 232 struct address_space *mapping = folio_file_mapping(folio);
16211268fcb366 David Howells 2022-03-01 233 struct netfs_io_request *rreq;
16211268fcb366 David Howells 2022-03-01 234 struct netfs_i_context *ctx = netfs_i_context(mapping->host);
7dda728e404354 David Howells 2022-01-14 235 ssize_t ret;
16211268fcb366 David Howells 2022-03-01 236
16211268fcb366 David Howells 2022-03-01 237 _enter("%lx", folio_index(folio));
16211268fcb366 David Howells 2022-03-01 238
16211268fcb366 David Howells 2022-03-01 239 rreq = netfs_alloc_request(mapping, file,
16211268fcb366 David Howells 2022-03-01 240 folio_file_pos(folio), folio_size(folio),
16211268fcb366 David Howells 2022-03-01 241 NETFS_READPAGE);
16211268fcb366 David Howells 2022-03-01 242 if (IS_ERR(rreq)) {
16211268fcb366 David Howells 2022-03-01 243 ret = PTR_ERR(rreq);
16211268fcb366 David Howells 2022-03-01 244 goto alloc_error;
16211268fcb366 David Howells 2022-03-01 245 }
16211268fcb366 David Howells 2022-03-01 246
81b451668a2656 David Howells 2021-08-10 247 ret = netfs_begin_cache_operation(rreq, ctx);
16211268fcb366 David Howells 2022-03-01 248 if (ret == -ENOMEM || ret == -EINTR || ret == -ERESTARTSYS)
16211268fcb366 David Howells 2022-03-01 249 goto discard;
16211268fcb366 David Howells 2022-03-01 250
16211268fcb366 David Howells 2022-03-01 251 netfs_stat(&netfs_n_rh_readpage);
16211268fcb366 David Howells 2022-03-01 252 trace_netfs_read(rreq, rreq->start, rreq->len, netfs_read_trace_readpage);
c1e70ea1e5b0be David Howells 2021-07-09 253
c1e70ea1e5b0be David Howells 2021-07-09 254 /* Set up the output buffer */
c1e70ea1e5b0be David Howells 2021-07-09 255 rreq->buffering = NETFS_BUFFER;
c1e70ea1e5b0be David Howells 2021-07-09 256 ret = netfs_set_up_buffer(&rreq->buffer, rreq->mapping, NULL, folio,
c1e70ea1e5b0be David Howells 2021-07-09 257 folio_index(folio), folio_nr_pages(folio));
c1e70ea1e5b0be David Howells 2021-07-09 258 if (ret < 0)
c1e70ea1e5b0be David Howells 2021-07-09 259 goto discard;
c1e70ea1e5b0be David Howells 2021-07-09 260
7dda728e404354 David Howells 2022-01-14 261 ret = netfs_begin_read(rreq, true);
7dda728e404354 David Howells 2022-01-14 @262 return ret < 0 ? ret : 0;
16211268fcb366 David Howells 2022-03-01 263
16211268fcb366 David Howells 2022-03-01 264 discard:
16211268fcb366 David Howells 2022-03-01 265 netfs_put_request(rreq, false, netfs_rreq_trace_put_discard);
16211268fcb366 David Howells 2022-03-01 266 alloc_error:
16211268fcb366 David Howells 2022-03-01 267 folio_unlock(folio);
16211268fcb366 David Howells 2022-03-01 268 return ret;
16211268fcb366 David Howells 2022-03-01 269 }
16211268fcb366 David Howells 2022-03-01 270 EXPORT_SYMBOL(netfs_readpage);
16211268fcb366 David Howells 2022-03-01 271
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 4 days
Re: [PATCH] cifs: fix potential double free during failed mount
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220531030117.403302-1-lsahlber(a)redhat.com>
References: <20220531030117.403302-1-lsahlber(a)redhat.com>
TO: Ronnie Sahlberg <lsahlber(a)redhat.com>
Hi Ronnie,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on cifs/for-next]
[also build test WARNING on v5.18 next-20220531]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Ronnie-Sahlberg/cifs-fix-p...
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220601/202206010002.h5WsjBSv-lk...)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
fs/cifs/cifsfs.c:943 cifs_smb3_do_mount() warn: possible memory leak of 'cifs_sb'
vim +/cifs_sb +943 fs/cifs/cifsfs.c
ee01a14d9ddcf3 Al Viro 2011-06-17 835
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 836 struct dentry *
c7c137b931b689 Steve French 2018-06-06 837 cifs_smb3_do_mount(struct file_system_type *fs_type,
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 838 int flags, struct smb3_fs_context *old_ctx)
^1da177e4c3f41 Linus Torvalds 2005-04-16 839 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 840 int rc;
cd7b7bbd4355bf Ronnie Sahlberg 2022-05-31 841 struct super_block *sb = NULL;
d17abdf7566566 Ronnie Sahlberg 2020-11-10 842 struct cifs_sb_info *cifs_sb = NULL;
25c7f41e9234f6 Pavel Shilovsky 2011-05-26 843 struct cifs_mnt_data mnt_data;
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 844 struct dentry *root;
^1da177e4c3f41 Linus Torvalds 2005-04-16 845
8c1beb9801293b Steve French 2018-10-07 846 /*
8c1beb9801293b Steve French 2018-10-07 847 * Prints in Kernel / CIFS log the attempted mount operation
8c1beb9801293b Steve French 2018-10-07 848 * If CIFS_DEBUG && cifs_FYI
8c1beb9801293b Steve French 2018-10-07 849 */
f80eaedd6c5978 Rodrigo Freire 2018-10-07 850 if (cifsFYI)
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 851 cifs_dbg(FYI, "Devname: %s flags: %d\n", old_ctx->UNC, flags);
f80eaedd6c5978 Rodrigo Freire 2018-10-07 852 else
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 853 cifs_info("Attempting to mount %s\n", old_ctx->UNC);
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 854
d17abdf7566566 Ronnie Sahlberg 2020-11-10 855 cifs_sb = kzalloc(sizeof(struct cifs_sb_info), GFP_KERNEL);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 856 if (cifs_sb == NULL) {
d17abdf7566566 Ronnie Sahlberg 2020-11-10 857 root = ERR_PTR(-ENOMEM);
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 858 goto out;
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 859 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 860
d17abdf7566566 Ronnie Sahlberg 2020-11-10 861 cifs_sb->ctx = kzalloc(sizeof(struct smb3_fs_context), GFP_KERNEL);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 862 if (!cifs_sb->ctx) {
d17abdf7566566 Ronnie Sahlberg 2020-11-10 863 root = ERR_PTR(-ENOMEM);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 864 goto out;
d17abdf7566566 Ronnie Sahlberg 2020-11-10 865 }
d17abdf7566566 Ronnie Sahlberg 2020-11-10 866 rc = smb3_fs_context_dup(cifs_sb->ctx, old_ctx);
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 867 if (rc) {
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 868 root = ERR_PTR(rc);
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 869 goto out;
24e0a1eff9e2b9 Ronnie Sahlberg 2020-12-10 870 }
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 871
5c1acf3fe05ce4 Paulo Alcantara 2021-05-03 872 rc = cifs_setup_volume_info(cifs_sb->ctx, NULL, NULL);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 873 if (rc) {
d17abdf7566566 Ronnie Sahlberg 2020-11-10 874 root = ERR_PTR(rc);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 875 goto out;
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 876 }
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 877
51acd208bd57c8 Ronnie Sahlberg 2020-12-14 878 rc = cifs_setup_cifs_sb(cifs_sb);
4214ebf4654798 Sachin Prabhu 2016-07-29 879 if (rc) {
4214ebf4654798 Sachin Prabhu 2016-07-29 880 root = ERR_PTR(rc);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 881 goto out;
a6b5058fafdf50 Aurelien Aptel 2016-05-25 882 }
a6b5058fafdf50 Aurelien Aptel 2016-05-25 883
d17abdf7566566 Ronnie Sahlberg 2020-11-10 884 rc = cifs_mount(cifs_sb, cifs_sb->ctx);
97d1152acec064 Al Viro 2011-06-17 885 if (rc) {
1751e8a6cb935e Linus Torvalds 2017-11-27 886 if (!(flags & SB_SILENT))
f96637be081141 Joe Perches 2013-05-04 887 cifs_dbg(VFS, "cifs_mount failed w/return code = %d\n",
f96637be081141 Joe Perches 2013-05-04 888 rc);
97d1152acec064 Al Viro 2011-06-17 889 root = ERR_PTR(rc);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 890 goto out;
97d1152acec064 Al Viro 2011-06-17 891 }
97d1152acec064 Al Viro 2011-06-17 892
d17abdf7566566 Ronnie Sahlberg 2020-11-10 893 mnt_data.ctx = cifs_sb->ctx;
25c7f41e9234f6 Pavel Shilovsky 2011-05-26 894 mnt_data.cifs_sb = cifs_sb;
25c7f41e9234f6 Pavel Shilovsky 2011-05-26 895 mnt_data.flags = flags;
25c7f41e9234f6 Pavel Shilovsky 2011-05-26 896
9249e17fe094d8 David Howells 2012-06-25 897 /* BB should we make this contingent on mount parm? */
1751e8a6cb935e Linus Torvalds 2017-11-27 898 flags |= SB_NODIRATIME | SB_NOATIME;
9249e17fe094d8 David Howells 2012-06-25 899
9249e17fe094d8 David Howells 2012-06-25 900 sb = sget(fs_type, cifs_match_super, cifs_set_super, flags, &mnt_data);
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 901 if (IS_ERR(sb)) {
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 902 root = ERR_CAST(sb);
97d1152acec064 Al Viro 2011-06-17 903 cifs_umount(cifs_sb);
6cf5abbfa8c8a2 Ronnie Sahlberg 2020-12-16 904 cifs_sb = NULL;
d757d71bfc3066 Al Viro 2011-06-17 905 goto out;
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 906 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 907
ee01a14d9ddcf3 Al Viro 2011-06-17 908 if (sb->s_root) {
f96637be081141 Joe Perches 2013-05-04 909 cifs_dbg(FYI, "Use existing superblock\n");
97d1152acec064 Al Viro 2011-06-17 910 cifs_umount(cifs_sb);
6cf5abbfa8c8a2 Ronnie Sahlberg 2020-12-16 911 cifs_sb = NULL;
5c4f1ad7c6aa3b Al Viro 2011-06-17 912 } else {
97d1152acec064 Al Viro 2011-06-17 913 rc = cifs_read_super(sb);
^1da177e4c3f41 Linus Torvalds 2005-04-16 914 if (rc) {
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 915 root = ERR_PTR(rc);
641a58d66d0863 Pavel Shilovsky 2011-05-26 916 goto out_super;
^1da177e4c3f41 Linus Torvalds 2005-04-16 917 }
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 918
1751e8a6cb935e Linus Torvalds 2017-11-27 919 sb->s_flags |= SB_ACTIVE;
5c4f1ad7c6aa3b Al Viro 2011-06-17 920 }
724d9f1cfba0cb Pavel Shilovsky 2011-05-05 921
6cf5abbfa8c8a2 Ronnie Sahlberg 2020-12-16 922 root = cifs_get_root(cifs_sb ? cifs_sb->ctx : old_ctx, sb);
9403c9c598e91d Al Viro 2011-06-17 923 if (IS_ERR(root))
f87d39d951329c Steve French 2011-05-27 924 goto out_super;
25c7f41e9234f6 Pavel Shilovsky 2011-05-26 925
269f67e1ffead6 Ronnie Sahlberg 2021-03-09 926 if (cifs_sb)
269f67e1ffead6 Ronnie Sahlberg 2021-03-09 927 cifs_sb->root = dget(root);
269f67e1ffead6 Ronnie Sahlberg 2021-03-09 928
f96637be081141 Joe Perches 2013-05-04 929 cifs_dbg(FYI, "dentry root is: %p\n", root);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 930 return root;
25c7f41e9234f6 Pavel Shilovsky 2011-05-26 931
641a58d66d0863 Pavel Shilovsky 2011-05-26 932 out_super:
641a58d66d0863 Pavel Shilovsky 2011-05-26 933 deactivate_locked_super(sb);
3d6cc9898efdfb Ronnie Sahlberg 2022-02-11 934 return root;
641a58d66d0863 Pavel Shilovsky 2011-05-26 935 out:
d17abdf7566566 Ronnie Sahlberg 2020-11-10 936 if (cifs_sb) {
cd7b7bbd4355bf Ronnie Sahlberg 2022-05-31 937 if (!sb || IS_ERR(sb)) { /* otherwise kill_sb will handle */
4214ebf4654798 Sachin Prabhu 2016-07-29 938 kfree(cifs_sb->prepath);
c741cba2cd1d14 Ronnie Sahlberg 2020-12-14 939 smb3_cleanup_fs_context(cifs_sb->ctx);
5c4f1ad7c6aa3b Al Viro 2011-06-17 940 kfree(cifs_sb);
d17abdf7566566 Ronnie Sahlberg 2020-11-10 941 }
cd7b7bbd4355bf Ronnie Sahlberg 2022-05-31 942 }
d17abdf7566566 Ronnie Sahlberg 2020-11-10 @943 return root;
^1da177e4c3f41 Linus Torvalds 2005-04-16 944 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 945
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 4 days
net/ipv4/tcp_fastopen.c:97 tcp_fastopen_reset_cipher() warn: possible memory leak of 'ctx'
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Eric Dumazet <edumazet(a)google.com>
CC: Jakub Kicinski <kuba(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab2afa23bd197df47819a87f0265c0ac95c5b6a
commit: e93abb840a2c356ed2809c31fcedb058601ac2e4 net/tcp_fastopen: remove tcp_fastopen_ctx_lock
date: 11 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 11 months ago
config: ia64-randconfig-m031-20220530 (https://download.01.org/0day-ci/archive/20220531/202205311732.UCAiYskK-lk...)
compiler: ia64-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
net/ipv4/tcp_fastopen.c:97 tcp_fastopen_reset_cipher() warn: possible memory leak of 'ctx'
vim +/ctx +97 net/ipv4/tcp_fastopen.c
437138485656c4 Haishuang Yan 2017-09-27 63
9092a76d3cf863 Jason Baron 2019-05-29 64 int tcp_fastopen_reset_cipher(struct net *net, struct sock *sk,
438ac88009bcb1 Ard Biesheuvel 2019-06-19 65 void *primary_key, void *backup_key)
9092a76d3cf863 Jason Baron 2019-05-29 66 {
9092a76d3cf863 Jason Baron 2019-05-29 67 struct tcp_fastopen_context *ctx, *octx;
9092a76d3cf863 Jason Baron 2019-05-29 68 struct fastopen_queue *q;
9092a76d3cf863 Jason Baron 2019-05-29 69 int err = 0;
1046716368979d Jerry Chu 2012-08-31 70
c681edae33e86f Ard Biesheuvel 2019-06-17 71 ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
c681edae33e86f Ard Biesheuvel 2019-06-17 72 if (!ctx) {
c681edae33e86f Ard Biesheuvel 2019-06-17 73 err = -ENOMEM;
9092a76d3cf863 Jason Baron 2019-05-29 74 goto out;
9092a76d3cf863 Jason Baron 2019-05-29 75 }
c681edae33e86f Ard Biesheuvel 2019-06-17 76
438ac88009bcb1 Ard Biesheuvel 2019-06-19 77 ctx->key[0].key[0] = get_unaligned_le64(primary_key);
438ac88009bcb1 Ard Biesheuvel 2019-06-19 78 ctx->key[0].key[1] = get_unaligned_le64(primary_key + 8);
c681edae33e86f Ard Biesheuvel 2019-06-17 79 if (backup_key) {
438ac88009bcb1 Ard Biesheuvel 2019-06-19 80 ctx->key[1].key[0] = get_unaligned_le64(backup_key);
438ac88009bcb1 Ard Biesheuvel 2019-06-19 81 ctx->key[1].key[1] = get_unaligned_le64(backup_key + 8);
c681edae33e86f Ard Biesheuvel 2019-06-17 82 ctx->num = 2;
c681edae33e86f Ard Biesheuvel 2019-06-17 83 } else {
c681edae33e86f Ard Biesheuvel 2019-06-17 84 ctx->num = 1;
c681edae33e86f Ard Biesheuvel 2019-06-17 85 }
c681edae33e86f Ard Biesheuvel 2019-06-17 86
1fba70e5b6bed5 Yuchung Cheng 2017-10-18 87 if (sk) {
1fba70e5b6bed5 Yuchung Cheng 2017-10-18 88 q = &inet_csk(sk)->icsk_accept_queue.fastopenq;
e93abb840a2c35 Eric Dumazet 2021-07-19 89 octx = xchg((__force struct tcp_fastopen_context **)&q->ctx, ctx);
1fba70e5b6bed5 Yuchung Cheng 2017-10-18 90 } else {
e93abb840a2c35 Eric Dumazet 2021-07-19 91 octx = xchg((__force struct tcp_fastopen_context **)&net->ipv4.tcp_fastopen_ctx, ctx);
1fba70e5b6bed5 Yuchung Cheng 2017-10-18 92 }
1046716368979d Jerry Chu 2012-08-31 93
1046716368979d Jerry Chu 2012-08-31 94 if (octx)
1046716368979d Jerry Chu 2012-08-31 95 call_rcu(&octx->rcu, tcp_fastopen_ctx_free);
9092a76d3cf863 Jason Baron 2019-05-29 96 out:
1046716368979d Jerry Chu 2012-08-31 @97 return err;
1046716368979d Jerry Chu 2012-08-31 98 }
1046716368979d Jerry Chu 2012-08-31 99
:::::: The code at line 97 was first introduced by commit
:::::: 1046716368979dee857a2b8a91c4a8833f21b9cb tcp: TCP Fast Open Server - header & support functions
:::::: TO: Jerry Chu <hkchu(a)google.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 5 days
drivers/iio/adc/at91-sama5d2_adc.c:1781 at91_adc_set_watermark() warn: 'st->dma_st.rx_buf' double freed
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: "Lars-Peter Clausen" <lars(a)metafoo.de>
CC: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab2afa23bd197df47819a87f0265c0ac95c5b6a
commit: 907b2ad8c9acad39ac1f0ccdbbe66c63856055e3 iio: at91-sama5d2: Fix incorrect cast to platform_device
date: 6 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 6 months ago
config: nios2-randconfig-m031-20220530 (https://download.01.org/0day-ci/archive/20220531/202205310925.zz2dEYBK-lk...)
compiler: nios2-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/iio/adc/at91-sama5d2_adc.c:1781 at91_adc_set_watermark() warn: 'st->dma_st.rx_buf' double freed
Old smatch warnings:
drivers/iio/adc/at91-sama5d2_adc.c:2160 at91_adc_resume() warn: ignoring unreachable code.
vim +1781 drivers/iio/adc/at91-sama5d2_adc.c
073c662017f2f3 Eugen Hristev 2017-11-15 1747
073c662017f2f3 Eugen Hristev 2017-11-15 1748 static int at91_adc_set_watermark(struct iio_dev *indio_dev, unsigned int val)
073c662017f2f3 Eugen Hristev 2017-11-15 1749 {
073c662017f2f3 Eugen Hristev 2017-11-15 1750 struct at91_adc_state *st = iio_priv(indio_dev);
1a198794451449 Eugen Hristev 2020-09-23 1751 int ret;
073c662017f2f3 Eugen Hristev 2017-11-15 1752
073c662017f2f3 Eugen Hristev 2017-11-15 1753 if (val > AT91_HWFIFO_MAX_SIZE)
073c662017f2f3 Eugen Hristev 2017-11-15 1754 return -EINVAL;
073c662017f2f3 Eugen Hristev 2017-11-15 1755
073c662017f2f3 Eugen Hristev 2017-11-15 1756 if (!st->selected_trig->hw_trig) {
073c662017f2f3 Eugen Hristev 2017-11-15 1757 dev_dbg(&indio_dev->dev, "we need hw trigger for DMA\n");
073c662017f2f3 Eugen Hristev 2017-11-15 1758 return 0;
073c662017f2f3 Eugen Hristev 2017-11-15 1759 }
073c662017f2f3 Eugen Hristev 2017-11-15 1760
073c662017f2f3 Eugen Hristev 2017-11-15 1761 dev_dbg(&indio_dev->dev, "new watermark is %u\n", val);
073c662017f2f3 Eugen Hristev 2017-11-15 1762 st->dma_st.watermark = val;
073c662017f2f3 Eugen Hristev 2017-11-15 1763
073c662017f2f3 Eugen Hristev 2017-11-15 1764 /*
073c662017f2f3 Eugen Hristev 2017-11-15 1765 * The logic here is: if we have watermark 1, it means we do
073c662017f2f3 Eugen Hristev 2017-11-15 1766 * each conversion with it's own IRQ, thus we don't need DMA.
073c662017f2f3 Eugen Hristev 2017-11-15 1767 * If the watermark is higher, we do DMA to do all the transfers in bulk
073c662017f2f3 Eugen Hristev 2017-11-15 1768 */
073c662017f2f3 Eugen Hristev 2017-11-15 1769
073c662017f2f3 Eugen Hristev 2017-11-15 1770 if (val == 1)
907b2ad8c9acad Lars-Peter Clausen 2021-10-19 1771 at91_adc_dma_disable(st);
073c662017f2f3 Eugen Hristev 2017-11-15 1772 else if (val > 1)
907b2ad8c9acad Lars-Peter Clausen 2021-10-19 1773 at91_adc_dma_init(st);
073c662017f2f3 Eugen Hristev 2017-11-15 1774
1a198794451449 Eugen Hristev 2020-09-23 1775 /*
1a198794451449 Eugen Hristev 2020-09-23 1776 * We can start the DMA only after setting the watermark and
1a198794451449 Eugen Hristev 2020-09-23 1777 * having the DMA initialization completed
1a198794451449 Eugen Hristev 2020-09-23 1778 */
1a198794451449 Eugen Hristev 2020-09-23 1779 ret = at91_adc_buffer_prepare(indio_dev);
1a198794451449 Eugen Hristev 2020-09-23 1780 if (ret)
907b2ad8c9acad Lars-Peter Clausen 2021-10-19 @1781 at91_adc_dma_disable(st);
1a198794451449 Eugen Hristev 2020-09-23 1782
1a198794451449 Eugen Hristev 2020-09-23 1783 return ret;
073c662017f2f3 Eugen Hristev 2017-11-15 1784 }
073c662017f2f3 Eugen Hristev 2017-11-15 1785
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 5 days
drivers/iio/adc/ingenic-adc.c:657 ingenic_adc_read_chan_info_raw() error: uninitialized symbol 'cmd'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Christophe Branchereau <cbranchereau(a)gmail.com>
CC: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
CC: Paul Cercueil <paul(a)crapouillou.net>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab2afa23bd197df47819a87f0265c0ac95c5b6a
commit: b9e9bdd425a3c99e15f5dfd465bef936130b7491 iio/adc: ingenic: add JZ4760 support to the sadc driver
date: 10 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 10 months ago
config: nios2-randconfig-m031-20220530 (https://download.01.org/0day-ci/archive/20220531/202205310732.x3FWXYVl-lk...)
compiler: nios2-linux-gcc (GCC) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/iio/adc/ingenic-adc.c:657 ingenic_adc_read_chan_info_raw() error: uninitialized symbol 'cmd'.
vim +/cmd +657 drivers/iio/adc/ingenic-adc.c
1a78daea107ddb Artur Rojek 2019-02-04 627
1a99dc467943c0 Artur Rojek 2020-07-19 628 static int ingenic_adc_read_chan_info_raw(struct iio_dev *iio_dev,
1a78daea107ddb Artur Rojek 2019-02-04 629 struct iio_chan_spec const *chan,
a515d648850546 Artur Rojek 2019-07-27 630 int *val)
1a78daea107ddb Artur Rojek 2019-02-04 631 {
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 632 int cmd, ret, engine = (chan->channel == INGENIC_ADC_BATTERY);
1a99dc467943c0 Artur Rojek 2020-07-19 633 struct ingenic_adc *adc = iio_priv(iio_dev);
1a99dc467943c0 Artur Rojek 2020-07-19 634
1a99dc467943c0 Artur Rojek 2020-07-19 635 ret = clk_enable(adc->clk);
1a99dc467943c0 Artur Rojek 2020-07-19 636 if (ret) {
1a99dc467943c0 Artur Rojek 2020-07-19 637 dev_err(iio_dev->dev.parent, "Failed to enable clock: %d\n",
1a99dc467943c0 Artur Rojek 2020-07-19 638 ret);
1a99dc467943c0 Artur Rojek 2020-07-19 639 return ret;
1a99dc467943c0 Artur Rojek 2020-07-19 640 }
1a78daea107ddb Artur Rojek 2019-02-04 641
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 642 /* We cannot sample the aux channels in parallel. */
a515d648850546 Artur Rojek 2019-07-27 643 mutex_lock(&adc->aux_lock);
9c5eb724f96f8d Christophe Branchereau 2021-07-26 644 if (adc->soc_data->has_aux_md && engine == 0) {
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 645 switch (chan->channel) {
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 646 case INGENIC_ADC_AUX0:
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 647 cmd = 0;
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 648 break;
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 649 case INGENIC_ADC_AUX:
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 650 cmd = 1;
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 651 break;
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 652 case INGENIC_ADC_AUX2:
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 653 cmd = 2;
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 654 break;
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 655 }
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 656
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 @657 ingenic_adc_set_config(adc, JZ_ADC_REG_CFG_AUX_MD, cmd);
1a78daea107ddb Artur Rojek 2019-02-04 658 }
1a78daea107ddb Artur Rojek 2019-02-04 659
a515d648850546 Artur Rojek 2019-07-27 660 ret = ingenic_adc_capture(adc, engine);
a515d648850546 Artur Rojek 2019-07-27 661 if (ret)
a515d648850546 Artur Rojek 2019-07-27 662 goto out;
a515d648850546 Artur Rojek 2019-07-27 663
1a78daea107ddb Artur Rojek 2019-02-04 664 switch (chan->channel) {
b9e9bdd425a3c9 Christophe Branchereau 2021-07-26 665 case INGENIC_ADC_AUX0:
1a78daea107ddb Artur Rojek 2019-02-04 666 case INGENIC_ADC_AUX:
a515d648850546 Artur Rojek 2019-07-27 667 case INGENIC_ADC_AUX2:
1a78daea107ddb Artur Rojek 2019-02-04 668 *val = readw(adc->base + JZ_ADC_REG_ADSDAT);
1a78daea107ddb Artur Rojek 2019-02-04 669 break;
1a78daea107ddb Artur Rojek 2019-02-04 670 case INGENIC_ADC_BATTERY:
1a78daea107ddb Artur Rojek 2019-02-04 671 *val = readw(adc->base + JZ_ADC_REG_ADBDAT);
1a78daea107ddb Artur Rojek 2019-02-04 672 break;
1a78daea107ddb Artur Rojek 2019-02-04 673 }
1a78daea107ddb Artur Rojek 2019-02-04 674
a515d648850546 Artur Rojek 2019-07-27 675 ret = IIO_VAL_INT;
a515d648850546 Artur Rojek 2019-07-27 676 out:
a515d648850546 Artur Rojek 2019-07-27 677 mutex_unlock(&adc->aux_lock);
1a99dc467943c0 Artur Rojek 2020-07-19 678 clk_disable(adc->clk);
1a78daea107ddb Artur Rojek 2019-02-04 679
a515d648850546 Artur Rojek 2019-07-27 680 return ret;
a515d648850546 Artur Rojek 2019-07-27 681 }
a515d648850546 Artur Rojek 2019-07-27 682
--
0-DAY CI Kernel Test Service
https://01.org/lkp
3 weeks, 5 days