* [PATCH] Bluetooth: btintel_pcie: fix 32-bit warning
@ 2025-02-27 13:21 Arnd Bergmann
2025-02-27 13:45 ` bluez.test.bot
2025-02-27 15:01 ` [PATCH] " Luiz Augusto von Dentz
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2025-02-27 13:21 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, Kiran K, Vijay Satija
Cc: Arnd Bergmann, Devegowda Chandrashekar, Tedd Ho-Jeong An,
Philipp Stanner, linux-bluetooth, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
---
drivers/bluetooth/btintel_pcie.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index cecb926bce1c..e8307eeb971f 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -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;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: Bluetooth: btintel_pcie: fix 32-bit warning
2025-02-27 13:21 [PATCH] Bluetooth: btintel_pcie: fix 32-bit warning Arnd Bergmann
@ 2025-02-27 13:45 ` bluez.test.bot
2025-02-27 15:01 ` [PATCH] " Luiz Augusto von Dentz
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-02-27 13:45 UTC (permalink / raw)
To: linux-bluetooth, arnd
[-- Attachment #1: Type: text/plain, Size: 1948 bytes --]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: fix 32-bit warning
2025-02-27 13:21 [PATCH] Bluetooth: btintel_pcie: fix 32-bit warning Arnd Bergmann
2025-02-27 13:45 ` bluez.test.bot
@ 2025-02-27 15:01 ` Luiz Augusto von Dentz
1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-02-27 15:01 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Marcel Holtmann, Kiran K, Vijay Satija, Arnd Bergmann,
Devegowda Chandrashekar, Tedd Ho-Jeong An, Philipp Stanner,
linux-bluetooth, linux-kernel
Hi Arnd,
On Thu, Feb 27, 2025 at 8:21 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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 <arnd@arndb.de>
> ---
> drivers/bluetooth/btintel_pcie.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
> index cecb926bce1c..e8307eeb971f 100644
> --- a/drivers/bluetooth/btintel_pcie.c
> +++ b/drivers/bluetooth/btintel_pcie.c
> @@ -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.
> db_frag.bufs[i].buf_size = BTINTEL_PCIE_DBGC_BUFFER_SIZE;
> }
>
> --
> 2.39.5
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-27 15:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 13:21 [PATCH] Bluetooth: btintel_pcie: fix 32-bit warning Arnd Bergmann
2025-02-27 13:45 ` bluez.test.bot
2025-02-27 15:01 ` [PATCH] " Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox