public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btmtk: Fix function-declaration build error
@ 2024-07-22  6:22 Chris Lu
  2024-07-22  7:03 ` bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Lu @ 2024-07-22  6:22 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Von Dentz
  Cc: Sean Wang, Aaron Hou, Steve Lee, linux-bluetooth, linux-kernel,
	linux-mediatek, Chris Lu

Separate out the declaration of usb related function into another
if/else condition in btmtk.h, avoiding function-declaration issue
happened when CONFIG_BT_HCIBTUSB was defined but CONFIG_BT_HCIBTUSB_MTK
wasn't.

'btmtk_usb_subsys_reset';
ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
'alloc_mtk_intr_urb';
ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
'btmtk_usb_setup';
ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
'btmtk_usb_shutdown';ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration]

Fixes: 52828ea60dfd ("Bluetooth: btmtk: Fix btmtk.c undefined reference build error")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407200904.hRqT3JKD-lkp@intel.com/
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
---
 drivers/bluetooth/btmtk.h | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/bluetooth/btmtk.h b/drivers/bluetooth/btmtk.h
index 6fc69cd8636b..fcc44800cf29 100644
--- a/drivers/bluetooth/btmtk.h
+++ b/drivers/bluetooth/btmtk.h
@@ -201,23 +201,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);
-
-struct urb *alloc_mtk_intr_urb(struct hci_dev *hdev, struct sk_buff *skb,
-			       usb_complete_t tx_complete);
-
-int btmtk_usb_resume(struct hci_dev *hdev);
-
-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,
@@ -259,7 +242,25 @@ static inline void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id,
 					 u32 fw_ver, u32 fw_flavor)
 {
 }
+#endif
+
+/* USB interface related functions */
+#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);
+
+struct urb *alloc_mtk_intr_urb(struct hci_dev *hdev, struct sk_buff *skb,
+			       usb_complete_t tx_complete);
 
+int btmtk_usb_resume(struct hci_dev *hdev);
+
+int btmtk_usb_suspend(struct hci_dev *hdev);
+
+int btmtk_usb_setup(struct hci_dev *hdev);
+
+int btmtk_usb_shutdown(struct hci_dev *hdev);
+#else
 static inline int btmtk_usb_subsys_reset(struct hci_dev *hdev, u32 dev_id)
 {
 	return -EOPNOTSUPP;
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: Bluetooth: btmtk: Fix function-declaration build error
  2024-07-22  6:22 [PATCH] Bluetooth: btmtk: Fix function-declaration build error Chris Lu
@ 2024-07-22  7:03 ` bluez.test.bot
  2024-07-22 14:46   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: bluez.test.bot @ 2024-07-22  7:03 UTC (permalink / raw)
  To: linux-bluetooth, chris.lu

[-- Attachment #1: Type: text/plain, Size: 2314 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=872838

---Test result---

Test Summary:
CheckPatch                    PASS      0.71 seconds
GitLint                       FAIL      0.55 seconds
SubjectPrefix                 PASS      0.14 seconds
BuildKernel                   PASS      29.78 seconds
CheckAllWarning               PASS      32.02 seconds
CheckSparse                   PASS      37.51 seconds
CheckSmatch                   PASS      102.58 seconds
BuildKernel32                 PASS      28.60 seconds
TestRunnerSetup               PASS      524.54 seconds
TestRunner_l2cap-tester       PASS      22.18 seconds
TestRunner_iso-tester         FAIL      41.19 seconds
TestRunner_bnep-tester        PASS      5.28 seconds
TestRunner_mgmt-tester        PASS      114.13 seconds
TestRunner_rfcomm-tester      PASS      7.50 seconds
TestRunner_sco-tester         PASS      15.10 seconds
TestRunner_ioctl-tester       PASS      8.04 seconds
TestRunner_mesh-tester        PASS      6.10 seconds
TestRunner_smp-tester         PASS      7.00 seconds
TestRunner_userchan-tester    PASS      5.03 seconds
IncrementalBuild              PASS      27.61 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
Bluetooth: btmtk: Fix function-declaration build error

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
21: B1 Line exceeds max length (82>80): "Closes: https://lore.kernel.org/oe-kbuild-all/202407200904.hRqT3JKD-lkp@intel.com/"
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 117 (95.9%), Failed: 1, Not Run: 4

Failed Test Cases
ISO Connect Suspend - Success                        Failed       6.215 seconds


---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bluetooth: btmtk: Fix function-declaration build error
  2024-07-22  7:03 ` bluez.test.bot
@ 2024-07-22 14:46   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2024-07-22 14:46 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: chris.lu

Hi Chris,

On Mon, Jul 22, 2024 at 3:03 AM <bluez.test.bot@gmail.com> wrote:
>
> 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=872838

We may have to do this instead:

https://patchwork.kernel.org/project/bluetooth/list/?series=872895

> ---Test result---
>
> Test Summary:
> CheckPatch                    PASS      0.71 seconds
> GitLint                       FAIL      0.55 seconds
> SubjectPrefix                 PASS      0.14 seconds
> BuildKernel                   PASS      29.78 seconds
> CheckAllWarning               PASS      32.02 seconds
> CheckSparse                   PASS      37.51 seconds
> CheckSmatch                   PASS      102.58 seconds
> BuildKernel32                 PASS      28.60 seconds
> TestRunnerSetup               PASS      524.54 seconds
> TestRunner_l2cap-tester       PASS      22.18 seconds
> TestRunner_iso-tester         FAIL      41.19 seconds
> TestRunner_bnep-tester        PASS      5.28 seconds
> TestRunner_mgmt-tester        PASS      114.13 seconds
> TestRunner_rfcomm-tester      PASS      7.50 seconds
> TestRunner_sco-tester         PASS      15.10 seconds
> TestRunner_ioctl-tester       PASS      8.04 seconds
> TestRunner_mesh-tester        PASS      6.10 seconds
> TestRunner_smp-tester         PASS      7.00 seconds
> TestRunner_userchan-tester    PASS      5.03 seconds
> IncrementalBuild              PASS      27.61 seconds
>
> Details
> ##############################
> Test: GitLint - FAIL
> Desc: Run gitlint
> Output:
> Bluetooth: btmtk: Fix function-declaration build error
>
> 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
> 21: B1 Line exceeds max length (82>80): "Closes: https://lore.kernel.org/oe-kbuild-all/202407200904.hRqT3JKD-lkp@intel.com/"
> ##############################
> Test: TestRunner_iso-tester - FAIL
> Desc: Run iso-tester with test-runner
> Output:
> Total: 122, Passed: 117 (95.9%), Failed: 1, Not Run: 4
>
> Failed Test Cases
> ISO Connect Suspend - Success                        Failed       6.215 seconds
>
>
> ---
> Regards,
> Linux Bluetooth
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-22 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22  6:22 [PATCH] Bluetooth: btmtk: Fix function-declaration build error Chris Lu
2024-07-22  7:03 ` bluez.test.bot
2024-07-22 14:46   ` 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