Re: [PATCH edk2-platforms 1/2] Platform/ARM/ArmJunoDxe: make mAcpiRegistration STATIC


Laszlo Ersek
 

On 12/06/19 12:02, Ard Biesheuvel wrote:
Generally, variables should only have external linkage if needed,
so make mAcpiRegistration STATIC, given that static linkage suffices
for it.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index ea7591d70443..c0ad7ced2959 100644
--- a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -64,7 +64,7 @@ STATIC CONST EFI_PCI_ROOT_BRIDGE_DEVICE_PATH mPciRootComplexDevicePath = {
}
};

-EFI_EVENT mAcpiRegistration = NULL;
+STATIC EFI_EVENT mAcpiRegistration = NULL;

/**
This function reads PCI ID of the controller.
The patch does what it says on the tin, so:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

But, this too should have type "VOID *"; so if you have capacity for an
extra patch (or an extra change in this same patch), I'd recommend
fixing up the type.

Related commits (from edk2):

- 10eec5aa9297 ("MdeModulePkg: stop abusing EFI_EVENT for protocol
notify registration", 2019-10-09)

- fcf8bdcd5313 ("SecurityPkg: stop abusing EFI_EVENT for protocol notify
registration", 2019-10-09)

Thanks!
Laszlo

Join devel@edk2.groups.io to automatically receive all group messages.