Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp990026imm; Wed, 25 Jul 2018 09:31:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcNOLKRBkbxxRszHhUiIwLGHlKgnhILsO/M8Gq2pSgVrX6/GPI5I/iLPZGrL0nY+IanAAqN X-Received: by 2002:a62:c1:: with SMTP id 184-v6mr23053725pfa.100.1532536319714; Wed, 25 Jul 2018 09:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532536319; cv=none; d=google.com; s=arc-20160816; b=yUTJoQ5A9kgbUDJ3i7lbk1kPHxZI9A/d4VxcOouCK0NQ3yeMZnAvVSxE1ac8yNTB7l Blt/vAfGRR+cfZVp88yCtvCREENJlgEmvV9zMh0+f6AR9XlTavDaUsWgDC4uAfyNwGLD 7iSwEYVm4/Kj4kmh+G+oiVAVlG+z7xdgxiGyCwCJDKPbErNnmhc2Z85G5pQqCL929ETc c8Y+DffImqYtwoBRI0Br3h9rlEzvCBtx/VImDJVkQRsYxGDK7SL7fXxiapdyxIz3iEMs CG+p95UCo38l58E2mVmJS+NFWgJzqDPmxAUOXI/N/1MEw38T4JlNRwOEiBlQFVZ8r8UI 7UVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:domainkey-signature:arc-authentication-results; bh=JFvJSveEB+4mpM8PlYkozeehhpXTliXyDFcGz6dsB0A=; b=0D7OMAoA7ZAMuRS3SfYjinqK6XIyLw9lVzMec5eey1kT/nvhTmm3w0od2eja8Pz95b FUvsTcq+skQLsNOJm5hrcjl797yOmDNE+F+4HVKn3r3pWjNJPnFIQBT0fCzbq4gVyTf4 0WdAM1IKIxjRxSGZQyVqqRRzo1xja9De+1HZgGI55M40cDtD/pqeawPimW0XyR6WRBvv rfBqarIvDMJy47SYAspvvyeLh7zKt6726BqSIQ4+m7yb2tua59xpH+5DtEa8LhJVspxp 8ZWEqesAjZpK2TRVO7Aja8/VJ4btV4W9VleB9YBdLptHNiX10CZIEwLAt6l3aTFgs4vJ 2GiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11-v6si14071032pga.150.2018.07.25.09.31.44; Wed, 25 Jul 2018 09:31:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729510AbeGYRmh (ORCPT + 99 others); Wed, 25 Jul 2018 13:42:37 -0400 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25325 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728663AbeGYRmh (ORCPT ); Wed, 25 Jul 2018 13:42:37 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=jp8VGJs5soN22vzWQ7c3bpKokb3GM0auhPIehJhF1SOnqoNNCmrv1ZYUChHHC9fJuDGYSLJiQYGf l7FrY2sasOEixHgohKi9/N7vhSbxEg4r34ZaLAeWq818TnonPSeP Received: from YEHS1XR956R00D1.lenovo.com (114.245.13.10 [114.245.13.10]) by mx.zohomail.com with SMTPS id 1532536186173683.0214219839062; Wed, 25 Jul 2018 09:29:46 -0700 (PDT) From: Huaisheng Ye To: linux-nvdimm@lists.01.org, dan.j.williams@intel.com Cc: ross.zwisler@linux.intel.com, willy@infradead.org, vishal.l.verma@intel.com, dave.jiang@intel.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, viro@zeniv.linux.org.uk, martin.petersen@oracle.com, axboe@kernel.dk, gregkh@linuxfoundation.org, bart.vanassche@wdc.com, jack@suse.cz, agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, chengnt@lenovo.com, colyli@suse.de, Huaisheng Ye Subject: [PATCH v2 4/6] dax/super: Do not request a pointer kaddr when not required Date: Thu, 26 Jul 2018 00:28:47 +0800 Message-Id: <20180725162849.8320-5-yehs2007@zoho.com> X-Mailer: git-send-email 2.17.0.windows.1 In-Reply-To: <20180725162849.8320-1-yehs2007@zoho.com> References: <20180725162849.8320-1-yehs2007@zoho.com> X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huaisheng Ye Function __bdev_dax_supported doesn't need to get local pointer kaddr from direct_access. Using NULL instead of having to pass in a useless local pointer that caller then just throw away. Signed-off-by: Huaisheng Ye --- drivers/dax/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 45276ab..6e928f3 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -89,7 +89,6 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize) struct request_queue *q; pgoff_t pgoff; int err, id; - void *kaddr; pfn_t pfn; long len; char buf[BDEVNAME_SIZE]; @@ -122,7 +121,7 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize) } id = dax_read_lock(); - len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn); + len = dax_direct_access(dax_dev, pgoff, 1, NULL, &pfn); dax_read_unlock(id); put_dax(dax_dev); -- 1.8.3.1