Message ID | 20230503-virt-to-pfn-v6-4-rc1-v3-5-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 b10csp2170980vqo; Tue, 23 May 2023 07:09:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yF8WUL51RoMeFCzB+8aN9Ua8UJscJxxN3/6xc4d6r0Nl9ycCT+RIEu4onDuZbddFlhhIH X-Received: by 2002:a17:90a:f48d:b0:255:a904:7a7b with SMTP id bx13-20020a17090af48d00b00255a9047a7bmr2451940pjb.26.1684850945527; Tue, 23 May 2023 07:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684850945; cv=none; d=google.com; s=arc-20160816; b=GxnGzjg/klACo3MhI5aDrPs3w029gHgPsJ6dQ2m7IfhV5rbrdSbNB29ZusS5HdnlNb Gw2GsLublJPqehT1v0MiBHLvcSkE7oh0714JUdxFfgFg3wZqE/DFQRSAfdxTTWTLGEbt hUq1d6aQW8bSFD3nDxFC467kDDHfwZyCXAHySPnZcnb9J6ThkxFlLRNbtN0xVKK1qQjM bqV4it7/2+Nm+r88eeeM+pUNVs123HBKpquQGned/UP0jjuXxrj3Y6MiF8hmYkbX47Dh n01udtAQSMsV3wfPaMDHIYTc8E4q30PYRScLltNgnwbr67+SNED4iBF22uJ5SNHTF3eb y5Wg== 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=U9vprZ1pIDH97fv03zsvm5cvMMf0oZK4qN5ym5NpUoP6MPmkyiaDX0ESY+OgUhHFD7 nVGwKl67iFOfFGmCK84Kt/yNo6Y+8p03aBadklv3FCTmYHJ1jPzuv8OGcjwxXqrcSxNs vwASsmMDZYhcqYy/FyliCynIFaEoyV16ybnKlOycMnBzly87kw3nBqE4zNbPOEZ1DijU /26gCmHhnSakIRnoMHadVeyouz6O5iRi1RLVbrVUZzTMhhmvhza/SCqQO1SIX88ctNc4 eWiGbUPcvslGTZjIlGFlUSNI1btLumWiHtAtVB2a7s/EL/UDphznUM41F5oJyEywCBr0 QouQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qhdr9VIe; 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 lt9-20020a17090b354900b002473e331f90si6479223pjb.46.2023.05.23.07.08.51; Tue, 23 May 2023 07:09: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=qhdr9VIe; 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 S237190AbjEWOHY (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Tue, 23 May 2023 10:07:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237129AbjEWOHM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 23 May 2023 10:07:12 -0400 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF4C018D for <linux-kernel@vger.kernel.org>; Tue, 23 May 2023 07:06:51 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-4f380cd1019so8398205e87.1 for <linux-kernel@vger.kernel.org>; Tue, 23 May 2023 07:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684850750; x=1687442750; 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=qhdr9VIeHm3TCAUgvcaHfodtBDTuWxK2iXj6V/SQ66zUErdAk9+DCvdLTF4aCd1ETu C+ZAXFKiOs20Y/LEEtHSq1dPudVvh6HRokN0i21bR1zIMcVKbUmCrYz24kNjxTLPVXAa cFSvLYM8x6ZBwAnEtC4zHJP9yI7e0Y76rr1w29rfD59OhfMtbLcaAZOSrbcUgEQ+zCmx caIJ/LOff8nHxBYzP4GFpPBpy1b42pU47PMbeKWiMmKuOjXR5pkLmpUVwA4W9JWmR+b4 CDnpYKOJa/b0/Br6Vk3EN6ig9EeMV6vmOvhLsCfhbrFKneL3zoOIRn+iLLV6tfwCA1tP yGJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684850750; x=1687442750; 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=lkDZhpQCYcHjhMVA7ddeZybJcHCQNQMt+y0vsU1LkcVwst+19CSF7yHRj2wsK2jPVr sb4hGVlcf3LsXcUXxxLXUqumUeNwAMjL4yHtLLLHwBiKe1JDpqghgMqUk8PAuYDI3+RT Zp1cmPNkBhC5O3LlzWBPlnoqb+VJQAUUvUPJ1AtLt1NYXfaiN2X8Syq1WBF5tqGleFV/ C4Eeq21GKTDw3ofYQyGpTYcHFt1vOhg6Hghmkhk34q0whqAB8KeE6+pGYgQd2+63egmw ILq3k+2T8orS/e31pbdwmBTow6LcKK1w9epoxF6eA8ILkZDSPCJGAr3Y5YNOZ3G4OZ1V w6SA== X-Gm-Message-State: AC+VfDwEp7DcGrbvmzNbDtdiStEEqzABsBj/u3NoPGhIlPvFQBMLTPpN gz0OhBP52iQtG9ickWTOTcT5kA== X-Received: by 2002:ac2:52aa:0:b0:4ef:d6e2:6530 with SMTP id r10-20020ac252aa000000b004efd6e26530mr4123672lfm.37.1684850750175; Tue, 23 May 2023 07:05:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 07:05:49 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> Date: Tue, 23 May 2023 16:05:29 +0200 Subject: [PATCH v3 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-v3-5-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>, 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, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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?1766694264728311968?= X-GMAIL-MSGID: =?utf-8?q?1766694264728311968?= |
Series |
arch: Make virt_to_pfn into a static inline
|
|
Commit Message
Linus Walleij
May 23, 2023, 2:05 p.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;