Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2560928rwd; Mon, 22 May 2023 00:15:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MbfZpTEk7kZw5OEU1meqYTeianNA8QbbS0V8FaH4DvRCDB2Fl15UJlCFuRVGQORaeQtQW X-Received: by 2002:a17:903:2343:b0:1ac:a9c1:b61d with SMTP id c3-20020a170903234300b001aca9c1b61dmr11591537plh.11.1684739751698; Mon, 22 May 2023 00:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684739751; cv=none; d=google.com; s=arc-20160816; b=PXVNuo4EhFCBxupWU8KOZImoqINZB9FMmxCTQrZS4F7XpjO6zhoL8DpYC5+6xlMEJq uv/N1oPQF9vE4fBIaLuSSeP4L++a2PryUWvh7rMisEHHg+3dC1x7VJa5cRD3wPN0Gj1F QiVK0/8xeKV4OwVT/3oBT/ShoEA+bGPCEZbPxzNbFrJpbjcUdeCUpl1W6vC9f38Iq7yw PzX1Rv4V6WXgm/WBlNhl/un8zBePTvrnlCV6lmMP7yX2h/pSXxgJk6A1go7y+kgF31FG 192tegNchqTFLwIJrZAcHsUrPwkrjHGGWvfLj9XSKUwSC3TWGXjYTH8HWLT8FQcWFCgq cVCw== 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=TT87B2zl28LS9U0FdjwNYlC6aDnoqioTVpNeXFFkAiaxlowuA7ctiUR8+UtWA6lsWw uTe2TwduKKJ+1fIVrChYDUTqoJJ848THHXrlvqCiMQI6MPjPY8n2A2sNYvovkUMFZ5IP RxCL10Mp3puM+YoQ9MXZdpU0D8cjm4xWGLGNn5hCjq5FD///RMWGOFepEi3qiYPssHd4 57rpxWV9xARtanJiDp2dy6zipok8PWDp0mtkKw+Cb+Ny27EgLtVLHwI8XNCHvKcpgyck kKv5/f4+KdgpMn54zdajtSHFppzLVwSaCn3YPKxAGrQ2Ly5aT8c/Fz65byi8075KIB2f BnwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mY0aNW1/"; 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 j8-20020a170902da8800b001ac68a1500esi2824909plx.648.2023.05.22.00.15.37; Mon, 22 May 2023 00:15:51 -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="mY0aNW1/"; 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 S232281AbjEVHBm (ORCPT + 99 others); Mon, 22 May 2023 03:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232132AbjEVHBD (ORCPT ); Mon, 22 May 2023 03:01:03 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E23ACCA for ; Mon, 22 May 2023 00:00:47 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2af1e290921so43965561fa.3 for ; Mon, 22 May 2023 00:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684738846; x=1687330846; 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=mY0aNW1/EfjKDkZ/iGL1m6Zy8Fuo6cIs8D94rSpcZbEbpG1ej+LIXwwg8IjfW1ubMf naeqWo2Tcv4U7TJhz9Le9MuCuBLyv4D3QBwlIS3zm4uuM0sDBiKrRy1hwX60LW4us3Fy lkizvvt3WsoYNWJw4yNFIDsi+sL5v4YZ3faevgqnaAPtaHVH/NygExxLIfBKibX15pwh tHGJ8JNozxqi8y1yMVmjsLj2PaJE+bFjBQdfzX3wucmA58zcUBePI0oa6lqw7Yl8bVB9 VaJ8pSouLbJ41Y6QU3Shc7N4h3wuDh4QnygF5tReoR09XiD0FLth1k8KkiUU3nySSVUd z1oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684738846; x=1687330846; 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=lk0znYnKTo6AsBtoKJN5MqNTANx0HKodFtfbLL8VukpNPKsP+LZ5MWnbXI0/pbq4IT LaEBUbqlp0J46ardapi4+oPbmYNj0NlliH+NFMeL9Gv996+gNpxCCT5elXTSc1uee3sp jgn+iEEizvMDr2Em+qwL+MPLYXBY/alheZzvbffae1ASFU4dYAS6fc01euXnVo8ZD3Gc qf89Jvu4+Hm3q+YtLEMeM9ANDqK54jSCE/7II89aOMaaZ9CAPp5bER+0ulhaGixRrpaR Ji5UGPIrjykCGZuYLBCj2aOpRcHvQvZgpig6okopyMm1daAAaKLIObEymlRpvwilM1N1 s30Q== X-Gm-Message-State: AC+VfDxWeQ9kGndJAx05Qfm+qr4eJPuT3gdJV/4wTVmlRnOBEkgEi11j eOf4X6J+RXNWzkRNoQNQVSGjgA== X-Received: by 2002:a2e:88d1:0:b0:2a9:9e99:a508 with SMTP id a17-20020a2e88d1000000b002a99e99a508mr3233749ljk.53.1684738845921; Mon, 22 May 2023 00:00:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 00:00:45 -0700 (PDT) From: Linus Walleij Date: Mon, 22 May 2023 09:00:42 +0200 Subject: [PATCH v2 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-v2-7-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 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: 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