ArmPkg/GenericWatchdogDxe: clean up the code

Clean up the code, by adding missing STATIC modifiers, drop
redundant casts, and get rid of the 'success handling' anti
pattern in the entry point code.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
Ard Biesheuvel
2018-12-18 14:10:13 +01:00
parent 5afabd5ec3
commit d3b05936d9
2 changed files with 61 additions and 55 deletions

View File

@@ -16,17 +16,16 @@
FILE_GUID = 0619f5c2-4858-4caa-a86a-73a21a18df6b
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = GenericWatchdogEntry
[Sources.common]
GenericWatchdogDxe.c
[Packages]
MdePkg/MdePkg.dec
EmbeddedPkg/EmbeddedPkg.dec
ArmPkg/ArmPkg.dec
ArmPlatformPkg/ArmPlatformPkg.dec
EmbeddedPkg/EmbeddedPkg.dec
MdePkg/MdePkg.dec
[LibraryClasses]
ArmGenericTimerCounterLib
@@ -46,8 +45,8 @@
gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum
[Protocols]
gEfiWatchdogTimerArchProtocolGuid
gHardwareInterrupt2ProtocolGuid
gEfiWatchdogTimerArchProtocolGuid ## ALWAYS_PRODUCES
gHardwareInterrupt2ProtocolGuid ## ALWAYS_CONSUMES
[Depex]
gHardwareInterrupt2ProtocolGuid