drivers/gpu/drm/i915/display/intel_ddi.c:4030 intel_ddi_encoder_destroy() warn: variable dereferenced before check 'dig_port' (see line 4022)
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Imre Deak <imre.deak(a)intel.com>
CC: 0day robot <lkp(a)intel.com>
tree: https://github.com/0day-ci/linux/commits/Imre-Deak/drm-i915-tc-Fix-TypeC-...
head: b4b1e126eb50a8a27bb1348ad13dae05e299a9ac
commit: 295fc54769b7afb65114732f61b1448c3e693011 drm/i915/tc: Fix TypeC PHY connect/disconnect logic on ADL-P
date: 6 days ago
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: x86_64-randconfig-m001-20210927 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/i915/display/intel_ddi.c:4030 intel_ddi_encoder_destroy() warn: variable dereferenced before check 'dig_port' (see line 4022)
vim +/dig_port +4030 drivers/gpu/drm/i915/display/intel_ddi.c
b50a1aa6e1e947 drivers/gpu/drm/i915/display/intel_ddi.c Manasi Navare 2020-02-14 4017
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4018 static void intel_ddi_encoder_destroy(struct drm_encoder *encoder)
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4019 {
4a300e65b59b66 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2021-05-26 4020 struct drm_i915_private *i915 = to_i915(encoder->dev);
b7d02c3a124d9b drivers/gpu/drm/i915/display/intel_ddi.c Ville Syrjälä 2019-12-04 4021 struct intel_digital_port *dig_port = enc_to_dig_port(to_intel_encoder(encoder));
295fc54769b7af drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2021-09-21 @4022 enum phy phy = intel_port_to_phy(i915, dig_port->base.port);
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4023
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4024 intel_dp_encoder_flush_work(encoder);
295fc54769b7af drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2021-09-21 4025 if (intel_phy_is_tc(i915, phy))
295fc54769b7af drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2021-09-21 4026 intel_tc_port_flush_work(dig_port);
4a300e65b59b66 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2021-05-26 4027 intel_display_power_flush_work(i915);
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4028
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4029 drm_encoder_cleanup(encoder);
a6c6eac947d519 drivers/gpu/drm/i915/display/intel_ddi.c Anshuman Gupta 2021-01-11 @4030 if (dig_port)
a6c6eac947d519 drivers/gpu/drm/i915/display/intel_ddi.c Anshuman Gupta 2021-01-11 4031 kfree(dig_port->hdcp_port_data.streams);
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4032 kfree(dig_port);
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4033 }
f6bff60e927b2f drivers/gpu/drm/i915/intel_ddi.c Imre Deak 2018-12-14 4034
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
net/bluetooth/eir.c:212:2: warning: Value stored to 'ptr' is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
CC: 0day robot <lkp(a)intel.com>
tree: https://github.com/0day-ci/linux/commits/Luiz-Augusto-von-Dentz/Bluetooth...
head: cda1eaab813d24fd5a24abcae5c22e15191ee466
commit: cda1eaab813d24fd5a24abcae5c22e15191ee466 Bluetooth: eir: Move EIR/Adv Data functions to its own file
date: 6 days ago
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-c001-20210927 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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
# https://github.com/0day-ci/linux/commit/cda1eaab813d24fd5a24abcae5c22e151...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luiz-Augusto-von-Dentz/Bluetooth-eir-Move-EIR-Adv-Data-functions-to-its-own-file/20210922-113507
git checkout cda1eaab813d24fd5a24abcae5c22e15191ee466
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
15 warnings generated.
drivers/w1/w1.c:997:2: warning: Value stored to 'search_bit' is never read [clang-analyzer-deadcode.DeadStores]
search_bit = 0;
^ ~
drivers/w1/w1.c:997:2: note: Value stored to 'search_bit' is never read
search_bit = 0;
^ ~
drivers/w1/w1.c:999:2: warning: Value stored to 'last_rn' is never read [clang-analyzer-deadcode.DeadStores]
last_rn = 0;
^ ~
drivers/w1/w1.c:999:2: note: Value stored to 'last_rn' is never read
last_rn = 0;
^ ~
Suppressed 13 warnings (13 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.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
Suppressed 13 warnings (13 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.
13 warnings generated.
Suppressed 13 warnings (13 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.
13 warnings generated.
Suppressed 13 warnings (13 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.
13 warnings generated.
Suppressed 13 warnings (13 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.
13 warnings generated.
Suppressed 13 warnings (13 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.
16 warnings generated.
net/sunrpc/auth_gss/gss_mech_switch.c:55:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(new, prefix);
^~~~~~
net/sunrpc/auth_gss/gss_mech_switch.c:55:3: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(new, prefix);
^~~~~~
net/sunrpc/auth_gss/gss_mech_switch.c:56:3: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(new, name);
^~~~~~
net/sunrpc/auth_gss/gss_mech_switch.c:56:3: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(new, name);
^~~~~~
Suppressed 14 warnings (14 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.
net/sunrpc/auth_gss/svcauth_gss.c:1316:3: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
status = -EINVAL;
^ ~~~~~~~
net/sunrpc/auth_gss/svcauth_gss.c:1316:3: note: Value stored to 'status' is never read
status = -EINVAL;
^ ~~~~~~~
Suppressed 14 warnings (14 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.
14 warnings generated.
Suppressed 14 warnings (14 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
15 warnings generated.
Suppressed 15 warnings (13 in non-user code, 2 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.
14 warnings generated.
Suppressed 14 warnings (14 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.
14 warnings generated.
Suppressed 14 warnings (14 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.
14 warnings generated.
Suppressed 14 warnings (14 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.
16 warnings generated.
>> net/bluetooth/eir.c:212:2: warning: Value stored to 'ptr' is never read [clang-analyzer-deadcode.DeadStores]
ptr = create_uuid128_list(hdev, ptr, HCI_MAX_EIR_LENGTH - (ptr - data));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/eir.c:212:2: note: Value stored to 'ptr' is never read
ptr = create_uuid128_list(hdev, ptr, HCI_MAX_EIR_LENGTH - (ptr - data));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/eir.c:295:4: warning: Value stored to 'ptr' is never read [clang-analyzer-deadcode.DeadStores]
ptr += 3;
^ ~
net/bluetooth/eir.c:295:4: note: Value stored to 'ptr' is never read
ptr += 3;
^ ~
Suppressed 14 warnings (14 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.
14 warnings generated.
Suppressed 14 warnings (14 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.
14 warnings generated.
Suppressed 14 warnings (14 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.
14 warnings generated.
Suppressed 14 warnings (14 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.
include/linux/list.h:135:13: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
__list_del(entry->prev, entry->next);
^
net/sunrpc/xprt.c:1783:6: note: Assuming 'xprt' is not equal to NULL
if (xprt == NULL)
^~~~~~~~~~~~
net/sunrpc/xprt.c:1783:2: note: Taking false branch
if (xprt == NULL)
^
net/sunrpc/xprt.c:1789:14: note: Assuming 'i' is < 'num_prealloc'
for (i = 0; i < num_prealloc; i++) {
^~~~~~~~~~~~~~~~
net/sunrpc/xprt.c:1789:2: note: Loop condition is true. Entering loop body
for (i = 0; i < num_prealloc; i++) {
^
net/sunrpc/xprt.c:1791:7: note: Assuming 'req' is null
if (!req)
^~~~
net/sunrpc/xprt.c:1791:3: note: Taking true branch
if (!req)
^
net/sunrpc/xprt.c:1792:4: note: Control jumps to line 1805
goto out_free;
^
net/sunrpc/xprt.c:1805:2: note: Calling 'xprt_free'
xprt_free(xprt);
^~~~~~~~~~~~~~~
net/sunrpc/xprt.c:1814:2: note: Calling 'xprt_free_all_slots'
xprt_free_all_slots(xprt);
^~~~~~~~~~~~~~~~~~~~~~~~~
net/sunrpc/xprt.c:1743:2: note: Loop condition is true. Entering loop body
while (!list_empty(&xprt->free)) {
^
net/sunrpc/xprt.c:1744:9: note: Left side of '&&' is false
req = list_first_entry(&xprt->free, struct rpc_rqst, rq_list);
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
net/sunrpc/xprt.c:1744:9: note: Taking false branch
req = list_first_entry(&xprt->free, struct rpc_rqst, rq_list);
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:328:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:308:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
net/sunrpc/xprt.c:1744:9: note: Loop condition is false. Exiting loop
req = list_first_entry(&xprt->free, struct rpc_rqst, rq_list);
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
vim +/ptr +212 net/bluetooth/eir.c
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 165
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 166 void eir_create(struct hci_dev *hdev, u8 *data)
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 167 {
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 168 u8 *ptr = data;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 169 size_t name_len;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 170
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 171 name_len = strlen(hdev->dev_name);
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 172
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 173 if (name_len > 0) {
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 174 /* EIR Data type */
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 175 if (name_len > 48) {
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 176 name_len = 48;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 177 ptr[1] = EIR_NAME_SHORT;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 178 } else {
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 179 ptr[1] = EIR_NAME_COMPLETE;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 180 }
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 181
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 182 /* EIR Data length */
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 183 ptr[0] = name_len + 1;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 184
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 185 memcpy(ptr + 2, hdev->dev_name, name_len);
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 186
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 187 ptr += (name_len + 2);
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 188 }
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 189
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 190 if (hdev->inq_tx_power != HCI_TX_POWER_INVALID) {
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 191 ptr[0] = 2;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 192 ptr[1] = EIR_TX_POWER;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 193 ptr[2] = (u8)hdev->inq_tx_power;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 194
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 195 ptr += 3;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 196 }
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 197
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 198 if (hdev->devid_source > 0) {
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 199 ptr[0] = 9;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 200 ptr[1] = EIR_DEVICE_ID;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 201
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 202 put_unaligned_le16(hdev->devid_source, ptr + 2);
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 203 put_unaligned_le16(hdev->devid_vendor, ptr + 4);
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 204 put_unaligned_le16(hdev->devid_product, ptr + 6);
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 205 put_unaligned_le16(hdev->devid_version, ptr + 8);
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 206
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 207 ptr += 10;
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 208 }
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 209
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 210 ptr = create_uuid16_list(hdev, ptr, HCI_MAX_EIR_LENGTH - (ptr - data));
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 211 ptr = create_uuid32_list(hdev, ptr, HCI_MAX_EIR_LENGTH - (ptr - data));
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 @212 ptr = create_uuid128_list(hdev, ptr, HCI_MAX_EIR_LENGTH - (ptr - data));
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 213 }
cda1eaab813d24 Luiz Augusto von Dentz 2021-09-20 214
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
drivers/gpu/drm/i915/gvt/scheduler.c:646 prepare_shadow_wa_ctx() warn: inconsistent returns 'wa_ctx->indirect_ctx.obj->base.resv'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Zhi Wang <zhi.wang.linux(a)gmail.com>
CC: Zhenyu Wang <zhenyuw(a)linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: 67f1120381df022a7016f4acc8d4880da9a66c03 drm/i915/gvt: Introduce per object locking in GVT scheduler.
date: 7 months ago
:::::: branch date: 6 days ago
:::::: commit date: 7 months ago
config: x86_64-randconfig-m001-20210927 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/i915/gvt/scheduler.c:646 prepare_shadow_wa_ctx() warn: inconsistent returns 'wa_ctx->indirect_ctx.obj->base.resv'.
Old smatch warnings:
drivers/gpu/drm/i915/gem/i915_gem_object.h:127 __i915_gem_object_lock() error: we previously assumed 'ww' could be null (see line 119)
vim +646 drivers/gpu/drm/i915/gvt/scheduler.c
d8235b5e55845d Zhi Wang 2017-09-12 604
d8235b5e55845d Zhi Wang 2017-09-12 605 static int prepare_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
d8235b5e55845d Zhi Wang 2017-09-12 606 {
d8235b5e55845d Zhi Wang 2017-09-12 607 struct i915_vma *vma;
d8235b5e55845d Zhi Wang 2017-09-12 608 unsigned char *per_ctx_va =
d8235b5e55845d Zhi Wang 2017-09-12 609 (unsigned char *)wa_ctx->indirect_ctx.shadow_va +
d8235b5e55845d Zhi Wang 2017-09-12 610 wa_ctx->indirect_ctx.size;
67f1120381df02 Zhi Wang 2021-01-10 611 struct i915_gem_ww_ctx ww;
67f1120381df02 Zhi Wang 2021-01-10 612 int ret;
d8235b5e55845d Zhi Wang 2017-09-12 613
d8235b5e55845d Zhi Wang 2017-09-12 614 if (wa_ctx->indirect_ctx.size == 0)
d8235b5e55845d Zhi Wang 2017-09-12 615 return 0;
d8235b5e55845d Zhi Wang 2017-09-12 616
67f1120381df02 Zhi Wang 2021-01-10 617 i915_gem_ww_ctx_init(&ww, false);
67f1120381df02 Zhi Wang 2021-01-10 618 retry:
67f1120381df02 Zhi Wang 2021-01-10 619 i915_gem_object_lock(wa_ctx->indirect_ctx.obj, &ww);
67f1120381df02 Zhi Wang 2021-01-10 620
67f1120381df02 Zhi Wang 2021-01-10 621 vma = i915_gem_object_ggtt_pin_ww(wa_ctx->indirect_ctx.obj, &ww, NULL,
d8235b5e55845d Zhi Wang 2017-09-12 622 0, CACHELINE_BYTES, 0);
67f1120381df02 Zhi Wang 2021-01-10 623 if (IS_ERR(vma)) {
67f1120381df02 Zhi Wang 2021-01-10 624 ret = PTR_ERR(vma);
67f1120381df02 Zhi Wang 2021-01-10 625 if (ret == -EDEADLK) {
67f1120381df02 Zhi Wang 2021-01-10 626 ret = i915_gem_ww_ctx_backoff(&ww);
67f1120381df02 Zhi Wang 2021-01-10 627 if (!ret)
67f1120381df02 Zhi Wang 2021-01-10 628 goto retry;
67f1120381df02 Zhi Wang 2021-01-10 629 }
67f1120381df02 Zhi Wang 2021-01-10 630 return ret;
67f1120381df02 Zhi Wang 2021-01-10 631 }
67f1120381df02 Zhi Wang 2021-01-10 632
67f1120381df02 Zhi Wang 2021-01-10 633 i915_gem_object_unlock(wa_ctx->indirect_ctx.obj);
d8235b5e55845d Zhi Wang 2017-09-12 634
d8235b5e55845d Zhi Wang 2017-09-12 635 /* FIXME: we are not tracking our pinned VMA leaving it
d8235b5e55845d Zhi Wang 2017-09-12 636 * up to the core to fix up the stray pin_count upon
d8235b5e55845d Zhi Wang 2017-09-12 637 * free.
d8235b5e55845d Zhi Wang 2017-09-12 638 */
d8235b5e55845d Zhi Wang 2017-09-12 639
d8235b5e55845d Zhi Wang 2017-09-12 640 wa_ctx->indirect_ctx.shadow_gma = i915_ggtt_offset(vma);
d8235b5e55845d Zhi Wang 2017-09-12 641
d8235b5e55845d Zhi Wang 2017-09-12 642 wa_ctx->per_ctx.shadow_gma = *((unsigned int *)per_ctx_va + 1);
d8235b5e55845d Zhi Wang 2017-09-12 643 memset(per_ctx_va, 0, CACHELINE_BYTES);
d8235b5e55845d Zhi Wang 2017-09-12 644
d8235b5e55845d Zhi Wang 2017-09-12 645 update_wa_ctx_2_shadow_ctx(wa_ctx);
d8235b5e55845d Zhi Wang 2017-09-12 @646 return 0;
d8235b5e55845d Zhi Wang 2017-09-12 647 }
d8235b5e55845d Zhi Wang 2017-09-12 648
:::::: The code at line 646 was first introduced by commit
:::::: d8235b5e55845de19983cec38af245cc200b81e2 drm/i915/gvt: Move common workload preparation into prepare_workload()
:::::: TO: Zhi Wang <zhi.a.wang(a)intel.com>
:::::: CC: Zhenyu Wang <zhenyuw(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
sound/soc/intel/skylake/cnl-sst.c:146 cnl_load_base_firmware() error: we previously assumed 'ctx->fw' could be null (see line 130)
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Cezary Rojewski <cezary.rojewski(a)intel.com>
CC: Mark Brown <broonie(a)kernel.org>
Hi Cezary,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: 1b99d50b9709a2cddaba4a7faf1862b4f7bec865 ASoC: Intel: Skylake: Compile when any configuration is selected
date: 7 months ago
:::::: branch date: 6 days ago
:::::: commit date: 7 months ago
config: ia64-randconfig-m031-20210927 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
sound/soc/intel/skylake/cnl-sst.c:146 cnl_load_base_firmware() error: we previously assumed 'ctx->fw' could be null (see line 130)
sound/soc/intel/skylake/skl-sst-utils.c:406 skl_prepare_lib_load() error: we previously assumed 'linfo->fw' could be null (see line 390)
sound/soc/intel/skylake/bxt-sst.c:202 bxt_load_base_firmware() error: we previously assumed 'ctx->fw' could be null (see line 187)
sound/soc/intel/skylake/skl-sst.c:96 skl_load_base_firmware() error: we previously assumed 'ctx->fw' could be null (see line 76)
sound/soc/intel/skylake/skl.c:967 skl_first_init() warn: 'skl->pci' not released on lines: 921,929,947,965.
vim +146 sound/soc/intel/skylake/cnl-sst.c
cb6a552846297094 Guneshwor Singh 2017-08-02 123
cb6a552846297094 Guneshwor Singh 2017-08-02 124 static int cnl_load_base_firmware(struct sst_dsp *ctx)
cb6a552846297094 Guneshwor Singh 2017-08-02 125 {
cb6a552846297094 Guneshwor Singh 2017-08-02 126 struct firmware stripped_fw;
bcc2a2dc3ba8c3a7 Cezary Rojewski 2019-07-23 127 struct skl_dev *cnl = ctx->thread_context;
024aa45f55ccd407 Cezary Rojewski 2020-03-05 128 int ret, i;
cb6a552846297094 Guneshwor Singh 2017-08-02 129
cb6a552846297094 Guneshwor Singh 2017-08-02 @130 if (!ctx->fw) {
cb6a552846297094 Guneshwor Singh 2017-08-02 131 ret = request_firmware(&ctx->fw, ctx->fw_name, ctx->dev);
cb6a552846297094 Guneshwor Singh 2017-08-02 132 if (ret < 0) {
cb6a552846297094 Guneshwor Singh 2017-08-02 133 dev_err(ctx->dev, "request firmware failed: %d\n", ret);
cb6a552846297094 Guneshwor Singh 2017-08-02 134 goto cnl_load_base_firmware_failed;
cb6a552846297094 Guneshwor Singh 2017-08-02 135 }
cb6a552846297094 Guneshwor Singh 2017-08-02 136 }
cb6a552846297094 Guneshwor Singh 2017-08-02 137
cb6a552846297094 Guneshwor Singh 2017-08-02 138 /* parse uuids if first boot */
cb6a552846297094 Guneshwor Singh 2017-08-02 139 if (cnl->is_first_boot) {
cb6a552846297094 Guneshwor Singh 2017-08-02 140 ret = snd_skl_parse_uuids(ctx, ctx->fw,
cb6a552846297094 Guneshwor Singh 2017-08-02 141 CNL_ADSP_FW_HDR_OFFSET, 0);
cb6a552846297094 Guneshwor Singh 2017-08-02 142 if (ret < 0)
cb6a552846297094 Guneshwor Singh 2017-08-02 143 goto cnl_load_base_firmware_failed;
cb6a552846297094 Guneshwor Singh 2017-08-02 144 }
cb6a552846297094 Guneshwor Singh 2017-08-02 145
cb6a552846297094 Guneshwor Singh 2017-08-02 @146 stripped_fw.data = ctx->fw->data;
cb6a552846297094 Guneshwor Singh 2017-08-02 147 stripped_fw.size = ctx->fw->size;
cb6a552846297094 Guneshwor Singh 2017-08-02 148 skl_dsp_strip_extended_manifest(&stripped_fw);
cb6a552846297094 Guneshwor Singh 2017-08-02 149
024aa45f55ccd407 Cezary Rojewski 2020-03-05 150 for (i = 0; i < BXT_FW_ROM_INIT_RETRY; i++) {
cb6a552846297094 Guneshwor Singh 2017-08-02 151 ret = cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size);
024aa45f55ccd407 Cezary Rojewski 2020-03-05 152 if (!ret)
024aa45f55ccd407 Cezary Rojewski 2020-03-05 153 break;
024aa45f55ccd407 Cezary Rojewski 2020-03-05 154 dev_dbg(ctx->dev, "prepare firmware failed: %d\n", ret);
cb6a552846297094 Guneshwor Singh 2017-08-02 155 }
cb6a552846297094 Guneshwor Singh 2017-08-02 156
024aa45f55ccd407 Cezary Rojewski 2020-03-05 157 if (ret < 0)
024aa45f55ccd407 Cezary Rojewski 2020-03-05 158 goto cnl_load_base_firmware_failed;
024aa45f55ccd407 Cezary Rojewski 2020-03-05 159
cb6a552846297094 Guneshwor Singh 2017-08-02 160 ret = sst_transfer_fw_host_dma(ctx);
cb6a552846297094 Guneshwor Singh 2017-08-02 161 if (ret < 0) {
cb6a552846297094 Guneshwor Singh 2017-08-02 162 dev_err(ctx->dev, "transfer firmware failed: %d\n", ret);
cb6a552846297094 Guneshwor Singh 2017-08-02 163 cnl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
cb6a552846297094 Guneshwor Singh 2017-08-02 164 goto cnl_load_base_firmware_failed;
cb6a552846297094 Guneshwor Singh 2017-08-02 165 }
cb6a552846297094 Guneshwor Singh 2017-08-02 166
cb6a552846297094 Guneshwor Singh 2017-08-02 167 ret = wait_event_timeout(cnl->boot_wait, cnl->boot_complete,
cb6a552846297094 Guneshwor Singh 2017-08-02 168 msecs_to_jiffies(SKL_IPC_BOOT_MSECS));
cb6a552846297094 Guneshwor Singh 2017-08-02 169 if (ret == 0) {
cb6a552846297094 Guneshwor Singh 2017-08-02 170 dev_err(ctx->dev, "FW ready timed-out\n");
cb6a552846297094 Guneshwor Singh 2017-08-02 171 cnl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
cb6a552846297094 Guneshwor Singh 2017-08-02 172 ret = -EIO;
cb6a552846297094 Guneshwor Singh 2017-08-02 173 goto cnl_load_base_firmware_failed;
cb6a552846297094 Guneshwor Singh 2017-08-02 174 }
cb6a552846297094 Guneshwor Singh 2017-08-02 175
cb6a552846297094 Guneshwor Singh 2017-08-02 176 cnl->fw_loaded = true;
cb6a552846297094 Guneshwor Singh 2017-08-02 177
cb6a552846297094 Guneshwor Singh 2017-08-02 178 return 0;
cb6a552846297094 Guneshwor Singh 2017-08-02 179
cb6a552846297094 Guneshwor Singh 2017-08-02 180 cnl_load_base_firmware_failed:
024aa45f55ccd407 Cezary Rojewski 2020-03-05 181 dev_err(ctx->dev, "firmware load failed: %d\n", ret);
cb6a552846297094 Guneshwor Singh 2017-08-02 182 release_firmware(ctx->fw);
cb6a552846297094 Guneshwor Singh 2017-08-02 183 ctx->fw = NULL;
cb6a552846297094 Guneshwor Singh 2017-08-02 184
cb6a552846297094 Guneshwor Singh 2017-08-02 185 return ret;
cb6a552846297094 Guneshwor Singh 2017-08-02 186 }
cb6a552846297094 Guneshwor Singh 2017-08-02 187
:::::: The code at line 146 was first introduced by commit
:::::: cb6a552846297094aac942a588fe7ed7922a6c11 ASoC: Intel: cnl: Add sst library functions for cnl platform
:::::: TO: Guneshwor Singh <guneshwor.o.singh(a)intel.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[andrea-aa:main 34/39] mm/userfaultfd.c:866:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG.
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Andrea Arcangeli <aarcange(a)redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git main
head: 594ac4d4703392f80b124eebc2e2816ded6b92cf
commit: 9c170f87bcd588d29b1c0588f50d089041b0b1ef [34/39] userfaultfd: UFFDIO_REMAP uABI
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: riscv-randconfig-c003-20210920 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> mm/userfaultfd.c:866:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)
mm/userfaultfd.c:918:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 3 weeks
[ti:ti-rt-linux-5.10.y 3870/9320] drivers/pci/endpoint/pci-epf-core.c:84:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kishon Vijay Abraham I <kishon(a)ti.com>
CC: Vignesh Raghavendra <vigneshr(a)ti.com>
CC: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
CC: Bjorn Helgaas <helgaas(a)kernel.org>
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 716065a9435e7c06986b8497aa853a7b747a9570
commit: 5fe4c2dfaa4e6413f98aedd00c8b2b372e5b0103 [3870/9320] PCI: endpoint: Add support to associate secondary EPC with EPF
:::::: branch date: 5 days ago
:::::: commit date: 6 months ago
config: riscv-randconfig-c006-20210916 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout 5fe4c2dfaa4e6413f98aedd00c8b2b372e5b0103
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^
kernel/nsproxy.c:560:6: note: Assuming the condition is true
if (proc_ns_file(file))
^~~~~~~~~~~~~~~~~~
kernel/nsproxy.c:560:2: note: Taking true branch
if (proc_ns_file(file))
^
kernel/nsproxy.c:561:29: note: Passing null pointer value via 2nd parameter 'ns'
err = validate_ns(&nsset, ns);
^~
kernel/nsproxy.c:561:9: note: Calling 'validate_ns'
err = validate_ns(&nsset, ns);
^~~~~~~~~~~~~~~~~~~~~~~
kernel/nsproxy.c:351:9: note: Access to field 'ops' results in a dereference of a null pointer (loaded from variable 'ns')
return ns->ops->install(nsset, ns);
^~
Suppressed 16 warnings (9 in non-user code, 7 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.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
lib/math/reciprocal_div.c:48:14: warning: The result of the left shift is undefined due to shifting by '64', which is greater or equal to the width of type 'unsigned long long' [clang-analyzer-core.UndefinedBinaryOperatorResult]
mlow = 1ULL << (32 + l);
^ ~~~~~~~~
lib/math/reciprocal_div.c:44:2: note: Taking true branch
WARN(l == 32,
^
include/asm-generic/bug.h:129:2: note: expanded from macro 'WARN'
if (unlikely(__ret_warn_on)) \
^
lib/math/reciprocal_div.c:44:2: note: Loop condition is false. Exiting loop
WARN(l == 32,
^
include/asm-generic/bug.h:130:3: note: expanded from macro 'WARN'
__WARN_printf(TAINT_WARN, format); \
^
include/asm-generic/bug.h:96:3: note: expanded from macro '__WARN_printf'
instrumentation_begin(); \
^
include/linux/instrumentation.h:53:34: note: expanded from macro 'instrumentation_begin'
# define instrumentation_begin() do { } while(0)
^
lib/math/reciprocal_div.c:44:2: note: Loop condition is false. Exiting loop
WARN(l == 32,
^
include/asm-generic/bug.h:130:3: note: expanded from macro 'WARN'
__WARN_printf(TAINT_WARN, format); \
^
include/asm-generic/bug.h:98:3: note: expanded from macro '__WARN_printf'
__WARN_FLAGS(BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
^
arch/riscv/include/asm/bug.h:79:29: note: expanded from macro '__WARN_FLAGS'
#define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags))
^
arch/riscv/include/asm/bug.h:53:32: note: expanded from macro '__BUG_FLAGS'
#define __BUG_FLAGS(flags) \
^
lib/math/reciprocal_div.c:44:2: note: Loop condition is false. Exiting loop
WARN(l == 32,
^
include/asm-generic/bug.h:130:3: note: expanded from macro 'WARN'
__WARN_printf(TAINT_WARN, format); \
^
include/asm-generic/bug.h:99:3: note: expanded from macro '__WARN_printf'
instrumentation_end(); \
^
include/linux/instrumentation.h:54:33: note: expanded from macro 'instrumentation_end'
# define instrumentation_end() do { } while(0)
^
lib/math/reciprocal_div.c:44:2: note: Loop condition is false. Exiting loop
WARN(l == 32,
^
include/asm-generic/bug.h:130:3: note: expanded from macro 'WARN'
__WARN_printf(TAINT_WARN, format); \
^
include/asm-generic/bug.h:95:38: note: expanded from macro '__WARN_printf'
#define __WARN_printf(taint, arg...) do { \
^
lib/math/reciprocal_div.c:48:14: note: The result of the left shift is undefined due to shifting by '64', which is greater or equal to the width of type 'unsigned long long'
mlow = 1ULL << (32 + l);
^ ~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
>> drivers/pci/endpoint/pci-epf-core.c:84:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = epf->epc->dev.parent;
^~~ ~~~~~~~~~~~~~~~~~~~~
drivers/pci/endpoint/pci-epf-core.c:84:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = epf->epc->dev.parent;
^~~ ~~~~~~~~~~~~~~~~~~~~
include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '64', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult]
return 1UL << fls_long(n - 1);
^
drivers/pci/endpoint/pci-epf-core.c:130:6: note: Assuming 'size' is >= 128
if (size < 128)
^~~~~~~~~~
drivers/pci/endpoint/pci-epf-core.c:130:2: note: Taking false branch
if (size < 128)
^
drivers/pci/endpoint/pci-epf-core.c:133:6: note: Assuming 'align' is 0
if (align)
^~~~~
drivers/pci/endpoint/pci-epf-core.c:133:2: note: Taking false branch
if (align)
^
drivers/pci/endpoint/pci-epf-core.c:136:10: note: '?' condition is false
size = roundup_pow_of_two(size);
^
include/linux/log2.h:175:2: note: expanded from macro 'roundup_pow_of_two'
__builtin_constant_p(n) ? ( \
^
drivers/pci/endpoint/pci-epf-core.c:136:10: note: Calling '__roundup_pow_of_two'
size = roundup_pow_of_two(size);
^
include/linux/log2.h:179:2: note: expanded from macro 'roundup_pow_of_two'
__roundup_pow_of_two(n) \
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/log2.h:57:16: note: Calling 'fls_long'
return 1UL << fls_long(n - 1);
^~~~~~~~~~~~~~~
include/linux/bitops.h:184:2: note: Taking false branch
if (sizeof(l) == 4)
^
include/linux/bitops.h:186:9: note: Calling 'fls64'
return fls64(l);
^~~~~~~~
include/asm-generic/bitops/fls64.h:29:6: note: 'x' is not equal to 0
if (x == 0)
^
include/asm-generic/bitops/fls64.h:29:2: note: Taking false branch
if (x == 0)
^
include/asm-generic/bitops/fls64.h:31:2: note: Returning the value 64
return __fls(x) + 1;
^~~~~~~~~~~~~~~~~~~
include/linux/bitops.h:186:9: note: Returning from 'fls64'
return fls64(l);
^~~~~~~~
include/linux/bitops.h:186:2: note: Returning the value 64
return fls64(l);
^~~~~~~~~~~~~~~
include/linux/log2.h:57:16: note: Returning from 'fls_long'
return 1UL << fls_long(n - 1);
^~~~~~~~~~~~~~~
include/linux/log2.h:57:13: note: The result of the left shift is undefined due to shifting by '64', which is greater or equal to the width of type 'unsigned long'
return 1UL << fls_long(n - 1);
^ ~~~~~~~~~~~~~~~
Suppressed 12 warnings (5 in non-user code, 7 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.
12 warnings generated.
Suppressed 12 warnings (5 in non-user code, 7 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.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
49 warnings generated.
crypto/algapi.c:1004:20: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'int' [clang-analyzer-core.UndefinedBinaryOperatorResult]
relalign = d ? 1 << __ffs(d) : size;
^ ~~~~~~~~
crypto/algapi.c:998:2: note: Taking true branch
if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)) {
^
crypto/algapi.c:1004:14: note: Assuming 'd' is not equal to 0
relalign = d ? 1 << __ffs(d) : size;
^
crypto/algapi.c:1004:14: note: '?' condition is true
crypto/algapi.c:1004:23: note: Calling '__ffs'
relalign = d ? 1 << __ffs(d) : size;
^~~~~~~~
include/asm-generic/bitops/__ffs.h:18:6: note: Assuming the condition is true
if ((word & 0xffffffff) == 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/__ffs.h:18:2: note: Taking true branch
if ((word & 0xffffffff) == 0) {
^
include/asm-generic/bitops/__ffs.h:19:3: note: The value 32 is assigned to 'num'
num += 32;
^~~~~~~~~
include/asm-generic/bitops/__ffs.h:23:6: note: Assuming the condition is false
if ((word & 0xffff) == 0) {
^~~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/__ffs.h:23:2: note: Taking false branch
if ((word & 0xffff) == 0) {
^
include/asm-generic/bitops/__ffs.h:27:6: note: Assuming the condition is false
vim +/dev +84 drivers/pci/endpoint/pci-epf-core.c
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 71
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 72 /**
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 73 * pci_epf_free_space() - free the allocated PCI EPF register space
9b41d19aff4090 Krzysztof Kozlowski 2020-07-29 74 * @epf: the EPF device from whom to free the memory
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 75 * @addr: the virtual address of the PCI EPF register space
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 76 * @bar: the BAR number corresponding to the register space
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 77 * @type: Identifies if the allocated space is for primary EPC or secondary EPC
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 78 *
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 79 * Invoke to free the allocated PCI EPF register space.
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 80 */
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 81 void pci_epf_free_space(struct pci_epf *epf, void *addr, enum pci_barno bar,
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 82 enum pci_epc_interface_type type)
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 83 {
b330104fa76df3 Kishon Vijay Abraham I 2018-01-11 @84 struct device *dev = epf->epc->dev.parent;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 85 struct pci_epf_bar *epf_bar;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 86 struct pci_epc *epc;
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 87
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 88 if (!addr)
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 89 return;
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 90
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 91 if (type == PRIMARY_INTERFACE) {
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 92 epc = epf->epc;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 93 epf_bar = epf->bar;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 94 } else {
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 95 epc = epf->sec_epc;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 96 epf_bar = epf->sec_epc_bar;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 97 }
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 98
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 99 dev = epc->dev.parent;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 100 dma_free_coherent(dev, epf_bar[bar].size, addr,
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 101 epf_bar[bar].phys_addr);
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 102
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 103 epf_bar[bar].phys_addr = 0;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 104 epf_bar[bar].addr = NULL;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 105 epf_bar[bar].size = 0;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 106 epf_bar[bar].barno = 0;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 107 epf_bar[bar].flags = 0;
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 108 }
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 109 EXPORT_SYMBOL_GPL(pci_epf_free_space);
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 110
:::::: The code at line 84 was first introduced by commit
:::::: b330104fa76df3eae6e199a23791fed5d35f06b4 PCI: endpoint: Use EPC's device in dma_alloc_coherent()/dma_free_coherent()
:::::: TO: Kishon Vijay Abraham I <kishon(a)ti.com>
:::::: CC: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 3 weeks
kernel/bpf/btf.c:5588:13: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Andrii Nakryiko <andrii(a)kernel.org>
CC: Alexei Starovoitov <ast(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 20621d2f27a0163b81dc2b74fd4c0b3e6aa5fa12
commit: 5329722057d41aebc31e391907a501feaa42f7d9 bpf: Assign ID to vmlinux BTF and return extra info for BTF in GET_OBJ_INFO
date: 10 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 10 months ago
compiler: nios2-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> kernel/bpf/core.c:1379:0: warning: Syntax Error: AST broken, binary operator '=' doesn't have two operands. [internalAstError]
^
>> kernel/bpf/syscall.c:2768:12: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
if (!ulen ^ !ubuf)
^
>> kernel/bpf/btf.c:5588:13: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
if (!uname ^ !uname_len)
^
kernel/bpf/btf.c:4522:38: warning: Either the condition 't?btf_type_vlen(t):5' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
args = (const struct btf_param *)(t + 1);
^
kernel/bpf/btf.c:4524:14: note: Assuming that condition 't?btf_type_vlen(t):5' is not redundant
nr_args = t ? btf_type_vlen(t) : 5;
^
kernel/bpf/btf.c:4522:38: note: Null pointer addition
args = (const struct btf_param *)(t + 1);
^
kernel/bpf/btf.c:4373:9: warning: Local variable btf_id shadows outer function [shadowFunction]
int i, btf_id;
^
kernel/bpf/btf.c:5638:5: note: Shadowed declaration
u32 btf_id(const struct btf *btf)
^
kernel/bpf/btf.c:4373:9: note: Shadow variable
int i, btf_id;
^
kernel/bpf/btf.c:5175:6: warning: Local variable btf_id shadows outer function [shadowFunction]
u32 btf_id = 0;
^
kernel/bpf/btf.c:5638:5: note: Shadowed declaration
u32 btf_id(const struct btf *btf)
^
kernel/bpf/btf.c:5175:6: note: Shadow variable
u32 btf_id = 0;
^
kernel/bpf/btf.c:5208:16: warning: Local variable btf_id shadows outer function [shadowFunction]
u32 i, nargs, btf_id;
^
kernel/bpf/btf.c:5638:5: note: Shadowed declaration
u32 btf_id(const struct btf *btf)
^
kernel/bpf/btf.c:5208:16: note: Shadow variable
u32 i, nargs, btf_id;
^
kernel/bpf/btf.c:5306:16: warning: Local variable btf_id shadows outer function [shadowFunction]
u32 i, nargs, btf_id;
^
kernel/bpf/btf.c:5638:5: note: Shadowed declaration
u32 btf_id(const struct btf *btf)
^
kernel/bpf/btf.c:5306:16: note: Shadow variable
u32 i, nargs, btf_id;
^
>> kernel/bpf/btf.c:4277:5: warning: union member 'Anonymous2::__t' is never used. [unusedStructMember]
} *__t;
^
vim +5588 kernel/bpf/btf.c
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5556
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5557 int btf_get_info_by_fd(const struct btf *btf,
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5558 const union bpf_attr *attr,
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5559 union bpf_attr __user *uattr)
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5560 {
62dab84c81a487 Martin KaFai Lau 2018-05-04 5561 struct bpf_btf_info __user *uinfo;
5c6f25887963f1 Greg Kroah-Hartman 2020-03-20 5562 struct bpf_btf_info info;
62dab84c81a487 Martin KaFai Lau 2018-05-04 5563 u32 info_copy, btf_copy;
62dab84c81a487 Martin KaFai Lau 2018-05-04 5564 void __user *ubtf;
5329722057d41a Andrii Nakryiko 2020-11-09 5565 char __user *uname;
5329722057d41a Andrii Nakryiko 2020-11-09 5566 u32 uinfo_len, uname_len, name_len;
5329722057d41a Andrii Nakryiko 2020-11-09 5567 int ret = 0;
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5568
62dab84c81a487 Martin KaFai Lau 2018-05-04 5569 uinfo = u64_to_user_ptr(attr->info.info);
62dab84c81a487 Martin KaFai Lau 2018-05-04 5570 uinfo_len = attr->info.info_len;
62dab84c81a487 Martin KaFai Lau 2018-05-04 5571
62dab84c81a487 Martin KaFai Lau 2018-05-04 5572 info_copy = min_t(u32, uinfo_len, sizeof(info));
5c6f25887963f1 Greg Kroah-Hartman 2020-03-20 5573 memset(&info, 0, sizeof(info));
62dab84c81a487 Martin KaFai Lau 2018-05-04 5574 if (copy_from_user(&info, uinfo, info_copy))
62dab84c81a487 Martin KaFai Lau 2018-05-04 5575 return -EFAULT;
62dab84c81a487 Martin KaFai Lau 2018-05-04 5576
62dab84c81a487 Martin KaFai Lau 2018-05-04 5577 info.id = btf->id;
62dab84c81a487 Martin KaFai Lau 2018-05-04 5578 ubtf = u64_to_user_ptr(info.btf);
62dab84c81a487 Martin KaFai Lau 2018-05-04 5579 btf_copy = min_t(u32, btf->data_size, info.btf_size);
62dab84c81a487 Martin KaFai Lau 2018-05-04 5580 if (copy_to_user(ubtf, btf->data, btf_copy))
62dab84c81a487 Martin KaFai Lau 2018-05-04 5581 return -EFAULT;
62dab84c81a487 Martin KaFai Lau 2018-05-04 5582 info.btf_size = btf->data_size;
62dab84c81a487 Martin KaFai Lau 2018-05-04 5583
5329722057d41a Andrii Nakryiko 2020-11-09 5584 info.kernel_btf = btf->kernel_btf;
5329722057d41a Andrii Nakryiko 2020-11-09 5585
5329722057d41a Andrii Nakryiko 2020-11-09 5586 uname = u64_to_user_ptr(info.name);
5329722057d41a Andrii Nakryiko 2020-11-09 5587 uname_len = info.name_len;
5329722057d41a Andrii Nakryiko 2020-11-09 @5588 if (!uname ^ !uname_len)
5329722057d41a Andrii Nakryiko 2020-11-09 5589 return -EINVAL;
5329722057d41a Andrii Nakryiko 2020-11-09 5590
5329722057d41a Andrii Nakryiko 2020-11-09 5591 name_len = strlen(btf->name);
5329722057d41a Andrii Nakryiko 2020-11-09 5592 info.name_len = name_len;
5329722057d41a Andrii Nakryiko 2020-11-09 5593
5329722057d41a Andrii Nakryiko 2020-11-09 5594 if (uname) {
5329722057d41a Andrii Nakryiko 2020-11-09 5595 if (uname_len >= name_len + 1) {
5329722057d41a Andrii Nakryiko 2020-11-09 5596 if (copy_to_user(uname, btf->name, name_len + 1))
5329722057d41a Andrii Nakryiko 2020-11-09 5597 return -EFAULT;
5329722057d41a Andrii Nakryiko 2020-11-09 5598 } else {
5329722057d41a Andrii Nakryiko 2020-11-09 5599 char zero = '\0';
5329722057d41a Andrii Nakryiko 2020-11-09 5600
5329722057d41a Andrii Nakryiko 2020-11-09 5601 if (copy_to_user(uname, btf->name, uname_len - 1))
5329722057d41a Andrii Nakryiko 2020-11-09 5602 return -EFAULT;
5329722057d41a Andrii Nakryiko 2020-11-09 5603 if (put_user(zero, uname + uname_len - 1))
5329722057d41a Andrii Nakryiko 2020-11-09 5604 return -EFAULT;
5329722057d41a Andrii Nakryiko 2020-11-09 5605 /* let user-space know about too short buffer */
5329722057d41a Andrii Nakryiko 2020-11-09 5606 ret = -ENOSPC;
5329722057d41a Andrii Nakryiko 2020-11-09 5607 }
5329722057d41a Andrii Nakryiko 2020-11-09 5608 }
5329722057d41a Andrii Nakryiko 2020-11-09 5609
62dab84c81a487 Martin KaFai Lau 2018-05-04 5610 if (copy_to_user(uinfo, &info, info_copy) ||
62dab84c81a487 Martin KaFai Lau 2018-05-04 5611 put_user(info_copy, &uattr->info.info_len))
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5612 return -EFAULT;
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5613
5329722057d41a Andrii Nakryiko 2020-11-09 5614 return ret;
60197cfb6e11ff Martin KaFai Lau 2018-04-18 5615 }
78958fca7ead2f Martin KaFai Lau 2018-05-04 5616
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 4 weeks
[android-common:android12-5.10 1/2] include/trace/hooks/ufshcd.h:22:1: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: cros-kernel-buildreports(a)googlegroups.com
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 98afdd197f900d909be8761c0a8a8b27fc9e434d
commit: e2e063f5074e2e14a96875e5e5670314a41e1c34 [1/2] ANDROID: scsi: ufs: add vendor hook to override key reprogramming
:::::: branch date: 8 weeks ago
:::::: commit date: 8 weeks ago
config: i386-randconfig-s001-20210918 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout e2e063f5074e2e14a96875e5e5670314a41e1c34
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
include/trace/hooks/sched.h:281:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:281:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:281:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:286:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:286:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:286:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:289:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:289:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:289:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:294:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:294:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:294:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:306:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:306:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:306:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:310:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:310:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:310:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:322:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:322:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:322:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:326:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:326:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:326:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:333:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:333:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:333:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:337:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:337:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:337:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:341:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:341:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:341:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:345:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:345:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:345:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:349:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:349:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:349:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:369:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:369:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:369:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:373:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:373:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:373:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/sched.h:377:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/sched.h:377:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/sched.h:377:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/gic_v3.h):
include/trace/hooks/gic_v3.h:18:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/gic_v3.h:18:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/gic_v3.h:18:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/cpufreq.h):
include/trace/hooks/cpufreq.h:14:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/cpufreq.h:14:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/cpufreq.h:14:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/cpufreq.h:31:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/cpufreq.h:31:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/cpufreq.h:31:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/mm.h):
include/trace/hooks/mm.h:19:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:19:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:19:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/mm.h:22:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:22:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:22:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/mm.h:25:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/mm.h:25:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/mm.h:25:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/preemptirq.h):
include/trace/hooks/preemptirq.h:14:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:14:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:14:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:18:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:18:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:18:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:22:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:22:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:22:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/preemptirq.h:26:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/preemptirq.h:26:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/preemptirq.h:26:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/bug.h):
include/trace/hooks/bug.h:14:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/bug.h:14:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/bug.h:14:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/fault.h):
include/trace/hooks/fault.h:15:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:15:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:15:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:19:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:19:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:19:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:23:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:23:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:23:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/fault.h:27:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/fault.h:27:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/fault.h:27:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/ufshcd.h):
>> include/trace/hooks/ufshcd.h:22:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/ufshcd.h:22:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/ufshcd.h:22:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/cgroup.h):
include/trace/hooks/cgroup.h:15:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/cgroup.h:15:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/cgroup.h:15:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/cgroup.h:18:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/cgroup.h:18:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/cgroup.h:18:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/cgroup.h:21:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/cgroup.h:21:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/cgroup.h:21:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/traps.h):
include/trace/hooks/traps.h:15:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/traps.h:15:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/traps.h:15:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/traps.h:20:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/traps.h:20:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/traps.h:20:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/traps.h:24:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/traps.h:24:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/traps.h:24:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/typec.h):
include/trace/hooks/typec.h:32:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/typec.h:32:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/typec.h:32:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/typec.h:43:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/typec.h:43:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/typec.h:43:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/vmscan.h):
include/trace/hooks/vmscan.h:28:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/vmscan.h:28:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/vmscan.h:28:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/v4l2core.h):
include/trace/hooks/v4l2core.h:47:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/v4l2core.h:47:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/v4l2core.h:47:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/v4l2core.h:52:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/v4l2core.h:52:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/v4l2core.h:52:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/v4l2core.h:57:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/v4l2core.h:57:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/v4l2core.h:57:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/v4l2mc.h):
include/trace/hooks/v4l2mc.h:19:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/v4l2mc.h:19:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/v4l2mc.h:19:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
drivers/android/vendor_hooks.c: note: in included file (through include/trace/define_trace.h, include/trace/hooks/net.h):
include/trace/hooks/net.h:23:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/net.h:23:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/net.h:23:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/net.h:25:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tracepoint_func *it_func_ptr @@ got struct tracepoint_func [noderef] __rcu *funcs @@
include/trace/hooks/net.h:25:1: sparse: expected struct tracepoint_func *it_func_ptr
include/trace/hooks/net.h:25:1: sparse: got struct tracepoint_func [noderef] __rcu *funcs
include/trace/hooks/net.h:27:1: sparse: sparse: too many warnings
vim +22 include/trace/hooks/ufshcd.h
1cfa4b71bebe6b1a Eric Biggers 2021-03-01 16
1cfa4b71bebe6b1a Eric Biggers 2021-03-01 17 DECLARE_HOOK(android_vh_ufs_fill_prdt,
1cfa4b71bebe6b1a Eric Biggers 2021-03-01 18 TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp,
1cfa4b71bebe6b1a Eric Biggers 2021-03-01 19 unsigned int segments, int *err),
1cfa4b71bebe6b1a Eric Biggers 2021-03-01 20 TP_ARGS(hba, lrbp, segments, err));
1cfa4b71bebe6b1a Eric Biggers 2021-03-01 21
e2e063f5074e2e14 Eric Biggers 2021-07-26 @22 DECLARE_RESTRICTED_HOOK(android_rvh_ufs_reprogram_all_keys,
e2e063f5074e2e14 Eric Biggers 2021-07-26 23 TP_PROTO(struct ufs_hba *hba, int *err),
e2e063f5074e2e14 Eric Biggers 2021-07-26 24 TP_ARGS(hba, err), 1);
e2e063f5074e2e14 Eric Biggers 2021-07-26 25
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 4 weeks
[ti:ti-rt-linux-5.10.y 3870/9320] drivers/pci/endpoint/pci-epf-core.c:84:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kishon Vijay Abraham I <kishon(a)ti.com>
CC: Vignesh Raghavendra <vigneshr(a)ti.com>
CC: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
CC: Bjorn Helgaas <helgaas(a)kernel.org>
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 716065a9435e7c06986b8497aa853a7b747a9570
commit: 5fe4c2dfaa4e6413f98aedd00c8b2b372e5b0103 [3870/9320] PCI: endpoint: Add support to associate secondary EPC with EPF
:::::: branch date: 4 days ago
:::::: commit date: 6 months ago
config: riscv-randconfig-c006-20210916 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout 5fe4c2dfaa4e6413f98aedd00c8b2b372e5b0103
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:3: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
kernel/bpf/hashtab.c:1313:3: note: Left side of '||' is false
hlist_nulls_for_each_entry_safe(l, n, head, hash_node) {
^
include/linux/rculist_nulls.h:184:13: note: expanded from macro 'hlist_nulls_for_each_entry_safe'
pos = rcu_dereference_raw(hlist_nulls_first_rcu(head)); \
^
include/linux/rcupdate.h:381:25: note: expanded from macro 'rcu_dereference_raw'
typeof(p) ________p1 = READ_ONCE(p); \
^
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:3: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
kernel/bpf/hashtab.c:1313:3: note: Left side of '||' is true
hlist_nulls_for_each_entry_safe(l, n, head, hash_node) {
^
include/linux/rculist_nulls.h:184:13: note: expanded from macro 'hlist_nulls_for_each_entry_safe'
pos = rcu_dereference_raw(hlist_nulls_first_rcu(head)); \
^
include/linux/rcupdate.h:381:25: note: expanded from macro 'rcu_dereference_raw'
typeof(p) ________p1 = READ_ONCE(p); \
^
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:38: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
kernel/bpf/hashtab.c:1313:3: note: Taking false branch
hlist_nulls_for_each_entry_safe(l, n, head, hash_node) {
^
include/linux/rculist_nulls.h:184:13: note: expanded from macro 'hlist_nulls_for_each_entry_safe'
pos = rcu_dereference_raw(hlist_nulls_first_rcu(head)); \
^
include/linux/rcupdate.h:381:25: note: expanded from macro 'rcu_dereference_raw'
typeof(p) ________p1 = READ_ONCE(p); \
^
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:315:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:303:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:295:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
kernel/bpf/hashtab.c:1313:3: note: Loop condition is false. Exiting loop
hlist_nulls_for_each_entry_safe(l, n, head, hash_node) {
^
include/linux/rculist_nulls.h:184:13: note: expanded from macro 'hlist_nulls_for_each_entry_safe'
pos = rcu_dereference_raw(hlist_nulls_first_rcu(head)); \
^
include/linux/rcupdate.h:381:25: note: expanded from macro 'rcu_dereference_raw'
typeof(p) ________p1 = READ_ONCE(p); \
^
include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:315:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:303:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:293:2: note: expanded from macro '__compiletime_assert'
do { \
^
kernel/bpf/hashtab.c:1313:3: note: Use of memory after it is freed
hlist_nulls_for_each_entry_safe(l, n, head, hash_node) {
^
include/linux/rculist_nulls.h:185:5: note: expanded from macro 'hlist_nulls_for_each_entry_safe'
(!is_a_nulls(pos)) && \
^ ~~~
kernel/bpf/hashtab.c:1682:3: warning: Value stored to 'b' is never read [clang-analyzer-deadcode.DeadStores]
b = &htab->buckets[bucket_id++];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/hashtab.c:1682:3: note: Value stored to 'b' is never read
b = &htab->buckets[bucket_id++];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 17 warnings (10 in non-user code, 7 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.
14 warnings generated.
>> drivers/pci/endpoint/pci-epf-core.c:84:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = epf->epc->dev.parent;
^~~ ~~~~~~~~~~~~~~~~~~~~
drivers/pci/endpoint/pci-epf-core.c:84:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = epf->epc->dev.parent;
^~~ ~~~~~~~~~~~~~~~~~~~~
include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '64', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult]
return 1UL << fls_long(n - 1);
^
drivers/pci/endpoint/pci-epf-core.c:130:6: note: Assuming 'size' is >= 128
if (size < 128)
^~~~~~~~~~
drivers/pci/endpoint/pci-epf-core.c:130:2: note: Taking false branch
if (size < 128)
^
drivers/pci/endpoint/pci-epf-core.c:133:6: note: Assuming 'align' is 0
if (align)
^~~~~
drivers/pci/endpoint/pci-epf-core.c:133:2: note: Taking false branch
if (align)
^
drivers/pci/endpoint/pci-epf-core.c:136:10: note: '?' condition is false
size = roundup_pow_of_two(size);
^
include/linux/log2.h:175:2: note: expanded from macro 'roundup_pow_of_two'
__builtin_constant_p(n) ? ( \
^
drivers/pci/endpoint/pci-epf-core.c:136:10: note: Calling '__roundup_pow_of_two'
size = roundup_pow_of_two(size);
^
include/linux/log2.h:179:2: note: expanded from macro 'roundup_pow_of_two'
__roundup_pow_of_two(n) \
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/log2.h:57:16: note: Calling 'fls_long'
return 1UL << fls_long(n - 1);
^~~~~~~~~~~~~~~
include/linux/bitops.h:184:2: note: Taking false branch
if (sizeof(l) == 4)
^
include/linux/bitops.h:186:9: note: Calling 'fls64'
return fls64(l);
^~~~~~~~
include/asm-generic/bitops/fls64.h:29:6: note: 'x' is not equal to 0
if (x == 0)
^
include/asm-generic/bitops/fls64.h:29:2: note: Taking false branch
if (x == 0)
^
include/asm-generic/bitops/fls64.h:31:2: note: Returning the value 64
return __fls(x) + 1;
^~~~~~~~~~~~~~~~~~~
include/linux/bitops.h:186:9: note: Returning from 'fls64'
return fls64(l);
^~~~~~~~
include/linux/bitops.h:186:2: note: Returning the value 64
return fls64(l);
^~~~~~~~~~~~~~~
include/linux/log2.h:57:16: note: Returning from 'fls_long'
return 1UL << fls_long(n - 1);
^~~~~~~~~~~~~~~
include/linux/log2.h:57:13: note: The result of the left shift is undefined due to shifting by '64', which is greater or equal to the width of type 'unsigned long'
return 1UL << fls_long(n - 1);
^ ~~~~~~~~~~~~~~~
Suppressed 12 warnings (5 in non-user code, 7 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.
12 warnings generated.
Suppressed 12 warnings (5 in non-user code, 7 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.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (5 in non-user code, 7 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.
11 warnings generated.
Suppressed 11 warnings (4 in non-user code, 7 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.
5 warnings generated.
Suppressed 5 warnings (5 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.
12 warnings generated.
Suppressed 12 warnings (5 in non-user code, 7 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.
12 warnings generated.
Suppressed 12 warnings (5 in non-user code, 7 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.
13 warnings generated.
drivers/pci/probe.c:1251:3: warning: Value stored to 'broken' is never read [clang-analyzer-deadcode.DeadStores]
broken = 1;
^ ~
drivers/pci/probe.c:1251:3: note: Value stored to 'broken' is never read
broken = 1;
^ ~
Suppressed 12 warnings (5 in non-user code, 7 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.
12 warnings generated.
Suppressed 12 warnings (5 in non-user code, 7 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.
12 warnings generated.
Suppressed 12 warnings (5 in non-user code, 7 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.
vim +/dev +84 drivers/pci/endpoint/pci-epf-core.c
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 71
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 72 /**
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 73 * pci_epf_free_space() - free the allocated PCI EPF register space
9b41d19aff4090 Krzysztof Kozlowski 2020-07-29 74 * @epf: the EPF device from whom to free the memory
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 75 * @addr: the virtual address of the PCI EPF register space
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 76 * @bar: the BAR number corresponding to the register space
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 77 * @type: Identifies if the allocated space is for primary EPC or secondary EPC
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 78 *
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 79 * Invoke to free the allocated PCI EPF register space.
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 80 */
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 81 void pci_epf_free_space(struct pci_epf *epf, void *addr, enum pci_barno bar,
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 82 enum pci_epc_interface_type type)
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 83 {
b330104fa76df3 Kishon Vijay Abraham I 2018-01-11 @84 struct device *dev = epf->epc->dev.parent;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 85 struct pci_epf_bar *epf_bar;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 86 struct pci_epc *epc;
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 87
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 88 if (!addr)
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 89 return;
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 90
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 91 if (type == PRIMARY_INTERFACE) {
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 92 epc = epf->epc;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 93 epf_bar = epf->bar;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 94 } else {
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 95 epc = epf->sec_epc;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 96 epf_bar = epf->sec_epc_bar;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 97 }
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 98
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 99 dev = epc->dev.parent;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 100 dma_free_coherent(dev, epf_bar[bar].size, addr,
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 101 epf_bar[bar].phys_addr);
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 102
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 103 epf_bar[bar].phys_addr = 0;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 104 epf_bar[bar].addr = NULL;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 105 epf_bar[bar].size = 0;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 106 epf_bar[bar].barno = 0;
5fe4c2dfaa4e64 Kishon Vijay Abraham I 2021-03-19 107 epf_bar[bar].flags = 0;
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 108 }
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 109 EXPORT_SYMBOL_GPL(pci_epf_free_space);
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 110
:::::: The code at line 84 was first introduced by commit
:::::: b330104fa76df3eae6e199a23791fed5d35f06b4 PCI: endpoint: Use EPC's device in dma_alloc_coherent()/dma_free_coherent()
:::::: TO: Kishon Vijay Abraham I <kishon(a)ti.com>
:::::: CC: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 4 weeks
[chrome-os:chromeos-5.10 52/68] sound/soc/codecs/rt5682s.c:2297:40: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: cros-kernel-buildreports(a)googlegroups.com
TO: Guenter Roeck <groeck(a)google.com>
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: ac888fed7b09e9df29efffe569f7ee30c4502344
commit: 3325c135c3b981118ca0c7214415d9ae50bac4ca [52/68] FROMGIT: ASoC: rt5682s: Add driver for ALC5682I-VS codec
:::::: branch date: 33 hours ago
:::::: commit date: 2 days ago
compiler: nios2-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> sound/soc/codecs/rt5682s.c:2297:40: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
a_map.m_bp << RT5682S_PLLA_M_BP_SFT |
^
sound/soc/codecs/rt5682s.c:2315:44: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
b_map.sel_ps << RT5682S_PLLB_SEL_PS_SFT |
^
sound/soc/codecs/rt5682s.c:2316:44: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
b_map.byp_ps << RT5682S_PLLB_BYP_PS_SFT |
^
sound/soc/codecs/rt5682s.c:2317:40: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
b_map.m_bp << RT5682S_PLLB_M_BP_SFT |
^
vim +2297 sound/soc/codecs/rt5682s.c
3325c135c3b98111 Derek Fang 2021-08-31 2234
3325c135c3b98111 Derek Fang 2021-08-31 2235 static int rt5682s_set_component_pll(struct snd_soc_component *component,
3325c135c3b98111 Derek Fang 2021-08-31 2236 int pll_id, int source, unsigned int freq_in,
3325c135c3b98111 Derek Fang 2021-08-31 2237 unsigned int freq_out)
3325c135c3b98111 Derek Fang 2021-08-31 2238 {
3325c135c3b98111 Derek Fang 2021-08-31 2239 struct rt5682s_priv *rt5682s = snd_soc_component_get_drvdata(component);
3325c135c3b98111 Derek Fang 2021-08-31 2240 struct pll_calc_map a_map, b_map;
3325c135c3b98111 Derek Fang 2021-08-31 2241
3325c135c3b98111 Derek Fang 2021-08-31 2242 if (source == rt5682s->pll_src[pll_id] && freq_in == rt5682s->pll_in[pll_id] &&
3325c135c3b98111 Derek Fang 2021-08-31 2243 freq_out == rt5682s->pll_out[pll_id])
3325c135c3b98111 Derek Fang 2021-08-31 2244 return 0;
3325c135c3b98111 Derek Fang 2021-08-31 2245
3325c135c3b98111 Derek Fang 2021-08-31 2246 if (!freq_in || !freq_out) {
3325c135c3b98111 Derek Fang 2021-08-31 2247 dev_dbg(component->dev, "PLL disabled\n");
3325c135c3b98111 Derek Fang 2021-08-31 2248 rt5682s->pll_in[pll_id] = 0;
3325c135c3b98111 Derek Fang 2021-08-31 2249 rt5682s->pll_out[pll_id] = 0;
3325c135c3b98111 Derek Fang 2021-08-31 2250 snd_soc_component_update_bits(component, RT5682S_GLB_CLK,
3325c135c3b98111 Derek Fang 2021-08-31 2251 RT5682S_SCLK_SRC_MASK, RT5682S_CLK_SRC_MCLK << RT5682S_SCLK_SRC_SFT);
3325c135c3b98111 Derek Fang 2021-08-31 2252 return 0;
3325c135c3b98111 Derek Fang 2021-08-31 2253 }
3325c135c3b98111 Derek Fang 2021-08-31 2254
3325c135c3b98111 Derek Fang 2021-08-31 2255 switch (source) {
3325c135c3b98111 Derek Fang 2021-08-31 2256 case RT5682S_PLL_S_MCLK:
3325c135c3b98111 Derek Fang 2021-08-31 2257 snd_soc_component_update_bits(component, RT5682S_GLB_CLK,
3325c135c3b98111 Derek Fang 2021-08-31 2258 RT5682S_PLL_SRC_MASK, RT5682S_PLL_SRC_MCLK);
3325c135c3b98111 Derek Fang 2021-08-31 2259 break;
3325c135c3b98111 Derek Fang 2021-08-31 2260 case RT5682S_PLL_S_BCLK1:
3325c135c3b98111 Derek Fang 2021-08-31 2261 snd_soc_component_update_bits(component, RT5682S_GLB_CLK,
3325c135c3b98111 Derek Fang 2021-08-31 2262 RT5682S_PLL_SRC_MASK, RT5682S_PLL_SRC_BCLK1);
3325c135c3b98111 Derek Fang 2021-08-31 2263 break;
3325c135c3b98111 Derek Fang 2021-08-31 2264 default:
3325c135c3b98111 Derek Fang 2021-08-31 2265 dev_err(component->dev, "Unknown PLL Source %d\n", source);
3325c135c3b98111 Derek Fang 2021-08-31 2266 return -EINVAL;
3325c135c3b98111 Derek Fang 2021-08-31 2267 }
3325c135c3b98111 Derek Fang 2021-08-31 2268
3325c135c3b98111 Derek Fang 2021-08-31 2269 rt5682s->pll_comb = find_pll_inter_combination(freq_in, freq_out,
3325c135c3b98111 Derek Fang 2021-08-31 2270 &a_map, &b_map);
3325c135c3b98111 Derek Fang 2021-08-31 2271
3325c135c3b98111 Derek Fang 2021-08-31 2272 if ((pll_id == RT5682S_PLL1 && rt5682s->pll_comb == USE_PLLA) ||
3325c135c3b98111 Derek Fang 2021-08-31 2273 (pll_id == RT5682S_PLL2 && (rt5682s->pll_comb == USE_PLLB ||
3325c135c3b98111 Derek Fang 2021-08-31 2274 rt5682s->pll_comb == USE_PLLAB))) {
3325c135c3b98111 Derek Fang 2021-08-31 2275 dev_dbg(component->dev,
3325c135c3b98111 Derek Fang 2021-08-31 2276 "Supported freq conversion for PLL%d:(%d->%d): %d\n",
3325c135c3b98111 Derek Fang 2021-08-31 2277 pll_id + 1, freq_in, freq_out, rt5682s->pll_comb);
3325c135c3b98111 Derek Fang 2021-08-31 2278 } else {
3325c135c3b98111 Derek Fang 2021-08-31 2279 dev_err(component->dev,
3325c135c3b98111 Derek Fang 2021-08-31 2280 "Unsupported freq conversion for PLL%d:(%d->%d): %d\n",
3325c135c3b98111 Derek Fang 2021-08-31 2281 pll_id + 1, freq_in, freq_out, rt5682s->pll_comb);
3325c135c3b98111 Derek Fang 2021-08-31 2282 return -EINVAL;
3325c135c3b98111 Derek Fang 2021-08-31 2283 }
3325c135c3b98111 Derek Fang 2021-08-31 2284
3325c135c3b98111 Derek Fang 2021-08-31 2285 if (rt5682s->pll_comb == USE_PLLA || rt5682s->pll_comb == USE_PLLAB) {
3325c135c3b98111 Derek Fang 2021-08-31 2286 dev_dbg(component->dev,
3325c135c3b98111 Derek Fang 2021-08-31 2287 "PLLA: fin=%d fout=%d m_bp=%d k_bp=%d m=%d n=%d k=%d\n",
3325c135c3b98111 Derek Fang 2021-08-31 2288 a_map.freq_in, a_map.freq_out, a_map.m_bp, a_map.k_bp,
3325c135c3b98111 Derek Fang 2021-08-31 2289 (a_map.m_bp ? 0 : a_map.m), a_map.n, (a_map.k_bp ? 0 : a_map.k));
3325c135c3b98111 Derek Fang 2021-08-31 2290 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_1,
3325c135c3b98111 Derek Fang 2021-08-31 2291 RT5682S_PLLA_N_MASK, a_map.n);
3325c135c3b98111 Derek Fang 2021-08-31 2292 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_2,
3325c135c3b98111 Derek Fang 2021-08-31 2293 RT5682S_PLLA_M_MASK | RT5682S_PLLA_K_MASK,
3325c135c3b98111 Derek Fang 2021-08-31 2294 a_map.m << RT5682S_PLLA_M_SFT | a_map.k);
3325c135c3b98111 Derek Fang 2021-08-31 2295 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_6,
3325c135c3b98111 Derek Fang 2021-08-31 2296 RT5682S_PLLA_M_BP_MASK | RT5682S_PLLA_K_BP_MASK,
3325c135c3b98111 Derek Fang 2021-08-31 @2297 a_map.m_bp << RT5682S_PLLA_M_BP_SFT |
3325c135c3b98111 Derek Fang 2021-08-31 2298 a_map.k_bp << RT5682S_PLLA_K_BP_SFT);
3325c135c3b98111 Derek Fang 2021-08-31 2299 }
3325c135c3b98111 Derek Fang 2021-08-31 2300
3325c135c3b98111 Derek Fang 2021-08-31 2301 if (rt5682s->pll_comb == USE_PLLB || rt5682s->pll_comb == USE_PLLAB) {
3325c135c3b98111 Derek Fang 2021-08-31 2302 dev_dbg(component->dev,
3325c135c3b98111 Derek Fang 2021-08-31 2303 "PLLB: fin=%d fout=%d m_bp=%d k_bp=%d m=%d n=%d k=%d byp_ps=%d sel_ps=%d\n",
3325c135c3b98111 Derek Fang 2021-08-31 2304 b_map.freq_in, b_map.freq_out, b_map.m_bp, b_map.k_bp,
3325c135c3b98111 Derek Fang 2021-08-31 2305 (b_map.m_bp ? 0 : b_map.m), b_map.n, (b_map.k_bp ? 0 : b_map.k),
3325c135c3b98111 Derek Fang 2021-08-31 2306 b_map.byp_ps, b_map.sel_ps);
3325c135c3b98111 Derek Fang 2021-08-31 2307 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_3,
3325c135c3b98111 Derek Fang 2021-08-31 2308 RT5682S_PLLB_N_MASK, b_map.n);
3325c135c3b98111 Derek Fang 2021-08-31 2309 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_4,
3325c135c3b98111 Derek Fang 2021-08-31 2310 RT5682S_PLLB_M_MASK | RT5682S_PLLB_K_MASK,
3325c135c3b98111 Derek Fang 2021-08-31 2311 b_map.m << RT5682S_PLLB_M_SFT | b_map.k);
3325c135c3b98111 Derek Fang 2021-08-31 2312 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_6,
3325c135c3b98111 Derek Fang 2021-08-31 2313 RT5682S_PLLB_SEL_PS_MASK | RT5682S_PLLB_BYP_PS_MASK |
3325c135c3b98111 Derek Fang 2021-08-31 2314 RT5682S_PLLB_M_BP_MASK | RT5682S_PLLB_K_BP_MASK,
3325c135c3b98111 Derek Fang 2021-08-31 2315 b_map.sel_ps << RT5682S_PLLB_SEL_PS_SFT |
3325c135c3b98111 Derek Fang 2021-08-31 2316 b_map.byp_ps << RT5682S_PLLB_BYP_PS_SFT |
3325c135c3b98111 Derek Fang 2021-08-31 2317 b_map.m_bp << RT5682S_PLLB_M_BP_SFT |
3325c135c3b98111 Derek Fang 2021-08-31 2318 b_map.k_bp << RT5682S_PLLB_K_BP_SFT);
3325c135c3b98111 Derek Fang 2021-08-31 2319 }
3325c135c3b98111 Derek Fang 2021-08-31 2320
3325c135c3b98111 Derek Fang 2021-08-31 2321 if (rt5682s->pll_comb == USE_PLLB)
3325c135c3b98111 Derek Fang 2021-08-31 2322 snd_soc_component_update_bits(component, RT5682S_PLL_CTRL_7,
3325c135c3b98111 Derek Fang 2021-08-31 2323 RT5682S_PLLB_SRC_MASK, RT5682S_PLLB_SRC_DFIN);
3325c135c3b98111 Derek Fang 2021-08-31 2324
3325c135c3b98111 Derek Fang 2021-08-31 2325 rt5682s->pll_in[pll_id] = freq_in;
3325c135c3b98111 Derek Fang 2021-08-31 2326 rt5682s->pll_out[pll_id] = freq_out;
3325c135c3b98111 Derek Fang 2021-08-31 2327 rt5682s->pll_src[pll_id] = source;
3325c135c3b98111 Derek Fang 2021-08-31 2328
3325c135c3b98111 Derek Fang 2021-08-31 2329 return 0;
3325c135c3b98111 Derek Fang 2021-08-31 2330 }
3325c135c3b98111 Derek Fang 2021-08-31 2331
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 4 weeks