* [PATCH 1/1] UsbBusDxe: fix NOOPT build error @ 2021-12-20 14:32 Gerd Hoffmann 2021-12-21 8:23 ` Wu, Hao A 0 siblings, 1 reply; 3+ messages in thread From: Gerd Hoffmann @ 2021-12-20 14:32 UTC (permalink / raw) To: devel Cc: Hao A Wu, Philippe Mathieu-Daudé, Jian J Wang, Pawel Polawski, Ray Ni, Liming Gao, Gerd Hoffmann gcc-11 (fedora 35): /home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c: In function ‘UsbIoBulkTransfer’: /home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c:277:12: error: ‘UsbHcBulkTransfer’ accessing 80 bytes in a region of size 8 [-Werror=stringop-overflow=] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h index 04cf36d3c860..d93370a6c21e 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h @@ -148,7 +148,7 @@ UsbHcBulkTransfer ( IN UINT8 DevSpeed, IN UINTN MaxPacket, IN UINT8 BufferNum, - IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], + IN OUT VOID *Data[], IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c index 12d08c0b740f..740e7babb0ca 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c @@ -267,7 +267,7 @@ UsbHcBulkTransfer ( IN UINT8 DevSpeed, IN UINTN MaxPacket, IN UINT8 BufferNum, - IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], + IN OUT VOID *Data[], IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, -- 2.33.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] UsbBusDxe: fix NOOPT build error 2021-12-20 14:32 [PATCH 1/1] UsbBusDxe: fix NOOPT build error Gerd Hoffmann @ 2021-12-21 8:23 ` Wu, Hao A 2021-12-23 1:34 ` [edk2-devel] " Wu, Hao A 0 siblings, 1 reply; 3+ messages in thread From: Wu, Hao A @ 2021-12-21 8:23 UTC (permalink / raw) To: Gerd Hoffmann, devel@edk2.groups.io Cc: Philippe Mathieu-Daudé, Wang, Jian J, Pawel Polawski, Ni, Ray, Gao, Liming > -----Original Message----- > From: Gerd Hoffmann <kraxel@redhat.com> > Sent: Monday, December 20, 2021 10:33 PM > To: devel@edk2.groups.io > Cc: Wu, Hao A <hao.a.wu@intel.com>; Philippe Mathieu-Daudé > <philmd@redhat.com>; Wang, Jian J <jian.j.wang@intel.com>; Pawel > Polawski <ppolawsk@redhat.com>; Ni, Ray <ray.ni@intel.com>; Gao, Liming > <gaoliming@byosoft.com.cn>; Gerd Hoffmann <kraxel@redhat.com> > Subject: [PATCH 1/1] UsbBusDxe: fix NOOPT build error Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Will tweak the subject to "MdeModulePkg/UsbBusDxe: fix NOOPT build error" before merging. If concerns, please help to raise. Best Regards, Hao Wu > > gcc-11 (fedora 35): > > /home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus > .c: In function ‘UsbIoBulkTransfer’: > /home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus > .c:277:12: error: ‘UsbHcBulkTransfer’ accessing 80 bytes in a region of size 8 [- > Werror=stringop-overflow=] > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +- > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h > b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h > index 04cf36d3c860..d93370a6c21e 100644 > --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h > +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h > @@ -148,7 +148,7 @@ UsbHcBulkTransfer ( > IN UINT8 DevSpeed, > IN UINTN MaxPacket, > IN UINT8 BufferNum, > - IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], > + IN OUT VOID *Data[], > IN OUT UINTN *DataLength, > IN OUT UINT8 *DataToggle, > IN UINTN TimeOut, > diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c > b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c > index 12d08c0b740f..740e7babb0ca 100644 > --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c > +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c > @@ -267,7 +267,7 @@ UsbHcBulkTransfer ( > IN UINT8 DevSpeed, > IN UINTN MaxPacket, > IN UINT8 BufferNum, > - IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], > + IN OUT VOID *Data[], > IN OUT UINTN *DataLength, > IN OUT UINT8 *DataToggle, > IN UINTN TimeOut, > -- > 2.33.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] UsbBusDxe: fix NOOPT build error 2021-12-21 8:23 ` Wu, Hao A @ 2021-12-23 1:34 ` Wu, Hao A 0 siblings, 0 replies; 3+ messages in thread From: Wu, Hao A @ 2021-12-23 1:34 UTC (permalink / raw) To: devel@edk2.groups.io, Wu, Hao A, Gerd Hoffmann Cc: Philippe Mathieu-Daudé, Wang, Jian J, Pawel Polawski, Ni, Ray, Gao, Liming Pushed via: PR - https://github.com/tianocore/edk2/pull/2347 Commit - https://github.com/tianocore/edk2/commit/ae8272ef787d80950803c521a13a308651bdc62e Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wu, Hao > A > Sent: Tuesday, December 21, 2021 4:24 PM > To: Gerd Hoffmann <kraxel@redhat.com>; devel@edk2.groups.io > Cc: Philippe Mathieu-Daudé <philmd@redhat.com>; Wang, Jian J > <jian.j.wang@intel.com>; Pawel Polawski <ppolawsk@redhat.com>; Ni, Ray > <ray.ni@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn> > Subject: Re: [edk2-devel] [PATCH 1/1] UsbBusDxe: fix NOOPT build error > > > -----Original Message----- > > From: Gerd Hoffmann <kraxel@redhat.com> > > Sent: Monday, December 20, 2021 10:33 PM > > To: devel@edk2.groups.io > > Cc: Wu, Hao A <hao.a.wu@intel.com>; Philippe Mathieu-Daudé > > <philmd@redhat.com>; Wang, Jian J <jian.j.wang@intel.com>; Pawel > > Polawski <ppolawsk@redhat.com>; Ni, Ray <ray.ni@intel.com>; Gao, > Liming > > <gaoliming@byosoft.com.cn>; Gerd Hoffmann <kraxel@redhat.com> > > Subject: [PATCH 1/1] UsbBusDxe: fix NOOPT build error > > > Reviewed-by: Hao A Wu <hao.a.wu@intel.com> > Will tweak the subject to "MdeModulePkg/UsbBusDxe: fix NOOPT build > error" before merging. If concerns, please help to raise. > > Best Regards, > Hao Wu > > > > > > gcc-11 (fedora 35): > > > > > /home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus > > .c: In function ‘UsbIoBulkTransfer’: > > > /home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus > > .c:277:12: error: ‘UsbHcBulkTransfer’ accessing 80 bytes in a region of size 8 > [- > > Werror=stringop-overflow=] > > > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > > --- > > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +- > > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h > > b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h > > index 04cf36d3c860..d93370a6c21e 100644 > > --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h > > +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h > > @@ -148,7 +148,7 @@ UsbHcBulkTransfer ( > > IN UINT8 DevSpeed, > > IN UINTN MaxPacket, > > IN UINT8 BufferNum, > > - IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], > > + IN OUT VOID *Data[], > > IN OUT UINTN *DataLength, > > IN OUT UINT8 *DataToggle, > > IN UINTN TimeOut, > > diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c > > b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c > > index 12d08c0b740f..740e7babb0ca 100644 > > --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c > > +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c > > @@ -267,7 +267,7 @@ UsbHcBulkTransfer ( > > IN UINT8 DevSpeed, > > IN UINTN MaxPacket, > > IN UINT8 BufferNum, > > - IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], > > + IN OUT VOID *Data[], > > IN OUT UINTN *DataLength, > > IN OUT UINT8 *DataToggle, > > IN UINTN TimeOut, > > -- > > 2.33.1 > > > > > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-23 1:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-12-20 14:32 [PATCH 1/1] UsbBusDxe: fix NOOPT build error Gerd Hoffmann 2021-12-21 8:23 ` Wu, Hao A 2021-12-23 1:34 ` [edk2-devel] " Wu, Hao A
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox