Reviewed-by: Liming Gao <[email protected]> >-----Original Message----- >From: [email protected] [mailto:[email protected]] On Behalf Of >Zhang, Shenglei >Sent: Monday, September 02, 2019 8:05 PM >To: [email protected] >Cc: Kubacki, Michael A <[email protected]>; Chaganty, Rangasai V ><[email protected]>; Gao, Liming <[email protected]> >Subject: [edk2-devel] [PATCH] AdvancedFeaturePkg/BmcElog: Change >arithmetic logic > >Change the value from "sizeof(UINT8)" to 1 in the arithmetic expression. >The original value added to (UINT8 *)&GetBmcGlobalEnables is >(sizeof(UINT8)*sizeof(UINT8)) which equals to 1, so the functionality >looks right. But the arithmetic logic is actually wrong. > >Cc: Michael Kubacki <[email protected]> >Cc: Sai Chaganty <[email protected]> >Cc: Liming Gao <[email protected]> >Signed-off-by: Shenglei Zhang <[email protected]> >--- > Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c >b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c >index 421fbdec..beaa3fa0 100644 >--- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c >+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c >@@ -131,7 +131,7 @@ Returns: > ElogStat = 1; > } > >- CopyMem (&SetBmcGlobalEnables, (UINT8 *)&GetBmcGlobalEnables + >sizeof(UINT8), sizeof(UINT8)); >+ CopyMem (&SetBmcGlobalEnables, (UINT8 *)&GetBmcGlobalEnables + 1, >sizeof(UINT8)); > SetBmcGlobalEnables.SetEnables.Bits.SystemEventLogging = ElogStat; > > Status = IpmiSetBmcGlobalEnables (&SetBmcGlobalEnables, >&CompletionCode); >-- >2.18.0.windows.1 > > >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47254): https://edk2.groups.io/g/devel/message/47254 Mute This Topic: https://groups.io/mt/33110327/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
