ath11k: refactor debugfs code into debugfs.c
authorKalle Valo <kvalo@codeaurora.org>
Wed, 16 Sep 2020 13:55:20 +0000 (16:55 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 22 Sep 2020 07:41:41 +0000 (10:41 +0300)
commitda3a9d3c15769b8a8a4201c5b20074d3bb561fa4
treef2595c9b7d8fd0c9a817e5c4b10bc25e6a85e62a
parent80b892fc8a90e91498babf0f6817139e5ec64b5c
ath11k: refactor debugfs code into debugfs.c

If CONFIG_ATH11K_DEBUGFS is disabled there are warnings debug.c:

drivers/net/wireless/ath/ath11k/debug.c:36:20: warning: 'htt_bp_lmac_ring' defined but not used [-Wunused-variable]
   36 | static const char *htt_bp_lmac_ring[HTT_SW_LMAC_RING_IDX_MAX] = {
      |                    ^~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/debug.c:15:20: warning: 'htt_bp_umac_ring' defined but not used [-Wunused-variable]
   15 | static const char *htt_bp_umac_ring[HTT_SW_UMAC_RING_IDX_MAX] = {
      |                    ^~~~~~~~~~~~~~~~

Fix this by refactoring debugfs code to debugfs.c. This also reduces the number
of ifdefs in debug.c and makes it easier to maintain the code.

No functional changes. Compile tested only.

Reported-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1600264523-12939-1-git-send-email-kvalo@codeaurora.org
drivers/net/wireless/ath/ath11k/Makefile
drivers/net/wireless/ath/ath11k/debug.c
drivers/net/wireless/ath/ath11k/debug.h
drivers/net/wireless/ath/ath11k/debugfs.c [new file with mode: 0644]
drivers/net/wireless/ath/ath11k/debugfs.h [new file with mode: 0644]