From: Anshuman Khandual <anshuman.khandual@arm.com>
To: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses
Date: Mon, 11 Nov 2019 10:43:49 +0530 [thread overview]
Message-ID: <1573449229-13918-1-git-send-email-anshuman.khandual@arm.com> (raw)
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
next reply other threads:[~2019-11-11 5:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 5:13 Anshuman Khandual [this message]
2019-11-11 5:27 ` [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses Anshuman Khandual
2019-11-11 9:44 ` Ard Biesheuvel
2020-01-10 6:12 ` Anshuman Khandual
2020-01-10 6:38 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1573449229-13918-1-git-send-email-anshuman.khandual@arm.com \
--to=anshuman.khandual@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox