efi: Fix comment for efi_mem_type() wrt absent physical addresses
PATCH 1/1 efi: Fix comment for efi_mem_type() wrt absent physical addresses
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.
---
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(-)
drivers/firmware/efi/efi.c +1 -1
@@ -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) {
Signature · 1 line
2.20.1
Quoted 5 lines · Anshuman Khandual
A previous commit
f99afd08a45f("efi: Updateefi_mem_type()to return an error rather than 0") changed the return type fromEFI_RESERVED_TYPEto-EINVALwhen 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.
Quoted 29 lines
Cc Ard Biesheuvel <[email protected]>Signed-off-by Anshuman Khandual <[email protected]>---
Changes in V2:- Changed comment for
efi_mem_type()instead of the return type per ArdV1: (https://lore.kernel.org/patchwork/patch/1149002/)
drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/efi/efi.c +1
-1@@ -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) {
Quoted 8 lines · Anshuman Khandual
Quoted 5 lines · Anshuman Khandual
A previous commit
f99afd08a45f("efi: Updateefi_mem_type()to return an error rather than 0") changed the return type fromEFI_RESERVED_TYPEto-EINVALwhen 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.
Quoted 4 lines
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,
Quoted 29 lines
Quoted 29 lines
Cc Ard Biesheuvel <[email protected]>Signed-off-by Anshuman Khandual <[email protected]>---
Changes in V2:- Changed comment for
efi_mem_type()instead of the return type per ArdV1: (https://lore.kernel.org/patchwork/patch/1149002/)
drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/efi/efi.c +1
-1@@ -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) {
Quoted 10 lines · Anshuman Khandual
A previous commit
f99afd08a45f("efi: Updateefi_mem_type()to return an error rather than 0") changed the return type fromEFI_RESERVED_TYPEto-EINVALwhen 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 <[email protected]>Signed-off-by Anshuman Khandual <[email protected]>
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
Quoted 24 lines
---
Changes in V2:- Changed comment for
efi_mem_type()instead of the return type per ArdV1: (https://lore.kernel.org/patchwork/patch/1149002/)
drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/efi/efi.c +1
-1@@ -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) {
Quoted 15 lines · Anshuman Khandual
Quoted 10 lines · Anshuman Khandual
A previous commit
f99afd08a45f("efi: Updateefi_mem_type()to return an error rather than 0") changed the return type fromEFI_RESERVED_TYPEto-EINVALwhen 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 <[email protected]>Signed-off-by Anshuman Khandual <[email protected]>
Quoted 7 lines
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
Signature · 1 line
Ard.
Quoted 25 lines
Quoted 25 lines
---
Changes in V2:- Changed comment for
efi_mem_type()instead of the return type per ArdV1: (https://lore.kernel.org/patchwork/patch/1149002/)
drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/efi/efi.c +1
-1@@ -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) {