diff mbox series

Bluetooth: coredump: fix building with coredump disabled

Message ID 20230703113112.380663-1-arnd@kernel.org (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series Bluetooth: coredump: fix building with coredump disabled | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 36 this patch: 36
netdev/cc_maintainers warning 4 maintainers not CCed: matthias.bgg@gmail.com angelogioacchino.delregno@collabora.com linux-mediatek@lists.infradead.org linux-arm-kernel@lists.infradead.org
netdev/build_clang fail Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes fail Problems with Fixes tag: 1
netdev/build_allmodconfig_warn success Errors and warnings before: 36 this patch: 36
netdev/checkpatch warning WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support")' WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 9695ef876fd1 ("Bluetooth: Add support for hci devcoredump")' WARNING: Unknown commit id '872f8c253cb9e', maybe rebased or not pulled?
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Arnd Bergmann July 3, 2023, 11:30 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/net/bluetooth/hci_core.h | 2 --
 1 file changed, 2 deletions(-)

Comments

patchwork-bot+bluetooth@kernel.org July 5, 2023, 11 p.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon,  3 Jul 2023 13:30:48 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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,
>       |                              ^~
> 
> [...]

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!
diff mbox series

Patch

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index c0ca3f869c923..491ab83ccafc9 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -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;