From patchwork Tue May 23 14:05:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13252472 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 019B5C7EE23 for ; Tue, 23 May 2023 14:40:37 +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=Zv/vNcBMCl1lHUzpOG9UA13frWFKzDC3Fhcl2vsMjo4=; b=SUnU+sXlkiVZWr nXKldr7fEldcvh15l7fxn8hAD80jrSLN6bIcjrsm3A6zyI7L1/DWXFETV88oi9sgbR/+yVZPm09rC ubGYuoS77Dpifv0FICWkPGpxlNH7e6QnfBnefXzVMrwYvyOfcxzYoCxgJ/HD5IAwMTQqRzm2bmb6N t9ZvHVdp0Vs38tgn+gzcKs3l3ZMsXc5Mz+tUN08cCxoSBQ/M/xsXgSKFuKdha8mWbRQXeTPlzsRkS WUfE3GOgMnJWG6dp3g1hj9fgN4vxzVMH2vitIpI4vInXKMd4QPGWzvJn4/ZXf8OpKfccR5H3OXydL fU87TGc4JjzlTE4GMDDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1TBO-00AWRr-0C; Tue, 23 May 2023 14:40:14 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1TBM-00AWQx-0s for linux-arm-kernel@bombadil.infradead.org; Tue, 23 May 2023 14:40:12 +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=cbjvTSrc7JXib/jYCtsnbT8Pj+twUmj4f7HYrh8lbjo=; b=fSavyEHt8hAQVB0cip5didM2RW f8lYE0gyY8al+OO1ge25xF5cb3Cm3WC341nlf+DqGMTqyMFSgjmv7EW3IyUe6/Lq4/brrBbigjNce fNQ7xjohpQT6f/qgLqbGNbeWQke50cN5AeLqGbJqlj1rHcpSbm7Qog6+vL9CPTuIEIgoImML77mcA UG9ixu+cO20oWD+l39pFVq6gnprKw1Q47fzIaebzVEI4ip8KM4xGMUMzJNkZn9CSaW3N5MzP/zJQs QIGCgvsGrbDTFJAWcLdUGzQVzzYqnbpm0JHeBJwnioqcga/aGDWZDUcDuk0vhor/yjpGqIiBsiOYe kIGKWtJA==; Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1Sf7-003XwV-33 for linux-arm-kernel@lists.infradead.org; Tue, 23 May 2023 14:06:57 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f3b9c88af8so3675858e87.2 for ; Tue, 23 May 2023 07:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684850752; x=1687442752; 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=sbGtpTGQuKoJbgxbzRVNan0g3ud99MIRZSa7psCYWoBO5Gd4ngiT8ZH12iPBec4b/f sv3wsOpDUcgyEoNSv9DLn8MhriBoP7mFWJrbwaXvmmnHPiHxtLFssiTqg1+3y3/CC9Ng 5q2rgJSMArU+a9KH/zpDgU6xvBjhPfINAqbfFlUmU6jcGaflnUqrxGDRKWin1C7+6kod w8BvwYrZ7iBnRg/rTBiAeldXSsgcYri6iPf4e7gY99RgCsDpQFTetppSyZ4a9pLmLesB A3f0/o/eDj5XUSN3Ow0r5byyVkJLGeP9SLaqg9YZ9I4EfNu99apZyryJofgUt+kGvN56 2QFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684850752; x=1687442752; 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=hecKTEEiPdR856urR80GGWEgmWdvmRk8ldeb8RqQgHsd51glABRqF/gcLqT1+U1iwo 0QMrPvDflTFJNnvW1Mn1VzQ5tvUJljwLs/qrHYayE9jM0IV1nnTBT9Ull6qPKLFwkChL kUS3ztZIpMaKVv9NjmWpf8w8naojbscA8c0n/n38CLHu6fQ8Sc7MwKDzhvcQZzrBFZtp DzOv07awnXIBAw5K0TCj1zc17wdsYGK2sddYzXqfcaKCCA6TP6Q8tixfUc2kHX9TlxSo DBgnXkbtJ21FbTFVYd8Lb/fuaF3UO9zp373/zC36ZnyD4ZPLRWnJspu/m02qWjlyP3IZ rhUw== X-Gm-Message-State: AC+VfDySlDzFB5YfOZJtGI8YhaFZxYgHu3oUw2wmbXwMiByPqTklV1qh GgTwIgeO4ShOKHQBeeIiDCR2YQ== X-Google-Smtp-Source: ACHHUZ4dmn/sACren4W8D9ctT/gUYEfrO13/MXkcJGmecSW4AoiisQlk/HfzEBoneU9O1M8vm4LnAg== X-Received: by 2002:a05:6512:4cd:b0:4f2:62aa:986a with SMTP id w13-20020a05651204cd00b004f262aa986amr4590844lfq.21.1684850752229; Tue, 23 May 2023 07:05:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 07:05:51 -0700 (PDT) From: Linus Walleij Date: Tue, 23 May 2023 16:05:31 +0200 Subject: [PATCH v3 07/12] netfs: Pass a pointer to virt_to_page() MIME-Version: 1.0 Message-Id: <20230503-virt-to-pfn-v6-4-rc1-v3-7-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 , 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, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230523_150654_210547_8A9C4319 X-CRM114-Status: GOOD ( 13.95 ) 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. Signed-off-by: Linus Walleij --- 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++;