summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2022-11-08 09:38:58 +0800
committerKalle Valo <kvalo@kernel.org>2022-11-09 08:59:58 +0200
commit525c06c81d75690a9b795cc62a758838c1a6b6fe (patch)
tree5b13f53390fd071df02e4fb0971b7952624d5e0f /tools/perf/scripts/python/export-to-postgresql.py
parentb8f6efccbb9dc0ff5dee7e20d69a4747298ee603 (diff)
wifi: rtw89: use u32_encode_bits() to fill MAC quota value
Coverity reported shift 16 bits could cause sign extension and might get an unexpected value. Since the input values are predefined and no this kind of case, original code is safe so far. But, still changing them to use u32_encode_bits() will be more clear and prevent mistakes in the future. The original message of Coverity is: Suspicious implicit sign extension: "max_cfg->cma0_dma" with type "u16" (16 bits, unsigned) is promoted in "max_cfg->cma0_dma << 16" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "max_cfg->cma0_dma << 16" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1." Reported-by: coverity-bot <keescook+coverity-bot@chromium.org> Addresses-Coverity-ID: 1527095 ("Integer handling issues") Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20221108013858.10806-1-pkshih@realtek.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions