Message ID | 20230503-virt-to-pfn-v6-4-rc1-v1-7-6c4698dcf9c8@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 b10csp4311341vqo; Thu, 11 May 2023 05:02:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VNkXsLQlGR68ENh4F6Pl7nPXYZXn4vn5oXQ+9fmJRpIilhofSD5TxI7e8BARb90Wj3df1 X-Received: by 2002:a05:6a00:10d3:b0:641:3ca2:1aec with SMTP id d19-20020a056a0010d300b006413ca21aecmr27552600pfu.27.1683806525542; Thu, 11 May 2023 05:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683806525; cv=none; d=google.com; s=arc-20160816; b=y+tlQmR0pIiNkmKH8La6OxJGs29JsHEB4/dh2H086TNglHBLUDuvARIYt2RR6hJ7AQ IOw/0XWgkPT8t+w5myAWHKIqlXWSWm+NCiPp+gou7GZY3+pvkFz7ryWoRmBtl1GnzGVb 0cpyFDUCPfFZ2xca1DUiCnXw+/XLhsg7p5XhOzBF6KaGB+AJfksAgJjgQ1EEMSkkGoRc YoF51tR0EKFuIlTlUUdq+sY8Z4/LPy2qUXETLH0C3CGVmwDdADjoCEqMw3Ab0nUMVDYO ku4f1hizCNVEzvAV78gD8gWaedcPM+/FFqTNXYDY1SW2JYHGwAUFQp/m/WC+CPyjcuG1 RIMQ== 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=cbjvTSrc7JXib/jYCtsnbT8Pj+twUmj4f7HYrh8lbjo=; b=UZQ2R9+78r4M/CEw5So9N4BNz9gICBBPojkMt4fSkoXrYxXbRTgSfMRfWbT/d2AOdI j1dBMG+LRlqaAGBnVN6TEG8HTO9nYz+f8/pimWL8IFGc9xNHTz2iIzv/R7RRiG2ghld6 TLuJNEQSoQAoE0O11egHxgSI6germ6DPf7g7JxQLYXUwtjDr2knBInaGA9krhb0FKy8/ tfElyajoLibrcHAfl+YsDu3F86kdf1YoLvvafPy/Ja8QPvrWFUCRHncFe2ebZ3kElHxq GtDASpsfGjveg8OGub62GVOFOycQ6JGbeOAAet0vhsMjQ9m4Ls0TiYuiDdyvxUkzCLpe awMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lVyXp4k3; 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 p6-20020a622906000000b006484c433051si3785409pfp.115.2023.05.11.05.01.44; Thu, 11 May 2023 05:02:05 -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=lVyXp4k3; 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 S238018AbjEKMA2 (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Thu, 11 May 2023 08:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237942AbjEKMAC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 11 May 2023 08:00:02 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 217778A54 for <linux-kernel@vger.kernel.org>; Thu, 11 May 2023 04:59:54 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4f004cc54f4so9640095e87.3 for <linux-kernel@vger.kernel.org>; Thu, 11 May 2023 04:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683806393; x=1686398393; 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=cbjvTSrc7JXib/jYCtsnbT8Pj+twUmj4f7HYrh8lbjo=; b=lVyXp4k3KTmo8RdF9FjbrH3Tv6c0bVkXtZywPccWNYeyjQtpi+z8J9YOLY5+sc8Eee 9TxIZcqfBkHZCR5W/lS4SlBkIqbWGSAPlS7Lr3r/I9TrjHIt12ePBNQQByXKE9XA5W82 Lp1d5/+LzKSwENiuYylfIRK6jrTQr4Zv4h1kXRVaE4hxsuTMNFh3hlQ2qHWkX+6kY0EG T5bDIgWzHhDoq1MM/WpZ20V/MaFu2pz8FMs/SVRMPgnQO5dguxAOe06YAfd7vgPdzNUJ UXbg5YSTuY6yxPVV9orezsqTc3SK9pkouhcNBUYohSwcaCiNBsVhx46K7y7sjmIKo1cO FxrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683806393; x=1686398393; 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=cbjvTSrc7JXib/jYCtsnbT8Pj+twUmj4f7HYrh8lbjo=; b=blTgzjhoFAU4WbWGl9P2uk4cTpQNP7Ru5TK0/uNgkKvVgcx72e+7E9usagr85jrU9g 5SAYTX6zTwYwiy3iizdyWTa+NW7d0loLhhepIU+Y+B1B91GhTQS1TFsNX/cbK6ywjBMJ 5cA8SLfvVqmw6nXDmaKIC11Z1ygB7H6EmKhKUc9XDFHnh2DSvLnkNajZlOsJiMFh8N4V 8UTwwD5qe4Z40dnus4EWMjJNFcGNSqLNHsiEaJxGoCq5nEBZV1/I1MwISy4tCSfWoM5A ygJVIPLsjLcqNNilSYZMKOTogSgXeVYn1k3Mwxeijqq4CWjRvvHeedXMj4IYQouzklh3 Hu2A== X-Gm-Message-State: AC+VfDy70QYH3cL63paCpXVll1yFVsJ+rFtjKVMDKh1H34iPGjevoBYB sU92SIKnixwICIvys7/QA2F/kw== X-Received: by 2002:ac2:4f8e:0:b0:4f1:3eea:eaf9 with SMTP id z14-20020ac24f8e000000b004f13eeaeaf9mr2642443lfs.24.1683806393661; Thu, 11 May 2023 04:59:53 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id f16-20020ac25090000000b004cb23904bd9sm1100841lfm.144.2023.05.11.04.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 04:59:53 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> Date: Thu, 11 May 2023 13:59:24 +0200 Subject: [PATCH 07/12] netfs: Pass a pointer to virt_to_page() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230503-virt-to-pfn-v6-4-rc1-v1-7-6c4698dcf9c8@linaro.org> References: <20230503-virt-to-pfn-v6-4-rc1-v1-0-6c4698dcf9c8@linaro.org> In-Reply-To: <20230503-virt-to-pfn-v6-4-rc1-v1-0-6c4698dcf9c8@linaro.org> To: 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-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, samba-technical@lists.samba.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, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1765599111309668780?= X-GMAIL-MSGID: =?utf-8?q?1765599111309668780?= |
Series |
arch: Make virt_to_pfn into a static inline
|
|
Commit Message
Linus Walleij
May 11, 2023, 11:59 a.m. UTC
Like the other calls in this function virt_to_page() expects
a pointer, not an integer.
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 this up with an explicit cast.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
fs/netfs/iterator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/netfs/iterator.c b/fs/netfs/iterator.c index 8a4c86687429..0431ec4a7298 100644 --- a/fs/netfs/iterator.c +++ b/fs/netfs/iterator.c @@ -240,7 +240,7 @@ static ssize_t netfs_extract_kvec_to_sg(struct iov_iter *iter, if (is_vmalloc_or_module_addr((void *)kaddr)) page = vmalloc_to_page((void *)kaddr); else - page = virt_to_page(kaddr); + page = virt_to_page((void *)kaddr); sg_set_page(sg, page, len, off); sgtable->nents++;