Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5769663ybx; Sun, 10 Nov 2019 21:15:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwPtSSxhc5WKFERzw7hN/oIjSpj/SSWzJQiZWK513I+N1rzDgcvbHcPhMpw8IJL7kOWS8MM X-Received: by 2002:a17:906:7399:: with SMTP id f25mr21379479ejl.176.1573449347220; Sun, 10 Nov 2019 21:15:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573449347; cv=none; d=google.com; s=arc-20160816; b=cR0KkVPTn9I0C/LuvkhT/JVuB5zRtzkIXOCTzdRGbMlOmMprcPZDyHlPD5xEkhMlma Cs3iIHaS0aYV6y5uoyZ86UJzimFr3fdZ8JTtyXXnHW+ECo8EtAQtz8VtAxY/Dd8whPUS C5Hao4Wrthwxy0u80KatS5/EO0zOrT9/BuOb0xMB4LKs5q2+ASnwFDV/CYnsVR4x1g5Y YE4y3AWn96rwKfX6w0ggSvVsLHnIht65u6OkDrRQu9aAzjBULEQhkPxSwHxP5LMN7oEy regDxE+QjKVf0d+0iQUhNk1W5BXe3e+iv9vDsh0p9rjjSmLHMU6MMfidglor0N708e4G mq7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=kIMNxuUsbhNg62n1Lz3PPpUl8xq8P1NLofMJpik6SuU=; b=WR6SsX4KXIHHLkulxsURwEAtpNq3XjeLnugZQVjut+AL4CRsG1ne4IPzgShCn4WzQV fytw3ng2u5RpyOvy+Zg6rG7TBB6DYpPTyDgvSzNZycSH2n4WM1PQG1J7JUeJq4ShUrfk iG4ujWtaBgweCAto8bptOwSfB7z0B3Wso/I0dx2lP8Cmvo948x5dTxGDbYRI+qrXFBv0 mkAfSjQj4bs0w3MU5YB+gfz7t+o+gJ7vuuW9i5HOsWH+1jQemliWHPKtdmRJxOLL+3xG 0bWsPxNxbYEKBks3UdkUwNm+gmXdl2yv+PEB15OxPQ5ixlYlLtLhtpG0WlPEUGvncPLk CWRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si8562981ejq.153.2019.11.10.21.15.23; Sun, 10 Nov 2019 21:15:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726888AbfKKFNo (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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