[edk2-devel] [PATCH] MdeModulePkg SdMmcPciHcDxe: SD/MMC capability debug print is incorrect

Ard Biesheuvel ardb at kernel.org
Wed May 17 11:45:53 UTC 2023


On Wed, 17 May 2023 at 06:19, Wu, Hao A <hao.a.wu at intel.com> wrote:
>
> Thanks for the patch, inline comment below:
>
>
> > -----Original Message-----
> > From: Giri Mudusuru <girim at apple.com>
> > Sent: Friday, May 12, 2023 5:55 PM
> > To: devel at edk2.groups.io
> > Cc: Giri Mudusuru <girim at apple.com>; Wu, Hao A <hao.a.wu at intel.com>; Ni,
> > Ray <ray.ni at intel.com>; Wang, Jian J <jian.j.wang at intel.com>; Gao, Liming
> > <gaoliming at byosoft.com.cn>; Andrew Fish <afish at apple.com>
> > Subject: [PATCH] MdeModulePkg SdMmcPciHcDxe: SD/MMC capability debug
> > print is incorrect
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4394
> >
> > Fix DumpCapabilityReg() debug log to print 64 bit capability instead of 32 bit
> > pointer
> >
> > Cc: Hao A Wu <hao.a.wu at intel.com>
> > Cc: Ray Ni <ray.ni at intel.com>
> > Cc: Jian J Wang <jian.j.wang at intel.com>
> > Cc: Liming Gao <gaoliming at byosoft.com.cn>
> > Cc: Andrew Fish <afish at apple.com>
> > Signed-off-by: Giri Mudusuru <girim at apple.com>

Reviewed-by: Ard Biesheuvel <ardb at kernel.org>

> > ---
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
> > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
> > index aab6815328..2e7497a89d 100644
> > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
> > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
> > @@ -30,7 +30,7 @@ DumpCapabilityReg (
> >    //
> >
> >    // Dump Capability Data
> >
> >    //
> >
> > -  DEBUG ((DEBUG_INFO, " == Slot [%d] Capability is 0x%x ==\n", Slot,
> > Capability));
> >
> > +  DEBUG ((DEBUG_INFO, " == Slot [%d] Capability is 0x%llx ==\n", Slot,
> > *(UINT64 *)Capability));
>
>
> Please help to use %p for printing pointers.
>

Why? The point of this patch is that we are not interested in the
pointer, only in the value that it points to.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104973): https://edk2.groups.io/g/devel/message/104973
Mute This Topic: https://groups.io/mt/98846217/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list