From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 7DD55D801B3 for ; Tue, 9 Apr 2024 02:12:32 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Syk6guIMLIVLgpbVg9x9EN7dQQhFa0PBwiaGPAi8gIk=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20240206; t=1712628751; v=1; b=kcmf2wVrlJ3dM42rEdxuZyvMvC7vmyn8IXXVj0JiBcOjV7TItx1JA33pK/CEXRBhJ5Q8lllP DKqQgixjUvq88HlU3cWDtp3i9DOGECsuwAIHbI0idASlUEacgsmFhEgZA+HgfWXC/wRHz5kSv8Q SzTCpW6bamg1bVzEU435ehc3+nwpVpeN/e8ZI/FgOTEZL0Vv37+W9zvfdRxC0buNeBPDpPgXaP8 XXq1n+92qcIrOowVBj6Cirhzf/wMtyqWfcV5C9bcSaY4FfVziIY9Qk7jGxLzpZFQwFyKKCmFaER NN7t+gvFHSV/+lHB+3kZWJ5JVTU0XR8gUtFdw+myWJ7rQ== X-Received: by 127.0.0.2 with SMTP id FvTzYY7687511xL2poIp5NkS; Mon, 08 Apr 2024 19:12:31 -0700 X-Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) by mx.groups.io with SMTP id smtpd.web10.126343.1712628750451996324 for ; Mon, 08 Apr 2024 19:12:30 -0700 X-Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-4daab3cf090so2628510e0c.0 for ; Mon, 08 Apr 2024 19:12:30 -0700 (PDT) X-Gm-Message-State: MOiD64QoEVb0bEwEo4jDmIz0x7686176AA= X-Google-Smtp-Source: AGHT+IGTxtn07445wvWmjsSxN6Iyo788Vs48xatYLsdOybqU3AV5uZv0jZOjfI9OEqLh4l3iWuVheEbhvYeafG8AtBQ= X-Received: by 2002:a1f:c904:0:b0:4d4:34b2:9a89 with SMTP id z4-20020a1fc904000000b004d434b29a89mr841449vkf.8.1712628749061; Mon, 08 Apr 2024 19:12:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Pedro Falcato" Date: Tue, 9 Apr 2024 03:12:17 +0100 Message-ID: Subject: Re: [edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function To: Qingyu Cc: devel@edk2.groups.io, Ray Ni , Gahan Saraiya Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 08 Apr 2024 19:12:30 -0700 Resent-From: pedro.falcato@gmail.com Reply-To: devel@edk2.groups.io,pedro.falcato@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=kcmf2wVr; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) On Mon, Apr 8, 2024 at 10:48=E2=80=AFAM Qingyu wro= te: > > Refer to Uefi spec 2.10 section 11.11.2, add a new retval > EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation(). > Reference: [mantis #1866] - GetInfo() of Adapter Information > Protocol should have a provision for IHV to return no data. Let's reword this commit message a bit, shall we? Something like this: Add a new return value EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation(), according to UEFI spec 2.10 section 11.11.2. This brings the documentation up to par with UEFI 2.10. Reference: [mantis #1866] - GetInfo() of Adapter Information Protocol should have a provision for IHV to return no data. I'm not sure about the commit title too, but it's late here and I can't figure out a nice succinct description. Maybe: "OptionRomPkg/UndiRuntimeDxe: Update UndiAipGetInfo's docs to UEFI spec 2.1= 0" > > Cc: Pedro Falcato Why was I CC'd on this? /me is confused > Cc: Ray Ni > Signed-off-by: Qingyu > Signed-off-by: Gahan Saraiya > --- > Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h | 5 ++++- > Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 ++++- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h b/Drivers/Optio= nRomPkg/UndiRuntimeDxe/Undi32.h > index 31c55a8e11..665221e952 100644 > --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h > +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h > @@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UND= I *PxePtr); > > This function returns information of type InformationType from the ada= pter. > If an adapter does not support the requested informational type, then > - EFI_UNSUPPORTED is returned. > + EFI_UNSUPPORTED is returned. If an adapter does not contain Informatio= n for > + the requested InformationType, it fills InformationBlockSize with 0 an= d > + returns EFI_NOT_FOUND. > > @param[in] This A pointer to the EFI_ADAPTER_INFORM= ATION_PROTOCOL instance. > @param[in] InformationType A pointer to an EFI_GUID that defin= es the contents of InformationBlock. > @@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UND= I *PxePtr); > > @retval EFI_SUCCESS The InformationType information was= retrieved. > @retval EFI_UNSUPPORTED The InformationType is not known. > + @retval EFI_NOT_FOUND Information is not available for th= e requested information type. > @retval EFI_DEVICE_ERROR The device reported an error. > @retval EFI_OUT_OF_RESOURCES The request could not be completed = due to a lack of resources. > @retval EFI_INVALID_PARAMETER This is NULL. > diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c b/Drivers/= OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c > index 21151a076f..d80ce65da9 100644 > --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c > +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c > @@ -18,7 +18,9 @@ EFI_GUID mSupportedInfoTypes[] =3D { > > This function returns information of type InformationType from the ada= pter. > If an adapter does not support the requested informational type, then > - EFI_UNSUPPORTED is returned. > + EFI_UNSUPPORTED is returned. If an adapter does not contain Informatio= n for > + the requested InformationType, it fills InformationBlockSize with 0 an= d > + returns EFI_NOT_FOUND. > > @param[in] This A pointer to the EFI_ADAPTER_INFORM= ATION_PROTOCOL instance. > @param[in] InformationType A pointer to an EFI_GUID that defin= es the contents of InformationBlock. > @@ -28,6 +30,7 @@ EFI_GUID mSupportedInfoTypes[] =3D { > > @retval EFI_SUCCESS The InformationType information was= retrieved. > @retval EFI_UNSUPPORTED The InformationType is not known. > + @retval EFI_NOT_FOUND Information is not available for th= e requested information type. > @retval EFI_DEVICE_ERROR The device reported an error. > @retval EFI_OUT_OF_RESOURCES The request could not be completed = due to a lack of resources. > @retval EFI_INVALID_PARAMETER This is NULL. In any case, since I've been meaning to say this for some time: I know this is not your fault (and this is part of some UEFI spec upgrade goal), but changing all of these comments isn't the win you think it is. It's very churny and gains us nothing. The function does not return EFI_NOT_FOUND, so why are we changing its docs? Changing the protocol header's docs is fine (and expected), changing the individual implementations is very... iffy. I'm not a maintainer for this, but if this helps: with the changes above: Acked-by: Pedro Falcato --=20 Pedro -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117517): https://edk2.groups.io/g/devel/message/117517 Mute This Topic: https://groups.io/mt/105398061/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-