wifi: ath12k: hal: convert offset macros to functions
authorKalle Valo <quic_kvalo@quicinc.com>
Tue, 17 Jan 2023 12:03:18 +0000 (14:03 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Wed, 18 Jan 2023 06:36:42 +0000 (08:36 +0200)
commitf8209eef730efbb91afd0b8825ab246c76158868
treeff81378e31ae25526602add5aea3eb6d232d1b46
parent1a8dc2eb5b4e803d4cac74b6603260e6bcbf0c57
wifi: ath12k: hal: convert offset macros to functions

After previous patch checkpatch was giving warnings:

drivers/net/wireless/ath/ath12k/hal.h:158: Macro argument reuse 'ab' - possible side-effects?
drivers/net/wireless/ath/ath12k/hal.h:160: Macro argument reuse 'ab' - possible side-effects?
drivers/net/wireless/ath/ath12k/hal.h:162: Macro argument reuse 'ab' - possible side-effects?
drivers/net/wireless/ath/ath12k/hal.h:164: Macro argument reuse 'ab' - possible side-effects?
drivers/net/wireless/ath/ath12k/hal.h:173: Macro argument reuse 'ab' - possible side-effects?
drivers/net/wireless/ath/ath12k/hal.h:175: Macro argument reuse 'ab' - possible side-effects?
drivers/net/wireless/ath/ath12k/hal.h:177: Macro argument reuse 'ab' - possible side-effects?
drivers/net/wireless/ath/ath12k/hal.h:179: Macro argument reuse 'ab' - possible side-effects?

To fix those convert the macros into functions. As it was difficult to use
struct ath12k_base within hal.h, core.h was already including hal.h so
including back core.h would not work, move the functions also to hal.c.

No functional changes.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20221220120655.19389-3-kvalo@kernel.org
drivers/net/wireless/ath/ath12k/hal.c
drivers/net/wireless/ath/ath12k/hal.h