From bb8583d4ceef28c9b593ee237a100c020ef851ff Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 9 Dec 2015 13:26:44 -0800 Subject: [PATCH] qcacld-3.0: Prepare HDD for unified logging Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Due to the large number of changes required, this will have to be done in a phased approach, with conversions occurring one source file at a time. One potential problem that could occur, in the absence of any protection, is that once a particular source file has been converted to the unified set of logging APIs, someone could introduce new code, either as a new feature or as a change propagation from qcacld-2.0, which re-introduces invocations of legacy logging APIs. In order to help prevent this, add conditional compilation to the hddLog() API so that it will not be available to source files which have been converted to the unified set of logging APIs. This will cause a compilation error if hddLog() is called from source files which have been converted. Once all of the source files have been converted, the hddLog() macro itself can be removed from the source code. Change-Id: I5debb0eb9cd89c08fdfcc4fc117776160ed34501 CRs-Fixed: 949529 --- core/hdd/inc/wlan_hdd_main.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 6fefaaf4928f..7a311c2515ef 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -156,8 +156,9 @@ #define WLAN_CHIP_VERSION "WCNSS" +#ifndef HDD_DISALLOW_LEGACY_HDDLOG #define hddLog(level, args ...) CDF_TRACE(CDF_MODULE_ID_HDD, level, ## args) - +#endif #define hdd_log(level, args...) CDF_TRACE(CDF_MODULE_ID_HDD, level, ## args) #define hdd_logfl(level, format, args...) hdd_log(level, FL(format), ## args)