From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02BEDC43331 for ; Mon, 11 Nov 2019 05:13:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C45992075B for ; Mon, 11 Nov 2019 05:13:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726808AbfKKFNo (ORCPT ); Mon, 11 Nov 2019 00:13:44 -0500 Received: from foss.arm.com ([217.140.110.172]:40490 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726770AbfKKFNo (ORCPT ); Mon, 11 Nov 2019 00:13:44 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D890531B; Sun, 10 Nov 2019 21:13:43 -0800 (PST) Received: from p8cg001049571a15.arm.com (unknown [10.163.1.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6F7D93F6C4; Sun, 10 Nov 2019 21:13:39 -0800 (PST) From: Anshuman Khandual To: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org Cc: Anshuman Khandual , Ard Biesheuvel Subject: [PATCH] efi: Fix comment for efi_mem_type() wrt absent physical addresses Date: Mon, 11 Nov 2019 10:43:49 +0530 Message-Id: <1573449229-13918-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org 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 Cc: linux-efi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- 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