Reviewed-by: Ray Ni <ray...@intel.com> > -----Original Message----- > From: Gerd Hoffmann <kra...@redhat.com> > Sent: Monday, March 27, 2023 4:02 PM > To: devel@edk2.groups.io > Cc: Gerd Hoffmann <kra...@redhat.com>; Dong, Eric <eric.d...@intel.com>; > Kumar, Rahul R <rahul.r.ku...@intel.com>; Oliver Steffen > <ostef...@redhat.com>; Pawel Polawski <ppola...@redhat.com>; Ni, Ray > <ray...@intel.com>; Laszlo Ersek <ler...@redhat.com> > Subject: [PATCH v2 1/1] UefiCpuPkg/PiSmmCpuDxeSmm: fix format string > > BufferPages is UINTN, so we need "%Lu" when printing it to avoid > it being truncated. Also cast to UINT64 to make sure it works > for 32bit builds too. > > Fixes: 4f441d024bee ("UefiCpuPkg/PiSmmCpuDxeSmm: fix error handling") > Reported-by: Laszlo Ersek <ler...@redhat.com> > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > --- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c > index cf69161caa4b..c0e368ea9475 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c > @@ -880,7 +880,7 @@ PiCpuSmmEntry ( > BufferPages = EFI_SIZE_TO_PAGES (SIZE_32KB + TileSize * > (mMaxNumberOfCpus - 1)); > Buffer = AllocateAlignedCodePages (BufferPages, SIZE_4KB); > if (Buffer == NULL) { > - DEBUG ((DEBUG_ERROR, "Failed to allocate %d pages.\n", BufferPages)); > + DEBUG ((DEBUG_ERROR, "Failed to allocate %Lu pages.\n", > (UINT64)BufferPages)); > CpuDeadLoop (); > return EFI_OUT_OF_RESOURCES; > } > -- > 2.39.2
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101923): https://edk2.groups.io/g/devel/message/101923 Mute This Topic: https://groups.io/mt/97877303/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-