Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4389094rwd; Tue, 23 May 2023 07:09:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6RXKqVWBziYAw9ERNDGmLOO8sy4dIME1xNr8ghIjMKhUST6aZvOlgGoUhVlwCGw8hckxlu X-Received: by 2002:a05:6a00:2e0e:b0:646:3c2:4d30 with SMTP id fc14-20020a056a002e0e00b0064603c24d30mr17029157pfb.30.1684850962483; Tue, 23 May 2023 07:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684850962; cv=none; d=google.com; s=arc-20160816; b=JxREzrIblnpNqGrvKSr/JEIotHQtk8f5KdsALc6XU5SNzhoeRoH5RtwVkcSoL2h4Wt IobwP3Tx7i1krZqolzFpr++aXKv8KA0MAOE79pTbS7I4pJM7HfsI9omAr7xIx7Z7iO0J +OjryHGH9k+YdQKAnIgKoienbhTnDk89Pk0BQQXrkkTXTOCbzHznoPlyAMpFJkGvgd7h fttDh3M7Fa7LW0tNft/ULdV7oYYqDGH1FkEAKDrqkgo2ltSp78lKJ82SqJ4lxFgkuiPJ azboind03riiLukYA83IMQzkBO7CoE0vfolsMU1b4McYs7EA1XyU9f8j+w4Ct4+2x05W nUig== 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=cbjvTSrc7JXib/jYCtsnbT8Pj+twUmj4f7HYrh8lbjo=; b=uOKpaahNXJ3du5vssQ1tL98eqFzjzXdzETI+g4FiGHXZ68x4vrIMof7K5tK8dY+GRJ OZyE/XnrM8/hIlG7adFPSkLVtZ0sIPryNWZgrn+AOrSxtlWKldwH2Nk9XmJzqf3510/u YduEALWkkSFHNHnH/eCssPtUiW33ZAp0AiUUEZQWRYe65qECqSseJcvclNgJY41y2DLq BrcKZnYF0t67oPn4l/cTgS0WbhKMaWpoupZVAhBIs0jgjJ48Dij9N8ia7pGnp8KI4tw8 3GqHex6kCr0xik/bv2fOiyc9I072SEKM5b0pJqINtDUgiWOWN3486F9qHKvgVDMppUUH BpLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sbGtpTGQ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s123-20020a625e81000000b006438319283esi6528158pfb.73.2023.05.23.07.09.06; Tue, 23 May 2023 07:09:22 -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=sbGtpTGQ; 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 S237144AbjEWOHd (ORCPT + 99 others); Tue, 23 May 2023 10:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237149AbjEWOHN (ORCPT ); Tue, 23 May 2023 10:07:13 -0400 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD0871A6 for ; Tue, 23 May 2023 07:06:53 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-4f3a9ad31dbso6175272e87.0 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=Pqnd0d7OykBOgXY0JnQAwYdWEcEfoH2nxMtZhBnTCitNgHkbX68qqdIZPlJxdKZiAx hX3DGkD1Az6vbE8LC2lZ9y/OeE9WboyxW71cbSqYAAh/hF55Y6P8w0B7RAuqqzVMvEAk 4pvPdAE9r66qpH8SQ+l2dpu+Dfe78UP0gwpYgQTl5VhJqmGFLXgfN5dg5vIFYwBEiUvs SvC+rH7M/Mg+jeIcKg7VDBpryg1pPzazwN3ToYAp0etFL9fjB6zyr+MBknXv7HSVKaz4 LEcqD+Qbialsdts80fU1ExAYsnQD2H76o7FFlcSAkVNM9ZNaCONvR8oMdTH+UOrEOE3D E+iQ== X-Gm-Message-State: AC+VfDwoOYoz8wNkmlZv+Zos+OS5cvUkctYAnKTsh99EcUmNAG2ug7Ws K1RyspCh9+s7iT/23VJaDFOusw0L2qSyiSkbHuc= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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-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: X-Mailing-List: linux-kernel@vger.kernel.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++; -- 2.34.1