Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp990025imm; Wed, 25 Jul 2018 09:31:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe5wjwHELzbCv0zIpqGNYP+ir7fukrRBiM1LuqmMakklhVm+PIEc3fx/2nzCGG5IBXLKoZb X-Received: by 2002:a65:4304:: with SMTP id j4-v6mr21912610pgq.109.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=CnjmwP07eLxUP2q8i8oNDvqmqKohGl9mlX973lBqR7F1Jc4romG4G+PpMmGo6xoERQ JQryBEQijFX9TJ/z385Br7TNmHTRaGSqVpJeP20p5WOEh6g17TbeETbBbTshZkguHaZJ iXALyAGl8RG+cfXuTBfklAC+E22IHP+9tB2omTc9n5mNaTue0K6W5Shx6hP7285von2w JSR3c/gPKy/K21UHDSXvh2adqPBTwyvxR5voBYYhqJidTI+eYLSsHS/xWbIxZlLzRlvh T49jiJve8tXBCcO3Lp9yDSA60hpMsVYfmqcw2yuXAwqkAnnpo9LtVN3VMSgvJ+gp9JtG IkUg== 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=GHYLnuHzsPyyCEKcDHfsmTrmemGhJ8I9uw/vwSzoExA=; b=PBFkkVmSK2nrYa91/AT7mLLqgetuz2G6qysWsaVdwisNBN17j4qCMPl//DC5iWXaGj y4FxsBq20Bf6Br+TB7OoG1v3e+FHw07TVQJ38fIIvj5RHOqEGY/X/+Cg7Ot98lN5bxfS Vsym5X37YeuXubrwyowpdDPb4Hql6Qn2nxfZjpayCRJ2pM7rVjSlKnP6BayMfnN6UMfb vwDQtSwsiIelBVl0ymvFv4ATFo8hvt09ZRmS/4W1T7vOGzYS4BBCwfC9u68YFeZxubRx Fn+qcNlm1g5oJ3uJk5zb25CMYbUByozLysrZC5iOm1vGZcUxx1it/OmyCr+4snwdslgW UEVg== 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 68-v6si13296471pla.505.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 S1729530AbeGYRmr (ORCPT + 99 others); Wed, 25 Jul 2018 13:42:47 -0400 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25453 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728644AbeGYRmr (ORCPT ); Wed, 25 Jul 2018 13:42:47 -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=rhDzQlWKNHLYRVtiebuw8fsVPm+ywoWUQlID8LYlWVbQk3Q4+E080JOO1r78/Ap7C4HtxVj+gnOJ XigR64Yven+8DaUq/K7ErYoSmBIHl432Dv3ie9O6z+4nIcCmZzi2 Received: from YEHS1XR956R00D1.lenovo.com (114.245.13.10 [114.245.13.10]) by mx.zohomail.com with SMTPS id 15325361945601010.8143104940251; Wed, 25 Jul 2018 09:29:54 -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 5/6] md/dm-writecache: Don't request pointer dummy_addr when not required Date: Thu, 26 Jul 2018 00:28:48 +0800 Message-Id: <20180725162849.8320-6-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 persistent_memory_claim doesn't need to get local pointer dummy_addr from direct_access. Using NULL instead of having to pass in a useless local pointer that caller then just throw away. Suggested-by: Ross Zwisler Signed-off-by: Huaisheng Ye --- drivers/md/dm-writecache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index 87107c9..9d79084 100644 --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -268,9 +268,8 @@ static int persistent_memory_claim(struct dm_writecache *wc) i = 0; do { long daa; - void *dummy_addr; daa = dax_direct_access(wc->ssd_dev->dax_dev, i, p - i, - &dummy_addr, &pfn); + NULL, &pfn); if (daa <= 0) { r = daa ? daa : -EINVAL; goto err3; -- 1.8.3.1