Message ID | 20230503-virt-to-pfn-v6-4-rc1-v2-5-0948d38bddab@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 b10csp1261317vqo; Mon, 22 May 2023 00:15:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7LzMICKjX+XiCWWyTlgCH5pc6S1CRZAtga/arrp9Im9hnfHD+CVfMjkSY2NaCTY34iytZq X-Received: by 2002:a17:90a:df82:b0:252:a0dc:7950 with SMTP id p2-20020a17090adf8200b00252a0dc7950mr9462572pjv.2.1684739740965; Mon, 22 May 2023 00:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684739740; cv=none; d=google.com; s=arc-20160816; b=aAAmvFUeQZyWdFBMW56y2zKaycje3ImPO8SE3hBhRmYLeTATyRMge3JDX4Y4r1iPzZ +Y5vGftQrEYQ0L4uVzILNOu6NX0JCJPe9PZ2UmZSG0j+pcSlBQCfztjm9N4b6nsV/Kct Ok545AX8ohOGB56fEChZDKHRn3bvRz1iWcDfOjd8NrAvNsMHr2SDKsoOreEG4M8p3zbP 15Yzp1sIovND9gwjAwhBLFDGIwicq41o2YIvXYugfnvDf8Z5lHngNT9C5PvwNI3dqu8w RzPxe+fPSJ7QRYqsXTMryuoZ5tPANQPUKl0BNihubLw+3ReOAnOQXHGJ2gaaqrha+Qpv mKQw== 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=b/3885L94lN4KFkmIG4KL0Z1VLtyVywWWWjhcZ8AdCI=; b=v57yHiSOeXrLzZtVyOyhpP/3GJQ+wQ2bh6boPJ98j1duff0Ry0MfgCN2cGio2hppuy loZN8J3RFiTBODEW9i1NC05PVdiDH4TgexnhMNbxOOT1eMNeY58jmgpse5P2pqewNVMn ZUmTXQ3DCNTyDVs32k3tfieyRLPTV0qBOGi7WwLeqAimWrMoZhpbg9lVNTfN6bUxewzy 1Vjn3ydNwNHJ4PJo0TpE2nmh9Xi3VHM8pX0iI1sIIMKCEHGPoW0ciBgjGWsyRcfXhEOU w6J5XsH1RTw6vJvLbzqjsP9wujPVHFktUTeHrDO4Kx1zkpam0IArkb6naYXV6sbG1DWb QLog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=msJmmXil; 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 go11-20020a17090b03cb00b002506da491casi6309592pjb.72.2023.05.22.00.15.26; Mon, 22 May 2023 00:15: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=msJmmXil; 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 S232254AbjEVHBc (ORCPT <rfc822;cscallsign@gmail.com> + 99 others); Mon, 22 May 2023 03:01:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232040AbjEVHAv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 22 May 2023 03:00:51 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD73A132 for <linux-kernel@vger.kernel.org>; Mon, 22 May 2023 00:00:45 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2af1a7d2f6aso48823011fa.1 for <linux-kernel@vger.kernel.org>; Mon, 22 May 2023 00:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684738843; x=1687330843; 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=b/3885L94lN4KFkmIG4KL0Z1VLtyVywWWWjhcZ8AdCI=; b=msJmmXilknfX0gustXHQKSFGoGGpP7zNrDPXSF8hGlzB+iOnAsG/9I6PNDaTC7tpuP LHrjj4nADiOaY1JF8IDevtTJnrfZzdlukdM5EjxmOQMluBLXF00uxSCrlJ7fF0ejN4JD Q4LwkNUmpBY3r0XYmP3BaT5xUCGJ3H0IrrWD/2ui8jqMelbfiq8VPrnWpZSMsASEmnHp U8ckmtBg7/nb/4CIadFGBoWiB71MX9sNNtt3ZXZuNUZ4nD1NSR0DTjKbTfHDFJKiWu3S oI2KEw+qKpXMHbdxZKQDP3RSyQcxiJeCdJJD4p+woUWbiPjn42x6zslxWBMZPoVgpmY0 MXjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684738843; x=1687330843; 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=b/3885L94lN4KFkmIG4KL0Z1VLtyVywWWWjhcZ8AdCI=; b=YZwXFrJADzkxQhQ1rKLX22iEFx11/UAZgilqW8wrMi2FNiNMbA10OuiXzQyhc4i6w+ CsE1qGPRbgjrLY44f+2maTR7kVzeJXhAeev+lIlUJjyQMdhCIXCXf9PSXt0W73DOiDA9 vFBe4m552LgF8zrTEjMxQQxgxZ+/oWNWvgTS+ypQeXIQmU80VM2ojQIMfgN5EUIBVm0V fzPub57G3ugBDoEZlVpC8JtScMxT6E1kAiuafRtORGQrC411QhSL/Mql5ZKhabYulP6B xXWT7MrV/C/0Q7YbKQ3zjHrbrUbqNYLouH5yw8wowLGXpOYZWGQGbB7NKJS3e8nkHmff muaQ== X-Gm-Message-State: AC+VfDxtDbN2Fch+iGZLeCV63xe5/LC1GxOVgFOfIQXWkFnnyHvmEsbp TnEbpDjZbLKFJcxI+OOUCDtBaA== X-Received: by 2002:a2e:9081:0:b0:2ac:8486:e318 with SMTP id l1-20020a2e9081000000b002ac8486e318mr3451294ljg.35.1684738843518; Mon, 22 May 2023 00:00:43 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q4-20020a2e8744000000b002adb98fdf81sm1010187ljj.7.2023.05.22.00.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 00:00:43 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> Date: Mon, 22 May 2023 09:00:40 +0200 Subject: [PATCH v2 05/12] cifs: 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-v2-5-0948d38bddab@linaro.org> References: <20230503-virt-to-pfn-v6-4-rc1-v2-0-0948d38bddab@linaro.org> In-Reply-To: <20230503-virt-to-pfn-v6-4-rc1-v2-0-0948d38bddab@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, samba-technical@lists.samba.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>, Tom Talpey <tom@talpey.com> 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=unavailable 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?1766577658371219664?= X-GMAIL-MSGID: =?utf-8?q?1766577658371219664?= |
Series |
arch: Make virt_to_pfn into a static inline
|
|
Commit Message
Linus Walleij
May 22, 2023, 7 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. Acked-by: Tom Talpey <tom@talpey.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- fs/cifs/smbdirect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index 0362ebd4fa0f..964f07375a8d 100644 --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -2500,7 +2500,7 @@ static ssize_t smb_extract_kvec_to_rdma(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); if (!smb_set_sge(rdma, page, off, seg)) return -EIO;