* [PATCH 1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder
@ 2024-07-22 9:27 Arnd Bergmann
2024-07-22 9:27 ` [PATCH 2/2] Bluetooth: btmtk: remove #ifdef around declarations Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2024-07-22 9:27 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, Chris Lu
Cc: Arnd Bergmann, linux-bluetooth, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The previous fix was incomplete as the link failure still persists
with CONFIG_USB=m when the sdio or serial wrappers for btmtk.c
are build-in:
btmtk.c:(.text+0x468): undefined reference to `usb_alloc_urb'
btmtk.c:(.text+0x488): undefined reference to `usb_free_urb'
btmtk.c:(.text+0x500): undefined reference to `usb_anchor_urb'
btmtk.c:(.text+0x50a): undefined reference to `usb_submit_urb'
btmtk.c:(.text+0x92c): undefined reference to `usb_control_msg'
btmtk.c:(.text+0xa92): undefined reference to `usb_unanchor_urb'
btmtk.c:(.text+0x11e4): undefined reference to `usb_set_interface'
btmtk.c:(.text+0x120a): undefined reference to `usb_kill_anchored_urbs'
Disallow this configuration.
Fixes: 52828ea60dfd ("Bluetooth: btmtk: Fix btmtk.c undefined reference build error")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/bluetooth/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index 44a2de58337b..082698675849 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -413,6 +413,7 @@ config BT_ATH3K
config BT_MTKSDIO
tristate "MediaTek HCI SDIO driver"
depends on MMC
+ depends on USB || !BT_HCIBTUSB_MTK
select BT_MTK
help
MediaTek Bluetooth HCI SDIO driver.
@@ -425,6 +426,7 @@ config BT_MTKSDIO
config BT_MTKUART
tristate "MediaTek HCI UART driver"
depends on SERIAL_DEV_BUS
+ depends on USB || !BT_HCIBTUSB_MTK
select BT_MTK
help
MediaTek Bluetooth HCI UART driver.
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] Bluetooth: btmtk: remove #ifdef around declarations
2024-07-22 9:27 [PATCH 1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder Arnd Bergmann
@ 2024-07-22 9:27 ` Arnd Bergmann
2024-07-22 11:05 ` AngeloGioacchino Del Regno
2024-07-22 9:59 ` [1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder bluez.test.bot
2024-07-22 15:46 ` [PATCH 1/2] " patchwork-bot+bluetooth
2 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2024-07-22 9:27 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, Matthias Brugger,
AngeloGioacchino Del Regno, Chris Lu
Cc: Arnd Bergmann, Sean Wang, Jing Cai, Takashi Iwai, Peter Tsao,
linux-bluetooth, linux-kernel, linux-mediatek
From: Arnd Bergmann <arnd@arndb.de>
The caller of these functions in btusb.c is guarded with an
if(IS_ENABLED()) style check, so dead code is left out, but the
declarations are still needed at compile time:
drivers/bluetooth/btusb.c: In function 'btusb_mtk_reset':
drivers/bluetooth/btusb.c:2705:15: error: implicit declaration of function 'btmtk_usb_subsys_reset' [-Wimplicit-function-declaration]
2705 | err = btmtk_usb_subsys_reset(hdev, btmtk_data->dev_id);
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btusb.c: In function 'btusb_send_frame_mtk':
drivers/bluetooth/btusb.c:2720:23: error: implicit declaration of function 'alloc_mtk_intr_urb' [-Wimplicit-function-declaration]
2720 | urb = alloc_mtk_intr_urb(hdev, skb, btusb_tx_complete);
| ^~~~~~~~~~~~~~~~~~
drivers/bluetooth/btusb.c:2720:21: error: assignment to 'struct urb *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2720 | urb = alloc_mtk_intr_urb(hdev, skb, btusb_tx_complete);
| ^
Fixes: 52828ea60dfd ("Bluetooth: btmtk: Fix btmtk.c undefined reference build error")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/bluetooth/btmtk.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/bluetooth/btmtk.h b/drivers/bluetooth/btmtk.h
index 6fc69cd8636b..5df7c3296624 100644
--- a/drivers/bluetooth/btmtk.h
+++ b/drivers/bluetooth/btmtk.h
@@ -202,7 +202,6 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb);
void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id, u32 fw_ver,
u32 fw_flavor);
-#if IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK)
int btmtk_usb_subsys_reset(struct hci_dev *hdev, u32 dev_id);
int btmtk_usb_recv_acl(struct hci_dev *hdev, struct sk_buff *skb);
@@ -217,7 +216,6 @@ int btmtk_usb_suspend(struct hci_dev *hdev);
int btmtk_usb_setup(struct hci_dev *hdev);
int btmtk_usb_shutdown(struct hci_dev *hdev);
-#endif
#else
static inline int btmtk_set_bdaddr(struct hci_dev *hdev,
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder
2024-07-22 9:27 [PATCH 1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder Arnd Bergmann
2024-07-22 9:27 ` [PATCH 2/2] Bluetooth: btmtk: remove #ifdef around declarations Arnd Bergmann
@ 2024-07-22 9:59 ` bluez.test.bot
2024-07-22 15:46 ` [PATCH 1/2] " patchwork-bot+bluetooth
2 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2024-07-22 9:59 UTC (permalink / raw)
To: linux-bluetooth, arnd
[-- Attachment #1: Type: text/plain, Size: 3228 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=872895
---Test result---
Test Summary:
CheckPatch FAIL 1.37 seconds
GitLint FAIL 0.69 seconds
SubjectPrefix PASS 0.13 seconds
BuildKernel PASS 29.64 seconds
CheckAllWarning PASS 31.93 seconds
CheckSparse PASS 37.56 seconds
CheckSmatch PASS 101.74 seconds
BuildKernel32 PASS 28.62 seconds
TestRunnerSetup PASS 524.61 seconds
TestRunner_l2cap-tester PASS 23.89 seconds
TestRunner_iso-tester PASS 29.11 seconds
TestRunner_bnep-tester PASS 4.84 seconds
TestRunner_mgmt-tester PASS 108.95 seconds
TestRunner_rfcomm-tester PASS 7.44 seconds
TestRunner_sco-tester PASS 15.09 seconds
TestRunner_ioctl-tester PASS 7.88 seconds
TestRunner_mesh-tester PASS 5.97 seconds
TestRunner_smp-tester PASS 6.89 seconds
TestRunner_userchan-tester PASS 4.99 seconds
IncrementalBuild PASS 33.35 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[2/2] Bluetooth: btmtk: remove #ifdef around declarations
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#81:
2720 | urb = alloc_mtk_intr_urb(hdev, skb, btusb_tx_complete);
total: 0 errors, 1 warnings, 14 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/src/13738574.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[2/2] Bluetooth: btmtk: remove #ifdef around declarations
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
10: B1 Line exceeds max length (133>80): "drivers/bluetooth/btusb.c:2705:15: error: implicit declaration of function 'btmtk_usb_subsys_reset' [-Wimplicit-function-declaration]"
14: B1 Line exceeds max length (129>80): "drivers/bluetooth/btusb.c:2720:23: error: implicit declaration of function 'alloc_mtk_intr_urb' [-Wimplicit-function-declaration]"
17: B1 Line exceeds max length (142>80): "drivers/bluetooth/btusb.c:2720:21: error: assignment to 'struct urb *' from 'int' makes pointer from integer without a cast [-Wint-conversion]"
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Bluetooth: btmtk: remove #ifdef around declarations
2024-07-22 9:27 ` [PATCH 2/2] Bluetooth: btmtk: remove #ifdef around declarations Arnd Bergmann
@ 2024-07-22 11:05 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-07-22 11:05 UTC (permalink / raw)
To: Arnd Bergmann, Marcel Holtmann, Luiz Augusto von Dentz,
Matthias Brugger, Chris Lu
Cc: Arnd Bergmann, Sean Wang, Jing Cai, Takashi Iwai, Peter Tsao,
linux-bluetooth, linux-kernel, linux-mediatek
Il 22/07/24 11:27, Arnd Bergmann ha scritto:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The caller of these functions in btusb.c is guarded with an
> if(IS_ENABLED()) style check, so dead code is left out, but the
> declarations are still needed at compile time:
>
> drivers/bluetooth/btusb.c: In function 'btusb_mtk_reset':
> drivers/bluetooth/btusb.c:2705:15: error: implicit declaration of function 'btmtk_usb_subsys_reset' [-Wimplicit-function-declaration]
> 2705 | err = btmtk_usb_subsys_reset(hdev, btmtk_data->dev_id);
> | ^~~~~~~~~~~~~~~~~~~~~~
> drivers/bluetooth/btusb.c: In function 'btusb_send_frame_mtk':
> drivers/bluetooth/btusb.c:2720:23: error: implicit declaration of function 'alloc_mtk_intr_urb' [-Wimplicit-function-declaration]
> 2720 | urb = alloc_mtk_intr_urb(hdev, skb, btusb_tx_complete);
> | ^~~~~~~~~~~~~~~~~~
> drivers/bluetooth/btusb.c:2720:21: error: assignment to 'struct urb *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 2720 | urb = alloc_mtk_intr_urb(hdev, skb, btusb_tx_complete);
> | ^
>
> Fixes: 52828ea60dfd ("Bluetooth: btmtk: Fix btmtk.c undefined reference build error")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder
2024-07-22 9:27 [PATCH 1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder Arnd Bergmann
2024-07-22 9:27 ` [PATCH 2/2] Bluetooth: btmtk: remove #ifdef around declarations Arnd Bergmann
2024-07-22 9:59 ` [1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder bluez.test.bot
@ 2024-07-22 15:46 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2024-07-22 15:46 UTC (permalink / raw)
To: Arnd Bergmann
Cc: marcel, luiz.dentz, chris.lu, arnd, linux-bluetooth, linux-kernel
Hello:
This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 22 Jul 2024 11:27:05 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The previous fix was incomplete as the link failure still persists
> with CONFIG_USB=m when the sdio or serial wrappers for btmtk.c
> are build-in:
>
> btmtk.c:(.text+0x468): undefined reference to `usb_alloc_urb'
> btmtk.c:(.text+0x488): undefined reference to `usb_free_urb'
> btmtk.c:(.text+0x500): undefined reference to `usb_anchor_urb'
> btmtk.c:(.text+0x50a): undefined reference to `usb_submit_urb'
> btmtk.c:(.text+0x92c): undefined reference to `usb_control_msg'
> btmtk.c:(.text+0xa92): undefined reference to `usb_unanchor_urb'
> btmtk.c:(.text+0x11e4): undefined reference to `usb_set_interface'
> btmtk.c:(.text+0x120a): undefined reference to `usb_kill_anchored_urbs'
>
> [...]
Here is the summary with links:
- [1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder
https://git.kernel.org/bluetooth/bluetooth-next/c/0f6bd069a04a
- [2/2] Bluetooth: btmtk: remove #ifdef around declarations
https://git.kernel.org/bluetooth/bluetooth-next/c/3a493d96e81c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-22 15:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 9:27 [PATCH 1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder Arnd Bergmann
2024-07-22 9:27 ` [PATCH 2/2] Bluetooth: btmtk: remove #ifdef around declarations Arnd Bergmann
2024-07-22 11:05 ` AngeloGioacchino Del Regno
2024-07-22 9:59 ` [1/2] Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder bluez.test.bot
2024-07-22 15:46 ` [PATCH 1/2] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox