Message ID | 20230503-virt-to-pfn-v6-4-rc1-v1-6-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 b10csp4320040vqo; Thu, 11 May 2023 05:12:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ixNO8UnCZTVA7aIkQFYOW0RTjpaLvZJCbht0wTAhAtXPPPcDNGWkEcjrsrfCL20m7+vV+ X-Received: by 2002:a17:902:f682:b0:1a9:6dfb:4b09 with SMTP id l2-20020a170902f68200b001a96dfb4b09mr24814498plg.67.1683807160905; Thu, 11 May 2023 05:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683807160; cv=none; d=google.com; s=arc-20160816; b=Z6CQnyuU9uUEHcR+DuoK9GAmbQILJM95NoHUvkVCN3HwNZWsclGFGuA+jSyjBCioiz CjwkU7y5bvYp+yDWUv2Eit0yL4hiNKCuqN6BvWQVybyDQFvavn2DYg4opdH8W53POBCL 0t0CIxn8sYpglbjewsX9rmE5GWnqfiTbTl7mag81JtaTtQEgpiWjqTg5p4tbGWkDFWXr kt10/MtmGz5VJbgpKOhVtnUS02rCXJn20z9DsEfMeNIqwzpRarNsGwES4T2I34PZkh8a xGyKk1bZ5AnVyOdndHnC/q1U6aDMRuZop5clRVvqwMGLcxb4y8pRBwvBslegmEOqX5HH nJWA== 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=zblD5qwa4O4tbk0UyG8/FxNMnBSv353Htd3W/ogLXhE=; b=tTqPfvHzDu+fND4h/CgPChAr5SjzEECtHT8VbsPZIPZ6dteoOcKzj5KMUR0QUkxH2r Uv5Z5W06QvNMqaGJjJlfVSlgBjZfv2c9tRC4lsbxpF31tuDjRbYo/kTD6DPDsEy2Owl7 /U0ksczVLrOJ9vXkpKbo3U7XPRgMTM0zCcP/jo45tsaRRTKKOOMfneUM1AzbkaK6QF2i GFQjEdHMeyQrd6PEc/mZS+la1HhrSH1uTtSp977S7uP/BkSf0MVIIijGn0cHLsy0sZtE ZbM1EWYQyHtjOKOYxVkkrxgKv9/8drpiU6O9Y5+FvD7+8EoDyoZQrUEZ7W1Sxy9RhM/p 3klw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wyPzOAzN; 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 x15-20020a170902ec8f00b001ac8daed841si7079201plg.646.2023.05.11.05.12.25; Thu, 11 May 2023 05:12:40 -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=wyPzOAzN; 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 S238026AbjEKMAj (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Thu, 11 May 2023 08:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237947AbjEKMAC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 11 May 2023 08:00:02 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60BFBA248 for <linux-kernel@vger.kernel.org>; Thu, 11 May 2023 04:59:54 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2ac836f4447so86235681fa.2 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=1683806392; x=1686398392; 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=zblD5qwa4O4tbk0UyG8/FxNMnBSv353Htd3W/ogLXhE=; b=wyPzOAzNl7rmMFYBpuSvqF8bhrq6s9qC3HUK0XdF1bjiigB5tF7/avNAx4obqKnEQ1 5XDdVWTgJzXsRWcpD0IeKxuCUkF11nwjWijBb+G6T5OPprRNKDhkDqc9xd5QVgMzyrYY L4pIzqOjfuQxI7o931I1eoHt0E6G0OHcTKzBzLCxA+U45bYiMjQdWdAzAsrvS2ny+0vb k7hlG5IBE0zSUhp1t5xXUTTwH3SO9y19gebdMieRe9lXFfVvvxSdJSGDOae/gEYPgSY9 RwLKQo1r9DKn1ZNPuZYIw5CEheKyIccgqvPNEdgrxsVlTPsrWGQMtl/h5sx8pPqkpO6r g93g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683806392; x=1686398392; 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=zblD5qwa4O4tbk0UyG8/FxNMnBSv353Htd3W/ogLXhE=; b=iy50aCX4FeOV+YPMGB661cvWm49d4ZE2lDlIdXEJY5zNbc8ZlWWAUgBYK3LD98Bx7f mGL9srI0QYoPEa0AE/slfjzpSZuuQSzGCEdYP3YuVaOFDKBgv2FlISonZVorY358uxa0 oFJ8Ayr5qzer1TqvXIOBDoA7kBo2xjfcbRQTIrAl7k1uHCrKA0GRT+vnhA0nDs4X2Oed dyfPvP4gXbgp/ukKjKqnBoyjVEX565HrYKRwI9IPxx4ID5bYLiERSqSH1iA/h7YnqvCJ 35zZFFuOfOgPAXxKa9A/+gRHsZtCQcSivexEeEMgJ/IhOiSEJAI0ze8S2oMnI9TiZeqH bFgw== X-Gm-Message-State: AC+VfDzebwUxNnOknC7oNZF3+OXREQtO+OmCQTdOcvQNFDHK8rru0UMQ Qyd9aEz2CfzZQeXuZNyewjbXHg== X-Received: by 2002:a19:f605:0:b0:4f2:53fb:187 with SMTP id x5-20020a19f605000000b004f253fb0187mr2361851lfe.68.1683806392694; Thu, 11 May 2023 04:59:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 04:59:52 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> Date: Thu, 11 May 2023 13:59:23 +0200 Subject: [PATCH 06/12] cifs: Pass a pointer to virt_to_page() in cifsglob 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-6-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?1765599777594411972?= X-GMAIL-MSGID: =?utf-8?q?1765599777594411972?= |
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/cifs/cifsglob.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 5/11/2023 7:59 AM, Linus Walleij wrote: > 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> For fs/cifs: Acked-by: Tom Talpey <tom@talpey.com> > --- > fs/cifs/cifsglob.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h > index 414685c5d530..3d29a4bbbc40 100644 > --- a/fs/cifs/cifsglob.h > +++ b/fs/cifs/cifsglob.h > @@ -2218,7 +2218,7 @@ static inline void cifs_sg_set_buf(struct sg_table *sgtable, > } while (buflen); > } else { > sg_set_page(&sgtable->sgl[sgtable->nents++], > - virt_to_page(addr), buflen, off); > + virt_to_page((void *)addr), buflen, off); > } > } > >
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 414685c5d530..3d29a4bbbc40 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -2218,7 +2218,7 @@ static inline void cifs_sg_set_buf(struct sg_table *sgtable, } while (buflen); } else { sg_set_page(&sgtable->sgl[sgtable->nents++], - virt_to_page(addr), buflen, off); + virt_to_page((void *)addr), buflen, off); } }