Skip to contentSkip to conversation

Bluetooth: coredump: fix building with coredump disabled

PATCH Applied Arnd Bergmann 3 participants 3 messages Jul 3, 2023 – Jul 5, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: coredump: fix building with coredump disabled

From: Arnd Bergmann <[email protected]>

The btmtk driver uses an IS_ENABLED() check to conditionally compile the coredump support, but this fails to build because the hdev->dump member is in an #ifdef:

drivers/bluetooth/btmtk.c: In function 'btmtk_process_coredump':
drivers/bluetooth/btmtk.c:386:30: error: 'struct hci_dev' has no member named 'dump'
386 | schedule_delayed_work(&hdev->dump.dump_timeout,
| ^~

The struct member doesn't really make a huge difference in the total size, so just remove the #ifdef around it to avoid adding similar checks around each user.

Fixes 872f8c253cb9e ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support")
Fixes 9695ef876fd12 ("Bluetooth: Add support for hci devcoredump")
---
 include/net/bluetooth/hci_core.h | 2 --
 1 file changed, 2 deletions(-)
include/net/bluetooth/hci_core.h +0 -2
index c0ca3f869c923..491ab83ccafc9 100644
@@ -593,9 +593,7 @@ struct hci_dev {
 	const char		*fw_info;
 	struct dentry		*debugfs;
 
-#ifdef CONFIG_DEV_COREDUMP
 	struct hci_devcoredump	dump;
-#endif
 
 	struct device		dev;
 
Signature · 1 line
2.39.2
#1 lore raw

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

---Test result---

Test Summary:

CheckPatch                    FAIL      0.83 seconds
GitLint                       FAIL      0.52 seconds
SubjectPrefix                 PASS      0.07 seconds
BuildKernel                   PASS      32.44 seconds
CheckAllWarning               PASS      35.05 seconds
CheckSparse                   PASS      40.55 seconds
CheckSmatch                   PASS      111.19 seconds
BuildKernel32                 PASS      31.62 seconds
TestRunnerSetup               PASS      447.80 seconds
TestRunner_l2cap-tester       PASS      12.89 seconds
TestRunner_iso-tester         PASS      23.81 seconds
TestRunner_bnep-tester        PASS      5.52 seconds
TestRunner_mgmt-tester        PASS      132.56 seconds
TestRunner_rfcomm-tester      PASS      9.02 seconds
TestRunner_sco-tester         PASS      10.35 seconds
TestRunner_ioctl-tester       PASS      12.04 seconds
TestRunner_mesh-tester        PASS      7.02 seconds
TestRunner_smp-tester         PASS      8.11 seconds
TestRunner_userchan-tester    PASS      5.79 seconds
IncrementalBuild              PASS      30.03 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
Bluetooth: coredump: fix building with coredump disabled
WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support")' #86:

Fixes 872f8c253cb9e ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support")

WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: ("Bluetooth: Add support for hci devcoredump")' #87:

Fixes 9695ef876fd12 ("Bluetooth: Add support for hci devcoredump")

total: 0 errors, 2 warnings, 9 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/13299982.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.

Use of uninitialized value $cid in concatenation (.) or string at /github/workspace/src/src/scripts/checkpatch.pl line 3226. Use of uninitialized value $cid in concatenation (.) or string at /github/workspace/src/src/scripts/checkpatch.pl line 3226.
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
Bluetooth: coredump: fix building with coredump disabled

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 (84>80): "drivers/bluetooth/btmtk.c:386:30: error: 'struct hci_dev' has no member named 'dump'"

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Arnd Bergmann
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

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

Quoted 6 lines · On Mon, 3 Jul 2023 13:30:48 +0200 you wrote:

From: Arnd Bergmann <[email protected]>

The btmtk driver uses an IS_ENABLED() check to conditionally compile the coredump support, but this fails to build because the hdev->dump member is in an #ifdef:

Quoted 6 lines

drivers/bluetooth/btmtk.c: In function 'btmtk_process_coredump':
drivers/bluetooth/btmtk.c:386:30: error: 'struct hci_dev' has no member named 'dump'
386 | schedule_delayed_work(&hdev->dump.dump_timeout,
| ^~

[...]

Here is the summary with links:
- Bluetooth: coredump: fix building with coredump disabled
https://git.kernel.org/bluetooth/bluetooth-next/c/6ca03ff0da3e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html