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: 98017 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2187697vqo; Tue, 23 May 2023 07:32:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ47WVw49TRjwXiDVbiHXVyDn8xjdLHtdSCGCV7PscXMthWr3cbd5QZwkXn1pnUu5zjcST77 X-Received: by 2002:a05:6a20:1591:b0:105:5086:fd42 with SMTP id h17-20020a056a20159100b001055086fd42mr17071894pzj.45.1684852349533; Tue, 23 May 2023 07:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684852349; cv=none; d=google.com; s=arc-20160816; b=I6S89O5/6/QcWVM9jWxgeRMmRedhGeRTpMyTaJLlx/ti4C+8Cd3KLkhJAofyf/Fi3R 7r4fUwom7R0zgAbrZKPASMe2HehRotUp+Ox5hDIh8IeUnQhJKITg3NZskIj1Ywp9VBIV ijCylQPx3ZwJaHca942qRDHqQpgJj6grGNy7TBhbO6B01TSu+rVQfrZHzjDEe87pGmdl BG4O9LbW3slJCWQ71t7bYUutM74Heu0+vo+0tm4OtQvNxBta94O9zUYUqOTBFyacqyXa G/3TYjkPoxaYPTkcPHdHen1sEiIokUwkDMEf5CEAFK3IIiJEfkhCeZ+2wuQllC4zfQVI zJDw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a63924b000000b00530b1e7099dsi4839040pgn.84.2023.05.23.07.31.58; Tue, 23 May 2023 07:32:29 -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 S237215AbjEWOHe (ORCPT + 99 others); Tue, 23 May 2023 10:07:34 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766695737653218368?= X-GMAIL-MSGID: =?utf-8?q?1766695737653218368?= 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++;