On 1/16/24 14:44, Laszlo Ersek wrote: > On 1/15/24 16:59, Gerd Hoffmann wrote: >> Move the DoErase code block into a separate function, call the function >> instead of jumping around with goto. >> >> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> >> --- >> OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c | 76 +++++++++++++++++--------- >> 1 file changed, 51 insertions(+), 25 deletions(-) >> >> diff --git a/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c >> b/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c >> index d80e9f0a2f3a..203bd64f2bdf 100644 >> --- a/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c >> +++ b/OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c >> @@ -502,6 +502,37 @@ NorFlashRead ( >> return EFI_SUCCESS; >> } >> >> +STATIC EFI_STATUS > > (1) EFI_STATUS is not needed (and if it were needed, then we'd put it on > a separate line) > >> +NorFlashWriteSingleBlockWithErase ( >> + IN NOR_FLASH_INSTANCE *Instance, >> + IN EFI_LBA Lba, >> + IN UINTN Offset, >> + IN OUT UINTN *NumBytes, >> + IN UINT8 *Buffer >> + ) >> +{
Sigh. In your patch, I mistook / misread "EFI_STATUS" for "EFIAPI". :/ So, please ignore this; we obviously need the EFI_STATUS return type. ... Perhaps consider breaking "EFI_STATUS" to its own line. (Strange how the brain works; my "mental alarm" about having typed something foolish went off approx. 90 minutes after hitting Send -- while I was running outside. I know that some people get the best programming ideas while showering...) Sorry! Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113909): https://edk2.groups.io/g/devel/message/113909 Mute This Topic: https://groups.io/mt/103741665/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-