diff mbox series

[2/3] soc: qcom: pmic_pdcharger_ulog: Move TRACE_SYSTEM out of #if protection

Message ID 20231205-pmicpdcharger-ulog-fixups-v1-2-71c95162cb84@redhat.com (mailing list archive)
State Accepted
Commit a74ebfcd60c649f1bff7c369e432c322ae0a0d6a
Headers show
Series soc: qcom: pmic_pdcharger_ulog: Fix compilation | expand

Commit Message

Andrew Halaney Dec. 5, 2023, 11:05 p.m. UTC
As specified in samples/trace_events/trace-events-sample.h:

    * Notice that TRACE_SYSTEM should be defined outside of #if
    * protection, just like TRACE_INCLUDE_FILE.

Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver")
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---
 drivers/soc/qcom/pmic_pdcharger_ulog.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Neil Armstrong Dec. 12, 2023, 3:24 p.m. UTC | #1
On 06/12/2023 00:05, Andrew Halaney wrote:
> As specified in samples/trace_events/trace-events-sample.h:
> 
>      * Notice that TRACE_SYSTEM should be defined outside of #if
>      * protection, just like TRACE_INCLUDE_FILE.
> 
> Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver")
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---
>   drivers/soc/qcom/pmic_pdcharger_ulog.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/qcom/pmic_pdcharger_ulog.h b/drivers/soc/qcom/pmic_pdcharger_ulog.h
> index 9d5d9af4fbe4..152e3a6b5480 100644
> --- a/drivers/soc/qcom/pmic_pdcharger_ulog.h
> +++ b/drivers/soc/qcom/pmic_pdcharger_ulog.h
> @@ -3,14 +3,14 @@
>    * Copyright (c) 2023, Linaro Ltd
>    */
>   
> +#undef TRACE_SYSTEM
> +#define TRACE_SYSTEM pmic_pdcharger_ulog
> +
>   #if !defined(_TRACE_PMIC_PDCHARGER_ULOG_H) || defined(TRACE_HEADER_MULTI_READ)
>   #define _TRACE_PMIC_PDCHARGER_ULOG_H
>   
>   #include <linux/tracepoint.h>
>   
> -#undef TRACE_SYSTEM
> -#define TRACE_SYSTEM pmic_pdcharger_ulog
> -
>   TRACE_EVENT(pmic_pdcharger_ulog_msg,
>   	TP_PROTO(char *msg),
>   	TP_ARGS(msg),
> 

Thanks for fix, it is incredibly hard to understand how to properly implement it...

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff mbox series

Patch

diff --git a/drivers/soc/qcom/pmic_pdcharger_ulog.h b/drivers/soc/qcom/pmic_pdcharger_ulog.h
index 9d5d9af4fbe4..152e3a6b5480 100644
--- a/drivers/soc/qcom/pmic_pdcharger_ulog.h
+++ b/drivers/soc/qcom/pmic_pdcharger_ulog.h
@@ -3,14 +3,14 @@ 
  * Copyright (c) 2023, Linaro Ltd
  */
 
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM pmic_pdcharger_ulog
+
 #if !defined(_TRACE_PMIC_PDCHARGER_ULOG_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_PMIC_PDCHARGER_ULOG_H
 
 #include <linux/tracepoint.h>
 
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM pmic_pdcharger_ulog
-
 TRACE_EVENT(pmic_pdcharger_ulog_msg,
 	TP_PROTO(char *msg),
 	TP_ARGS(msg),