Message ID | 20230503-virt-to-pfn-v6-4-rc1-v3-3-a16c19c03583@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2170876vqo; Tue, 23 May 2023 07:08:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49fmI/RDV2dmvo95cMgjJYGvZ8pLuYVNGioSyOCGD4hzXyll6cgxYFR+yRniym/dLi3whh X-Received: by 2002:a17:902:ec8a:b0:1ae:5212:748b with SMTP id x10-20020a170902ec8a00b001ae5212748bmr15369424plg.49.1684850938889; Tue, 23 May 2023 07:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684850938; cv=none; d=google.com; s=arc-20160816; b=iK7Nx+lY8f2cp5BlcoIJ8cxCrBUtiNY+R92/pRjNW2vxMYhLGUYvCMmHCo6+S29VMD UF6rVldJ6LECug/AKiZIrC1tllRu6qsZ/QFMzYe10JoT5vR3dogqc+SvvIJ2ODIC1eGr bzivTg9eHD4DRjBFkdExQFbXjOdi1gZhMdvs4CE3I5MC1nge+ukpFN5iuUFRN+XSxlHw ElLvNyVmo05l5ZONDzNZPr7BpsBs+DYNzaUzfd8Y6CMuXjHn/qeKJc73QdSM+BM5iMTF hehwJ10FJvClMKxnUx2gI+reqG6kxHxMHiwtN7j+U5q07D6xq+ASOpMpUfImjtsqw+bi i+8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=2CPc/Vm/Ur0JOy8kF/L6fs0qWXc+VKBrwCqiZQE3hiQ=; b=MT1tk74HN6fl9gQe7nBAiF/zVfO9gAlctG3h7Y3foqJvC3Tkg8TAWV7GdipFtxnOtt ItPFHdo1kWmC2wk9My6PFl97h2k0ToPDikhxgovAFrR9YYR/VVGZnWWlk78he7RnTkne YNDUsMeg3aG9gTpn9/YSxUN1Gjuz033J2ilj8RK9v5A3ma6ReQVqCim0pvQlMa5etXs8 fw1rhNhnuKgrlqzw+46tRS8x8aLbLImuCK78UDO4axwhSNnhqwUTshdCY16L9hxXW0HF nup0qbwGxIR/0WadU6f0IPVAV0DV2lDaNS0hzCFA0WRufEQbvqGFV/Y3KVEo61Rd9M0H CGfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DHx5ZxV7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a170902ea0c00b001aade54f986si2015710plg.249.2023.05.23.07.08.45; Tue, 23 May 2023 07:08:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DHx5ZxV7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237122AbjEWOHR (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Tue, 23 May 2023 10:07:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237105AbjEWOGv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 23 May 2023 10:06:51 -0400 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BF3BFA for <linux-kernel@vger.kernel.org>; Tue, 23 May 2023 07:06:49 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-4f4b2bc1565so2255528e87.2 for <linux-kernel@vger.kernel.org>; Tue, 23 May 2023 07:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684850748; x=1687442748; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2CPc/Vm/Ur0JOy8kF/L6fs0qWXc+VKBrwCqiZQE3hiQ=; b=DHx5ZxV7p8BhGcgtHBETWYRJd1dP/RkZ+YUCwCVosoC2AbBpe5sHXnMZMwMfxH0y90 XzQe0bQlxKytbPkvQ7V2w5JMdAcALyzlLbnEu6FgCRgXy4OrpPkT/mSWek9ZWrsZAiWH t18h2rnk6uTfqGPlKFgZORYwPzN9BqAyYgP2fxRMHyNsWSDezmeWQlLl3RvNoS0at2N4 zwQ3dB33a/q/dRZ6aJBGgNr9dIXjla+n0UxG3C1sJgM5T6M4GTED+bWcwU/Qj9vEwFAM ENMA+EKO7SMaOA+g+taxuDmYjq5EjwmFMZZGZfVYtGGJEuSMfUR23VvC7Y2vQbS5i/pL sqIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684850748; x=1687442748; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2CPc/Vm/Ur0JOy8kF/L6fs0qWXc+VKBrwCqiZQE3hiQ=; b=b4WcrwPIjoqPo/3V91gHBMK8fd2EIdDiBQDQitFlmCThVMOzK6MNxq6fCIY04v4izO wXGl1o+E3Ip1vsBtYTV2D83ADaQKfsIJSCASkaepZqbjNo7/i5vWSX3+NVKlWwX9XdZX xF49U+XEgh5giKGOZ1NEItXGUFx3/O6wuUyKBWmfuCDtOrlwCpz2CTcZ4W1xN9F23Hw7 A1un6B5k0vAQsdOQfjgW/68u6CH+FBs4jB1AYhHseqfBpoFf8pKWjLxXx+Ur12v8ouPh KmhJ9KhBwW+AtE2q33ADwMgZ/SrLiEdGCUC+8jxHlMuCXg/nGf1A/6+8W86iJIqh7Y3k xq0Q== X-Gm-Message-State: AC+VfDwrcZ7zmzxnZH0/SYP2k+lFdkcorJbr8fQ4srz2u3MklNmfGqNk zJCnRQu/8eOWPyccBxL+HAIG7w== X-Received: by 2002:a05:6512:259:b0:4f0:1124:8b2a with SMTP id b25-20020a056512025900b004f011248b2amr4733118lfo.46.1684850747942; Tue, 23 May 2023 07:05:47 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id h28-20020ac2597c000000b004e9bf853c27sm1346562lfp.70.2023.05.23.07.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 07:05:47 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> Date: Tue, 23 May 2023 16:05:27 +0200 Subject: [PATCH v3 03/12] ARC: init: Pass a pointer to virt_to_pfn() in init MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230503-virt-to-pfn-v6-4-rc1-v3-3-a16c19c03583@linaro.org> References: <20230503-virt-to-pfn-v6-4-rc1-v3-0-a16c19c03583@linaro.org> In-Reply-To: <20230503-virt-to-pfn-v6-4-rc1-v3-0-a16c19c03583@linaro.org> To: Andrew Morton <akpm@linux-foundation.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Vineet Gupta <vgupta@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>, Greg Ungerer <gerg@linux-m68k.org> Cc: linux-mm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-snps-arc@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org> X-Mailer: b4 0.12.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766694257913809762?= X-GMAIL-MSGID: =?utf-8?q?1766694257913809762?= |
Series |
arch: Make virt_to_pfn into a static inline
|
|
Commit Message
Linus Walleij
May 23, 2023, 2:05 p.m. UTC
Functions that work on a pointer to virtual memory such as
virt_to_pfn() and users of that function such as
virt_to_page() are supposed to pass a pointer to virtual
memory, ideally a (void *) or other pointer. However since
many architectures implement virt_to_pfn() as a macro,
this function becomes polymorphic and accepts both a
(unsigned long) and a (void *).
Fix up the offending call in arch/arc with an explicit cast.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arc/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index 2b89b6c53801..9f64d729c9f8 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c @@ -87,7 +87,7 @@ void __init setup_arch_memory(void) setup_initial_init_mm(_text, _etext, _edata, _end); /* first page of system - kernel .vector starts here */ - min_low_pfn = virt_to_pfn(CONFIG_LINUX_RAM_BASE); + min_low_pfn = virt_to_pfn((void *)CONFIG_LINUX_RAM_BASE); /* Last usable page of low mem */ max_low_pfn = max_pfn = PFN_DOWN(low_mem_start + low_mem_sz);