2024-05-11 05:26:42

by K, Kiran

[permalink] [raw]
Subject: [PATCH v1 1/2] Bluetooth: btintel_pcie: Fix warning reported by sparse

Fix sparse error.

Fixes: a6c49bbb0b72 ("Bluetooth: btintel_pcie: Add support for PCIe transport")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Kiran K <[email protected]>
---
drivers/bluetooth/btintel_pcie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 2853ab80079d..030a75e5d2a3 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -670,7 +670,7 @@ struct btintel_pcie_causes_list {
u8 cause_num;
};

-struct btintel_pcie_causes_list causes_list[] = {
+static struct btintel_pcie_causes_list causes_list[] = {
{ BTINTEL_PCIE_MSIX_FH_INT_CAUSES_0, BTINTEL_PCIE_CSR_MSIX_FH_INT_MASK, 0x00 },
{ BTINTEL_PCIE_MSIX_FH_INT_CAUSES_1, BTINTEL_PCIE_CSR_MSIX_FH_INT_MASK, 0x01 },
{ BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP0, BTINTEL_PCIE_CSR_MSIX_HW_INT_MASK, 0x20 },
--
2.40.1



2024-05-11 05:26:45

by K, Kiran

[permalink] [raw]
Subject: [PATCH v1 2/2] Bluetooth: btintel_pcie: Refactor and code cleanup

Minor refactor and s/TX_WAIT_TIMEOUT_MS/BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS/g.

Fixes: 8b72a66f8a35 ("Bluetooth: btintel_pcie: Add *setup* function to download firmware")
Signed-off-by: Kiran K <[email protected]>
---
drivers/bluetooth/btintel_pcie.c | 7 +++----
drivers/bluetooth/btintel_pcie.h | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 030a75e5d2a3..5b6805d87fcf 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -151,7 +151,7 @@ static int btintel_pcie_send_sync(struct btintel_pcie_data *data,

/* Wait for the complete interrupt - URBD0 */
ret = wait_event_timeout(data->tx_wait_q, data->tx_wait_done,
- msecs_to_jiffies(TX_WAIT_TIMEOUT_MS));
+ msecs_to_jiffies(BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS));
if (!ret)
return -ETIME;

@@ -1096,10 +1096,9 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
hdev->stat.err_tx++;
bt_dev_err(hdev, "Failed to send frame (%d)", ret);
goto exit_error;
- } else {
- hdev->stat.byte_tx += skb->len;
- kfree_skb(skb);
}
+ hdev->stat.byte_tx += skb->len;
+ kfree_skb(skb);

exit_error:
return ret;
diff --git a/drivers/bluetooth/btintel_pcie.h b/drivers/bluetooth/btintel_pcie.h
index 0e596e094f80..baaff70420f5 100644
--- a/drivers/bluetooth/btintel_pcie.h
+++ b/drivers/bluetooth/btintel_pcie.h
@@ -87,7 +87,7 @@ enum {
/* DMA allocation alignment */
#define BTINTEL_PCIE_DMA_POOL_ALIGNMENT 256

-#define TX_WAIT_TIMEOUT_MS 500
+#define BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS 500

/* Doorbell vector for TFD */
#define BTINTEL_PCIE_TX_DB_VEC 0
--
2.40.1


2024-05-11 05:55:55

by bluez.test.bot

[permalink] [raw]
Subject: RE: [v1,1/2] Bluetooth: btintel_pcie: Fix warning reported by sparse

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=852490

---Test result---

Test Summary:
CheckPatch PASS 1.49 seconds
GitLint FAIL 0.79 seconds
SubjectPrefix PASS 0.25 seconds
BuildKernel PASS 29.59 seconds
CheckAllWarning PASS 32.03 seconds
CheckSparse PASS 37.65 seconds
CheckSmatch FAIL 35.93 seconds
BuildKernel32 PASS 28.40 seconds
TestRunnerSetup PASS 513.42 seconds
TestRunner_l2cap-tester PASS 20.39 seconds
TestRunner_iso-tester PASS 30.83 seconds
TestRunner_bnep-tester PASS 4.70 seconds
TestRunner_mgmt-tester PASS 107.95 seconds
TestRunner_rfcomm-tester PASS 7.24 seconds
TestRunner_sco-tester PASS 14.99 seconds
TestRunner_ioctl-tester PASS 7.61 seconds
TestRunner_mesh-tester PASS 5.74 seconds
TestRunner_smp-tester PASS 6.71 seconds
TestRunner_userchan-tester PASS 4.87 seconds
IncrementalBuild PASS 31.64 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[v1,1/2] Bluetooth: btintel_pcie: Fix warning reported by sparse

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
6: B1 Line exceeds max length (82>80): "Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/"
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bpa10x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bpa10x.o'
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2


---
Regards,
Linux Bluetooth

2024-05-14 14:53:16

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] Bluetooth: btintel_pcie: Fix warning reported by sparse

Hello:

This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Sat, 11 May 2024 11:10:58 +0530 you wrote:
> Fix sparse error.
>
> Fixes: a6c49bbb0b72 ("Bluetooth: btintel_pcie: Add support for PCIe transport")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Kiran K <[email protected]>
>
> [...]

Here is the summary with links:
- [v1,1/2] Bluetooth: btintel_pcie: Fix warning reported by sparse
https://git.kernel.org/bluetooth/bluetooth-next/c/c5cbf4f0271c
- [v1,2/2] Bluetooth: btintel_pcie: Refactor and code cleanup
https://git.kernel.org/bluetooth/bluetooth-next/c/710dfef50bab

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html