Message ID | 20230702202603.3442724-1-trix@redhat.com |
---|---|
State | New |
Headers | show |
Series | Bluetooth: btmtk: fix handling of CONFIG_DEV_COREDUMP not being defined | expand |
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=761864 ---Test result--- Test Summary: CheckPatch PASS 0.67 seconds GitLint FAIL 0.57 seconds SubjectPrefix PASS 0.11 seconds BuildKernel PASS 32.07 seconds CheckAllWarning PASS 34.90 seconds CheckSparse PASS 39.39 seconds CheckSmatch PASS 110.87 seconds BuildKernel32 PASS 30.47 seconds TestRunnerSetup PASS 440.12 seconds TestRunner_l2cap-tester PASS 12.85 seconds TestRunner_iso-tester PASS 23.62 seconds TestRunner_bnep-tester PASS 5.48 seconds TestRunner_mgmt-tester PASS 129.83 seconds TestRunner_rfcomm-tester PASS 8.95 seconds TestRunner_sco-tester PASS 10.41 seconds TestRunner_ioctl-tester PASS 9.70 seconds TestRunner_mesh-tester PASS 7.01 seconds TestRunner_smp-tester PASS 8.15 seconds TestRunner_userchan-tester PASS 5.81 seconds IncrementalBuild PASS 28.73 seconds Details ############################## Test: GitLint - FAIL Desc: Run gitlint Output: Bluetooth: btmtk: fix handling of CONFIG_DEV_COREDUMP not being defined 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 5: B1 Line exceeds max length (84>80): "drivers/bluetooth/btmtk.c:386:44: error: ‘struct hci_dev’ has no member named ‘dump’" --- Regards, Linux Bluetooth
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c index 786f775196ae..12769e95bf55 100644 --- a/drivers/bluetooth/btmtk.c +++ b/drivers/bluetooth/btmtk.c @@ -369,11 +369,9 @@ EXPORT_SYMBOL_GPL(btmtk_register_coredump); int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb) { + int err = 0; +#ifdef CONFIG_DEV_COREDUMP struct btmediatek_data *data = hci_get_priv(hdev); - int err; - - if (!IS_ENABLED(CONFIG_DEV_COREDUMP)) - return 0; switch (data->cd_info.state) { case HCI_DEVCOREDUMP_IDLE: @@ -407,7 +405,7 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb) if (err < 0) kfree_skb(skb); - +#endif return err; } EXPORT_SYMBOL_GPL(btmtk_process_coredump);
When CONFIG_DEV_COREDUMP is not defined, there is this error drivers/bluetooth/btmtk.c: In function ‘btmtk_process_coredump’: drivers/bluetooth/btmtk.c:386:44: error: ‘struct hci_dev’ has no member named ‘dump’ 386 | schedule_delayed_work(&hdev->dump.dump_timeout, | ^~ The runtime IS_ENABLED(CONFIG_DEV_COREDUMP) is not enough to prevent the compiletime error of accessing the dump element of hci_dev. So switch to #ifdef. Fixes: 872f8c253cb9 ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support") Signed-off-by: Tom Rix <trix@redhat.com> --- drivers/bluetooth/btmtk.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)