linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses
@ 2019-11-11  5:13 Anshuman Khandual
  2019-11-11  5:27 ` Anshuman Khandual
  2020-01-10  6:12 ` Anshuman Khandual
  0 siblings, 2 replies; 5+ messages in thread
From: Anshuman Khandual @ 2019-11-11  5:13 UTC (permalink / raw)
  To: linux-kernel, linux-efi; +Cc: Anshuman Khandual, Ard Biesheuvel

A previous commit f99afd08a45f ("efi: Update efi_mem_type() to return an
error rather than 0") changed the return type from EFI_RESERVED_TYPE to
-EINVAL when the searched physical address is not present in any memory
descriptor. But the comment preceding the function never changed. Lets
change the comment now to reflect the new return type -EINVAL.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-efi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
Changes in V2:

- Changed comment for efi_mem_type() instead of the return type per Ard

V1: (https://lore.kernel.org/patchwork/patch/1149002/)

 drivers/firmware/efi/efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 77ca52d86e30..47b0bf7a2b7f 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -899,7 +899,7 @@ u64 efi_mem_attributes(unsigned long phys_addr)
  *
  * Search in the EFI memory map for the region covering @phys_addr.
  * Returns the EFI memory type if the region was found in the memory
- * map, EFI_RESERVED_TYPE (zero) otherwise.
+ * map, -EINVAL otherwise.
  */
 int efi_mem_type(unsigned long phys_addr)
 {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses
  2019-11-11  5:13 [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses Anshuman Khandual
@ 2019-11-11  5:27 ` Anshuman Khandual
  2019-11-11  9:44   ` Ard Biesheuvel
  2020-01-10  6:12 ` Anshuman Khandual
  1 sibling, 1 reply; 5+ messages in thread
From: Anshuman Khandual @ 2019-11-11  5:27 UTC (permalink / raw)
  To: linux-kernel, linux-efi; +Cc: Ard Biesheuvel

On 11/11/2019 10:43 AM, Anshuman Khandual wrote:
> A previous commit f99afd08a45f ("efi: Update efi_mem_type() to return an
> error rather than 0") changed the return type from EFI_RESERVED_TYPE to
> -EINVAL when the searched physical address is not present in any memory
> descriptor. But the comment preceding the function never changed. Lets
> change the comment now to reflect the new return type -EINVAL.

In the subject line, s/PATCH/PATCH V2/. Not sending yet another patch just
to fix this (in order to reduce spam). But please let me know in case that
will be essential.

> 
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: linux-efi@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> Changes in V2:
> 
> - Changed comment for efi_mem_type() instead of the return type per Ard
> 
> V1: (https://lore.kernel.org/patchwork/patch/1149002/)
> 
>  drivers/firmware/efi/efi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> index 77ca52d86e30..47b0bf7a2b7f 100644
> --- a/drivers/firmware/efi/efi.c
> +++ b/drivers/firmware/efi/efi.c
> @@ -899,7 +899,7 @@ u64 efi_mem_attributes(unsigned long phys_addr)
>   *
>   * Search in the EFI memory map for the region covering @phys_addr.
>   * Returns the EFI memory type if the region was found in the memory
> - * map, EFI_RESERVED_TYPE (zero) otherwise.
> + * map, -EINVAL otherwise.
>   */
>  int efi_mem_type(unsigned long phys_addr)
>  {
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses
  2019-11-11  5:27 ` Anshuman Khandual
@ 2019-11-11  9:44   ` Ard Biesheuvel
  0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2019-11-11  9:44 UTC (permalink / raw)
  To: Anshuman Khandual; +Cc: Linux Kernel Mailing List, linux-efi

On Mon, 11 Nov 2019 at 05:27, Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
>
> On 11/11/2019 10:43 AM, Anshuman Khandual wrote:
> > A previous commit f99afd08a45f ("efi: Update efi_mem_type() to return an
> > error rather than 0") changed the return type from EFI_RESERVED_TYPE to
> > -EINVAL when the searched physical address is not present in any memory
> > descriptor. But the comment preceding the function never changed. Lets
> > change the comment now to reflect the new return type -EINVAL.
>
> In the subject line, s/PATCH/PATCH V2/. Not sending yet another patch just
> to fix this (in order to reduce spam). But please let me know in case that
> will be essential.
>

No worries, I can queue it like this.

Thanks,

> >
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: linux-efi@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> > ---
> > Changes in V2:
> >
> > - Changed comment for efi_mem_type() instead of the return type per Ard
> >
> > V1: (https://lore.kernel.org/patchwork/patch/1149002/)
> >
> >  drivers/firmware/efi/efi.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> > index 77ca52d86e30..47b0bf7a2b7f 100644
> > --- a/drivers/firmware/efi/efi.c
> > +++ b/drivers/firmware/efi/efi.c
> > @@ -899,7 +899,7 @@ u64 efi_mem_attributes(unsigned long phys_addr)
> >   *
> >   * Search in the EFI memory map for the region covering @phys_addr.
> >   * Returns the EFI memory type if the region was found in the memory
> > - * map, EFI_RESERVED_TYPE (zero) otherwise.
> > + * map, -EINVAL otherwise.
> >   */
> >  int efi_mem_type(unsigned long phys_addr)
> >  {
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses
  2019-11-11  5:13 [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses Anshuman Khandual
  2019-11-11  5:27 ` Anshuman Khandual
@ 2020-01-10  6:12 ` Anshuman Khandual
  2020-01-10  6:38   ` Ard Biesheuvel
  1 sibling, 1 reply; 5+ messages in thread
From: Anshuman Khandual @ 2020-01-10  6:12 UTC (permalink / raw)
  To: linux-kernel, linux-efi; +Cc: Ard Biesheuvel



On 11/11/2019 10:43 AM, Anshuman Khandual wrote:
> A previous commit f99afd08a45f ("efi: Update efi_mem_type() to return an
> error rather than 0") changed the return type from EFI_RESERVED_TYPE to
> -EINVAL when the searched physical address is not present in any memory
> descriptor. But the comment preceding the function never changed. Lets
> change the comment now to reflect the new return type -EINVAL.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: linux-efi@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Hello Ard,

Just wondering if this patch is getting pulled. Dont see it either
on linux-next or the following EFI tree.

git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi (efi-next)

- Anshuman

> ---
> Changes in V2:
> 
> - Changed comment for efi_mem_type() instead of the return type per Ard
> 
> V1: (https://lore.kernel.org/patchwork/patch/1149002/)
> 
>  drivers/firmware/efi/efi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> index 77ca52d86e30..47b0bf7a2b7f 100644
> --- a/drivers/firmware/efi/efi.c
> +++ b/drivers/firmware/efi/efi.c
> @@ -899,7 +899,7 @@ u64 efi_mem_attributes(unsigned long phys_addr)
>   *
>   * Search in the EFI memory map for the region covering @phys_addr.
>   * Returns the EFI memory type if the region was found in the memory
> - * map, EFI_RESERVED_TYPE (zero) otherwise.
> + * map, -EINVAL otherwise.
>   */
>  int efi_mem_type(unsigned long phys_addr)
>  {
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses
  2020-01-10  6:12 ` Anshuman Khandual
@ 2020-01-10  6:38   ` Ard Biesheuvel
  0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2020-01-10  6:38 UTC (permalink / raw)
  To: Anshuman Khandual; +Cc: Linux Kernel Mailing List, linux-efi

On Fri, 10 Jan 2020 at 07:11, Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
>
>
>
> On 11/11/2019 10:43 AM, Anshuman Khandual wrote:
> > A previous commit f99afd08a45f ("efi: Update efi_mem_type() to return an
> > error rather than 0") changed the return type from EFI_RESERVED_TYPE to
> > -EINVAL when the searched physical address is not present in any memory
> > descriptor. But the comment preceding the function never changed. Lets
> > change the comment now to reflect the new return type -EINVAL.
> >
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: linux-efi@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
>
> Hello Ard,
>
> Just wondering if this patch is getting pulled. Dont see it either
> on linux-next or the following EFI tree.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi (efi-next)
>

Hi Anshuman,

Thanks for the reminder. It is queued now

-- 
Ard.



>
> > ---
> > Changes in V2:
> >
> > - Changed comment for efi_mem_type() instead of the return type per Ard
> >
> > V1: (https://lore.kernel.org/patchwork/patch/1149002/)
> >
> >  drivers/firmware/efi/efi.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> > index 77ca52d86e30..47b0bf7a2b7f 100644
> > --- a/drivers/firmware/efi/efi.c
> > +++ b/drivers/firmware/efi/efi.c
> > @@ -899,7 +899,7 @@ u64 efi_mem_attributes(unsigned long phys_addr)
> >   *
> >   * Search in the EFI memory map for the region covering @phys_addr.
> >   * Returns the EFI memory type if the region was found in the memory
> > - * map, EFI_RESERVED_TYPE (zero) otherwise.
> > + * map, -EINVAL otherwise.
> >   */
> >  int efi_mem_type(unsigned long phys_addr)
> >  {
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-10  6:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11  5:13 [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses Anshuman Khandual
2019-11-11  5:27 ` Anshuman Khandual
2019-11-11  9:44   ` Ard Biesheuvel
2020-01-10  6:12 ` Anshuman Khandual
2020-01-10  6:38   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).