Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp843016ybe; Mon, 2 Sep 2019 10:00:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqweSETEhQopIXSs5UgA5FIVNbsWkq9HusbgsK0jO5E/KaSV+UvLAxzAVKJct3oOb6SQKTlb X-Received: by 2002:a17:902:1122:: with SMTP id d31mr31317940pla.254.1567443605285; Mon, 02 Sep 2019 10:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567443605; cv=none; d=google.com; s=arc-20160816; b=MsexotyyUmcpUyWfwhJokEfHSPS58nB9hT6FfwIGvmPMSQSQ2M3fwipTtjZmZWCHjb ZG1xC5RhRWUNlVoq9ZCFYjZXpeZq+E6In5o4N4k8v7vnKeulILl+Sc54Aiutft6LlWpK Ajh4jOs74ZBTUkYC/FxHRQqukov/iSskPiyISxF8esSby6MMHHVCvrFV2Slise035B24 e/c2IVzvPy3Gc2+OjhXUp04//ls9ycLTaVZXdTN6faygbJWqByG8XF9I0NTf6zPw78MO aNzzVcYAffg+fkcdJ+A+7KDdeusHAer3ryC93r0e6Km8w77T4SNPg8ZV0AYUa4GQ9yz8 s9nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=oJKuoxU5eSUldooJbFfaeJ+aojy6A8Sdw5Wn6VneLAk=; b=Qm+5+Yb6ewz+KXxzSPdzzd/1zhsDYROl6OFcvjRegGztH8qRKHt1Vhg3eUxMJ88go0 IFhDyCXl43vzR0DtqyQyZZTngsdDZN0eDnQc1KQw0JkRMJ8OQ/W1xNWDtAnyw7/P4fEu xzii/26ivWgVO5U2uohEtdIEFUPlNbNvhMfWkm15E1KB8UciexT2cloiMHNDPFMO2/9S oUznYTTZSTNeqTcdSAKoBvSZS4QKLBxoWiUbXt559wy/pWYKkfgH0ISaHKKfej6gE5MK f3PJQb57ooSo5/vHORXQbwoIvwaiGZUgtSWa/WsVdc2xNVFZHH3UuLFUacJuoPtTqVZ/ 9VNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pqgruber.com header.s=mail header.b="Gd/onljm"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pqgruber.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20si11761759pgv.580.2019.09.02.09.59.48; Mon, 02 Sep 2019 10:00:05 -0700 (PDT) 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; dkim=pass header.i=@pqgruber.com header.s=mail header.b="Gd/onljm"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pqgruber.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726448AbfIBQ7B (ORCPT + 99 others); Mon, 2 Sep 2019 12:59:01 -0400 Received: from mail.pqgruber.com ([52.59.78.55]:42188 "EHLO mail.pqgruber.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbfIBQ7B (ORCPT ); Mon, 2 Sep 2019 12:59:01 -0400 X-Greylist: delayed 549 seconds by postgrey-1.27 at vger.kernel.org; Mon, 02 Sep 2019 12:59:01 EDT Received: from archibald.tuxnet (213-47-165-233.cable.dynamic.surfer.at [213.47.165.233]) by mail.pqgruber.com (Postfix) with ESMTPSA id A5989C72856; Mon, 2 Sep 2019 18:49:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqgruber.com; s=mail; t=1567442990; bh=oJKuoxU5eSUldooJbFfaeJ+aojy6A8Sdw5Wn6VneLAk=; h=From:To:Cc:Subject:Date:From; b=Gd/onljmlyWrNMZ7HsAz0c7k0fm+4N1i2XEmPvC3ppswLGreJpShCZdzv+uXc4VUe swTrTtMT+KrG7ANA0qWexJZGZ6Hgpin1D/rXeLfUlghQhveDibU/HOftsyuVjf4RAR UDeZ4GOtnuIe742XSrFrRWY2RuOCnmI+hUUCbf6E= From: Clemens Gruber To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Clemens Gruber , Russell King , Mike Rapoport , zhaoyang Subject: [PATCH] arch: arm: reuse addr variable in pfn_valid Date: Mon, 2 Sep 2019 18:46:22 +0200 Message-Id: <20190902164622.18593-1-clemens.gruber@pqgruber.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid calling __pfn_to_phys twice. Cc: Russell King Cc: Mike Rapoport Cc: zhaoyang Signed-off-by: Clemens Gruber --- arch/arm/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 98e17388a563..a5fe2bdc76de 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -179,7 +179,7 @@ int pfn_valid(unsigned long pfn) if (__phys_to_pfn(addr) != pfn) return 0; - return memblock_is_map_memory(__pfn_to_phys(pfn)); + return memblock_is_map_memory(addr); } EXPORT_SYMBOL(pfn_valid); #endif -- 2.23.0