From patchwork Mon May 22 07:00:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13249880 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 946DDC7EE2F for ; Mon, 22 May 2023 07:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EHaMgf1wOZ/uTwVlamkgOrtrjEFuKZnSkSmiFg/j2uc=; b=P3TBpMicd8cysC +JKiZ67jn8jExK7azQG0BHZlBzL4mYFAd54deiJppo5LaYBg90TlFx7GtGw2QWp16tQExcOVwc4kg a52EBbULXwPmKl947LHTyRLn+GHOF8o36jwfllin/bbLn6eG9OxqddZmZXsuLsb3uWGqf2VHu0bmh 5VW0QbJPyUwkvpm4FgAKUkSGhF87DP+qRUaBgz0rW1GKb+PMoqHAKeHZgikbJpxX62BAxWCQakG69 UuwuW0O8f2wb4JeWmptkG8dZH/sSnSCl/krS0yOHzsotGsN2bkSctsYFILxzuPC+OtwnVfh47jEIr dSc+AKIMp6P1XJjcsZbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q0zYH-005Zuw-02; Mon, 22 May 2023 07:01:53 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q0zXT-005ZPr-0I for linux-arm-kernel@bombadil.infradead.org; Mon, 22 May 2023 07:01:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=b/3885L94lN4KFkmIG4KL0Z1VLtyVywWWWjhcZ8AdCI=; b=YGZRokyrj8M+wETHwCXCuGjwjD lqm0JBZt/EGFvx0qhpxsQRq8gT7DA2qLUPQUIJPajMsi69tZkQ6lOxRH3KLyDYzBhfYEzKe8EUUQM P+iyLBZjQ2PvImfDCKGvuquAOvB2FkRv4dPAsy7VkPDMO69Z44PrvuLpHAB8DXpg4mYMUw4A9U6kM QfihkjodIQbi3z/yPRIkzxzoFPuBM+9BhM1fs9We5VjLUT76WKaN6Vb8p/BOBx5UQLtLVFYp8pMyQ zWzsTWpZqE93aF/UAu7wcn6xwWyJqLa4gSp7AAIOG88Mdqyx8CPs4B0FvwaG15BWTYLVB2W36tNT/ XeqijZbQ==; Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q0zXD-001xbj-18 for linux-arm-kernel@lists.infradead.org; Mon, 22 May 2023 07:01:01 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2af98eb6ef0so12513131fa.3 for ; Mon, 22 May 2023 00:00:44 -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=VpkwYDejeL+TAhVpP4IeN3rnbMEgjtB4gcq+n66kSyC4O5LjMMQfK4yoIJnhoUcfD+ Z4D+qvHRNixjURbls7s3zKK9airWC5Kysy3eI3kQfWMpdCZoxVh+Ig+dW21u6RXfBdbr J+Izjcmc5PlKzkEtZI2sBZxl6mtcbdeCqNAYefwXafNMNMCMDAhGIfhqZCbzZBfdZUF0 u78ErNhuLvEpbpHGSjXWr5QgHvdMq57KaFwnihI/kaVRJg97nLDKlRYsJkx/MitXDVS9 z0Keyq7NeVePZYMJcorADENo66/064l5Z0bOxh7LPRfVoW5ykq2dCvwwuOQ+EdlI0Xu9 Zndg== X-Gm-Message-State: AC+VfDxx5iPqLCFCWj9OIN/JRYWW6I55yF1ERDI/mOEPcr1u+Xd6zt43 jC8cb+9j3z0/6BsXWpIOyR9rJA== X-Google-Smtp-Source: ACHHUZ5h73hBaOd7t5s+aJ2lUS5QT6SygNvWWhdVE3CS8JGYJhqyww8xpReCDW9EkuzhCaG9HMhk0A== 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 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 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 , Geert Uytterhoeven , Vineet Gupta , Catalin Marinas , Will Deacon , Arnd Bergmann , Russell King , Greg Ungerer 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 , Tom Talpey X-Mailer: b4 0.12.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230522_080058_415262_8D1780D1 X-CRM114-Status: GOOD ( 13.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Signed-off-by: Linus Walleij --- 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;