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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 DAFD9C33CB0 for ; Mon, 13 Jan 2020 17:23:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7208206DA for ; Mon, 13 Jan 2020 17:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578936231; bh=6I/2D+31V6MW3cEthNUUKIA6MmnULXVS6B/ucqvCFHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZGMm36vsVKKmLcr2vXkvnWDyXWLtZjgLhLvxEwj7nWujq65NB+CcS3mS6MlhHHVaz etE8hAI5JuihbEZuGglaatmOw8XokGcqUTrhvp+Yb24fpig99AUp4WCbxynJn4+J93 H0sCmaJ+zUquTtwo4Dykq0zY/8EKPp6JYQUyYACI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728766AbgAMRXb (ORCPT ); Mon, 13 Jan 2020 12:23:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:42348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728914AbgAMRX1 (ORCPT ); Mon, 13 Jan 2020 12:23:27 -0500 Received: from dogfood.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5A72921556; Mon, 13 Jan 2020 17:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578936207; bh=6I/2D+31V6MW3cEthNUUKIA6MmnULXVS6B/ucqvCFHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1kjSBHC7afRi3ljsNFWH9Z31xZ7fP6FoorHSJMzNfnhUPTQetDtyZTxsNZne2Lko7 Xy9CXgRxCFfYL5jlCgJ5G7hxkfJlXzn16p9TULO8bi1Z14cCu+lcCUd0Aa/CmDYtK/ cRc05611WLiiDCZNMtahE5Vspur3ueuA9kHHBmyc= From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Anshuman Khandual , Arnd Bergmann , Dan Williams , Dave Young , Saravana Kannan Subject: [PATCH 09/13] efi: Fix comment for efi_mem_type() wrt absent physical addresses Date: Mon, 13 Jan 2020 18:22:41 +0100 Message-Id: <20200113172245.27925-10-ardb@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200113172245.27925-1-ardb@kernel.org> References: <20200113172245.27925-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Anshuman Khandual A previous commit f99afd08a45f ("efi: Update efi_mem_type() to return an error rather than 0") changed the return value 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. Let's change the comment now to reflect the new return value -EINVAL. Signed-off-by: Anshuman Khandual Signed-off-by: Ard Biesheuvel --- 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 2b02cb165f16..621220ab3d0e 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -908,7 +908,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