hw/uefi: Create and use trace.h wrapper header
PATCH 1/1 hw/uefi: Create and use trace.h wrapper header
The documentation of the trace subsystem (docs/devel/tracing.rst) says that each subdirectory which uses trace events should create a wrapper trace.h file which includes the trace/trace-foo.h generated header, and that .c files then #include "trace.h".
We didn't follow this pattern in hw/uefi/. Correct this by creating and using the trace.h wrapper header.
--- hw/uefi/trace.h | 2 ++ hw/uefi/var-service-core.c | 2 +- hw/uefi/var-service-policy.c | 2 +- hw/uefi/var-service-utils.c | 2 +- hw/uefi/var-service-vars.c | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 hw/uefi/trace.h
hw/uefi/trace.h new file +2 -0
@@ -0,0 +1,2 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#include "trace/trace-hw_uefi.h"
hw/uefi/var-service-core.c +1 -1
@@ -12,7 +12,7 @@#include "hw/uefi/var-service-api.h" #include "hw/uefi/var-service-edk2.h" -#include "trace/trace-hw_uefi.h" +#include "trace.h" static int uefi_vars_pre_load (void *opaque) {
hw/uefi/var-service-policy.c +1 -1
@@ -14,7 +14,7 @@#include "hw/uefi/var-service-api.h" #include "hw/uefi/var-service-edk2.h" -#include "trace/trace-hw_uefi.h" +#include "trace.h" static void calc_policy (uefi_var_policy *pol);
hw/uefi/var-service-utils.c +1 -1
@@ -8,7 +8,7 @@#include "hw/uefi/var-service.h" -#include "trace/trace-hw_uefi.h" +#include "trace.h" /* ------------------------------------------------------------------ */
hw/uefi/var-service-vars.c +1 -1
@@ -12,7 +12,7 @@#include "hw/uefi/var-service-api.h" #include "hw/uefi/var-service-edk2.h" -#include "trace/trace-hw_uefi.h" +#include "trace.h" #define EFI_VARIABLE_ATTRIBUTE_SUPPORTED \ (EFI_VARIABLE_NON_VOLATILE | \
Signature · 1 line
2.43.0
Quoted 9 lines · Peter Maydell
The documentation of the trace subsystem (
docs/devel/tracing.rst) says that each subdirectory which uses trace events should create a wrappertrace.hfile which includes thetrace/trace-foo.hgenerated header, and that .c files then #include "trace.h".We didn't follow this pattern in hw/uefi/. Correct this by creating and using the
trace.hwrapper header.Signed-off-by Peter Maydell <[email protected]>
Quoted 8 lines
--- hw/uefi/trace.h | 2 ++ hw/uefi/var-service-core.c | 2 +- hw/uefi/var-service-policy.c | 2 +- hw/uefi/var-service-utils.c | 2 +- hw/uefi/var-service-vars.c | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-)create mode 100644
hw/uefi/trace.h