The RealTimeClockLib class header in edk2 mistakenly declares a function called LibRtcVirtualNotifyEvent(). No component ever calls this function crossing module boundaries; all RealTimeClockLib instances in edk2 and edk2-platforms are supposed to register (and do register) their SetVirtualAddressMap() notification functions.
In particular, RX8900RealTimeClockLib *itself* doesn't even use LibRtcVirtualNotifyEvent() -- the function is defined with an empty body, clearly in an understandable, but misguided, attempt, to conform to the (bogus) library interface. Remove the function. Note that this patch is *untestable* in edk2-platforms (and in edk2-non-osi too), because no platform consumes RX8900RealTimeClockLib -- worse, there hasn't been a single consumer since the introduction of the lib instance in commit de704335c47f ("Silicon/Hisilicon: Add RX8900RealTimeClockLib", 2020-05-20). Normally this would nominate RX8900RealTimeClockLib to the axe, but commit de704335c47f said, "There are some boards base on D06, but use RX8900 RTC, so upstream the RX8900RealTimeClockLib", so I guess there might be out-of-tree / proprietary consumers. Quite unfortunate. Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org> Cc: Leif Lindholm <quic_llind...@quicinc.com> Cc: Wenyi Xie <xiewen...@huawei.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <ler...@redhat.com> --- Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c b/Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c index b6c9e6769fce..ea41202fc72a 100644 --- a/Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c +++ b/Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c @@ -455,14 +455,3 @@ LibRtcInitialize ( return Status; } - - -VOID -EFIAPI -LibRtcVirtualNotifyEvent ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - return; -} -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109549): https://edk2.groups.io/g/devel/message/109549 Mute This Topic: https://groups.io/mt/101914658/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-