Bluetooth: btintel_pcie: fix 32-bit warning
PATCH 1/1 Bluetooth: btintel_pcie: fix 32-bit warning
From: Arnd Bergmann <[email protected]>
The open-coded upper_32_bits() produces a warning when building for 32-bit targets:
drivers/bluetooth/btintel_pcie.c: In function 'btintel_pcie_setup_dbgc':drivers/bluetooth/btintel_pcie.c:142:72: error: right shift count >= width of type [-Werror=shift-count-overflow]
142 | db_frag.bufs[i].buf_addr_msb = (u32)((buf->data_p_addr >> 32) & 0xffffffff);
| ^~
Use the provided upper/lower helpers instead.
--- drivers/bluetooth/btintel_pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/btintel_pcie.c +2 -2
@@ -138,8 +138,8 @@ static int btintel_pcie_setup_dbgc(struct btintel_pcie_data *data) buf = &data->dbgc.bufs[i]; buf->data_p_addr = data->dbgc.buf_p_addr + i *BTINTEL_PCIE_DBGC_BUFFER_SIZE ; buf->data = data->dbgc.buf_v_addr + i *BTINTEL_PCIE_DBGC_BUFFER_SIZE ; - db_frag.bufs[i].buf_addr_lsb = (u32)(buf->data_p_addr &0xffffffff ); - db_frag.bufs[i].buf_addr_msb = (u32)((buf->data_p_addr >>32 ) &0xffffffff ); + db_frag.bufs[i].buf_addr_lsb =lower_32_bits (buf->data_p_addr); + db_frag.bufs[i].buf_addr_msb =upper_32_bits (buf->data_p_addr); db_frag.bufs[i].buf_size =BTINTEL_PCIE_DBGC_BUFFER_SIZE ; }
Signature · 1 line
2.39.5
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=938526
---Test result---
Test Summary:
CheckPatch PENDING 0.35 seconds GitLint PENDING 0.27 seconds SubjectPrefix PASS 0.06 seconds BuildKernel PASS 24.32 seconds CheckAllWarning PASS 26.64 seconds CheckSparse PASS 30.21 seconds BuildKernel32 PASS 23.91 seconds TestRunnerSetup PASS 429.81 seconds TestRunner_l2cap-tester PASS 20.92 seconds TestRunner_iso-tester PASS 31.77 seconds TestRunner_bnep-tester PASS 4.76 seconds TestRunner_mgmt-tester FAIL 121.96 seconds TestRunner_rfcomm-tester PASS 7.90 seconds TestRunner_sco-tester PASS 9.59 seconds TestRunner_ioctl-tester PASS 8.55 seconds TestRunner_mesh-tester PASS 6.13 seconds TestRunner_smp-tester PASS 7.24 seconds TestRunner_userchan-tester PASS 4.92 seconds IncrementalBuild PENDING 0.47 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
LL Privacy - Start Discovery 1 (Disable RL) Failed 0.167 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth
Luiz Augusto von Dentz
maintainerHi Arnd,
Quoted 24 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The open-coded
upper_32_bits()produces a warning when building for 32-bit targets:
drivers/bluetooth/btintel_pcie.c: In function 'btintel_pcie_setup_dbgc':drivers/bluetooth/btintel_pcie.c:142:72: error: right shift count >= width of type [-Werror=shift-count-overflow]
142 | db_frag.bufs[i].buf_addr_msb = (u32)((buf->data_p_addr >> 32) &0xffffffff);
| ^~Use the provided upper/lower helpers instead.
Fixes 3104ae5ad1b7 ("Bluetooth: btintel_pcie: Setup buffers for firmware traces")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/bluetooth/btintel_pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/bluetooth/btintel_pcie.c +0
-0
drivers/bluetooth/btintel_pcie.c static int btintel_pcie_setup_dbgc(struct btintel_pcie_data *data) · line 142
Quoted 7 lines
drivers/bluetooth/btintel_pcie.c +2
-2@@ -138,8 +138,8 @@ static int btintel_pcie_setup_dbgc(struct btintel_pcie_data *data) buf = &data->dbgc.bufs[i]; buf->data_p_addr = data->dbgc.buf_p_addr + i *BTINTEL_PCIE_DBGC_BUFFER_SIZE ; buf->data = data->dbgc.buf_v_addr + i *BTINTEL_PCIE_DBGC_BUFFER_SIZE ; - db_frag.bufs[i].buf_addr_lsb = (u32)(buf->data_p_addr &0xffffffff ); - db_frag.bufs[i].buf_addr_msb = (u32)((buf->data_p_addr >>32 ) &0xffffffff ); + db_frag.bufs[i].buf_addr_lsb =lower_32_bits (buf->data_p_addr); + db_frag.bufs[i].buf_addr_msb =upper_32_bits (buf->data_p_addr);
Great, I was going to ask Kiran to fix these, btw we might just amend the original change but I will keep your Signed-off-by.
Quoted 6 lines
drivers/bluetooth/btintel_pcie.c +0
-1db_frag.bufs[i].buf_size =BTINTEL_PCIE_DBGC_BUFFER_SIZE ; } --2.39.5
Signature · 1 line
Luiz Augusto von Dentz