From patchwork Wed Mar 6 11:00:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 159742 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp6024575jad; Wed, 6 Mar 2019 03:01:28 -0800 (PST) X-Google-Smtp-Source: APXvYqzjO6Z0DgwR7+P3zZjpNg6FkKOlq1m3bkxu1ijHue7AEnBvwOrmKLzURSclO6Dv9L5Qy2WN X-Received: by 2002:a17:902:b404:: with SMTP id x4mr6424266plr.232.1551870088240; Wed, 06 Mar 2019 03:01:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551870088; cv=none; d=google.com; s=arc-20160816; b=wztVfqhWaGKjL7eTksPtJ7Mqa6KDVzS7x3AOL8PyQevDVaZFFlxThpYQQor8gqYwSt /9OHqqUnSuDro/LMQwJRN61+1ik4VvTg5gePxuB5Hc2lb4ovSxxf6D7KzgWeqNcKK4Yd Lrc5Wvu0dl5sZ6ETrxnYMbpQhva3G2O2RWloHHIA+5XZzTkxYncYVDmqnshnvHfto4Zt covTxcz7Mz4oc5yQbhZWJ3hYGjsilM4lCbWUdnNPu6T39b7mmgcQyyxSgKkawKRGDgwA rwjlJ4O14zsL9BJUT6BfQ8Qz0YLF7ZoyTg4x/6tJdiKrprC2d+dO/uSe96s8eE6iBwZu zsWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=piVaYaAcibG6n/c30q7eQjxW7RAdxum94b1jVJAg8jM=; b=XhRV3XBhApHdEg+0hh7MpmQfJ+74lBsYIOBElBe/iVYGisEJCH72i4j+NBMBideI+j mO5IKWD6FDxFWUhs8Ye8iPS2gd5pl7ZHyrW2bv1l/KsU/32CtzQ6cNT70vhRxcGWjTST rw5TNIDsyL+s4DGmOiYtU7LPjubKEdhHt46avXw/2y+NA3dsCTyXXe0uzlqOg/bL2iDu TKUbQy2/82WeiWiqT5QbOF7crRzRQMolHVKCit0NOgWias7D9lCjbSDUaZ2tQUGaeiGy xoVSjqq6IakTlB0Mt4OT/ClbZzK8bpU5+btDw3tjz0Q7CbfQSjFbX3/geMTv3tWxqkhG vsRg== 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 a7si1198431plm.420.2019.03.06.03.01.27; Wed, 06 Mar 2019 03:01:28 -0800 (PST) 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 S1730255AbfCFLB0 (ORCPT + 31 others); Wed, 6 Mar 2019 06:01:26 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:47381 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729130AbfCFLB0 (ORCPT ); Wed, 6 Mar 2019 06:01:26 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MRmsE-1gYMov1bac-00TFwb; Wed, 06 Mar 2019 12:01:11 +0100 From: Arnd Bergmann To: =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= Cc: Arnd Bergmann , John Hubbard , Andrew Morton , Ralph Campbell , Dan Williams , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/hmm: fix unused variable warning in hmm_vma_walk_pud Date: Wed, 6 Mar 2019 12:00:55 +0100 Message-Id: <20190306110109.2386057-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:xtKHG1cotgsAuNU1Bh1vZIBHyo9Waba/hnKI7aokdYdMmG9jdy9 zH9VdScakVcGI7/TId/fO8MqEKIZf1ch2ZM2GM4nybKMMiz8gwKm7EsFVsbbBRVaxNloebZ 8afArbe2cCMc7AFVB66+LlGjcdX4fIysCx2jXXnhY2OAN6AQ1w5FNFb5Yg1g1IhLWKStmTo DRx0Y565hgf0Y8OO9dBTg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:yx9f28pAM/I=:LmhQn3gu0AVe24ypm4s4fC 3gcoRijC1djG5MbSwcAYiYtF0ikuE7r6iiK1WBdlQ/rSYM0xFga6ZfDJzuw6Rx2/uZHfUxNlw 56K4L/6owPUNVuu96ydKxBLUbJOCorQqgZLWYC+N2uoUChcIStaVVQYglLfeFEwnzgRWdXm3Y pWIpI8aX9Hz4D8ZTyRcz+LB3fxsCo229VCooikJ8pWWTei8ytU14DhWXMKEaT6vonU+rx2UTJ jfE9tZRCP1xGIxGqi1fubuPe6EEJekUZQpUi8/y/Fn81T3NrTfg159QobxPLgaMbo0sf6N3RR WMufqHg2daokoqY6V7GOxSqwrQuHpyClSp1bKiIYk0JhpilPt8Xxzlep04lvdSjYerAWUCt+8 no+tp3dRMqNY/SJJuZPkJiseV9fhN0bjgYnnG7Q0ZV3HHsZpntL1vtvprfWh/UuQ0QH//l+II PLwtCCERbjmqeEODldUOZD/3PPLgktUF53GIv4wZFs1QXZQq/xDwD3H5Krq/1jcM61ZBKd0Kd JxZ4nN/1WjqNbyEnv0IAHospjVFWvKKE0girpwEqIfEB+Hq8r+riiLQ5g6Wn/wDTg0k0a5OoA 7nRkax9tPYEvU83GXsLm5dR+2nuKK/vFg92NSaX4xXgrNpxraWjneQIRfrg+ptz1n9+ZV29/T I2tqfSbCee/b8J0+J7dOwmuhp2WfspcBhV+2TH8uWpEsUvnBhTg+rbEAPKPG4HzlyC1DvnwFP B6r9w1bPjR8k4VnH1WJutlkZ4QPpyOv4N/w2Xg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without CONFIG_HUGETLB_PAGE, the 'vma' variable is never referenced on x86, so we get this warning: mm/hmm.c: In function 'hmm_vma_walk_pud': mm/hmm.c:764:25: error: unused variable 'vma' [-Werror=unused-variable] Remove the local variable by open-coding walk-vma in the only place it is used. Reported-by: John Hubbard Suggested-by: John Hubbard Fixes: 1bed8a07a556 ("mm/hmm: allow to mirror vma of a file on a DAX backed filesystem") Signed-off-by: Arnd Bergmann --- Andrew, you already took a similar patch from me for a different warning in the same file. Feel free to fold both patches into one if you haven't already forwarded the first patch, or leave them separate. Note that the warnings were introduced by different patches from the same series originally. --- mm/hmm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.20.0 Reviewed-by: Jérôme Glisse diff --git a/mm/hmm.c b/mm/hmm.c index c4beb1628cad..c1cbe82d12b5 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -761,7 +761,6 @@ static int hmm_vma_walk_pud(pud_t *pudp, { struct hmm_vma_walk *hmm_vma_walk = walk->private; struct hmm_range *range = hmm_vma_walk->range; - struct vm_area_struct *vma = walk->vma; unsigned long addr = start, next; pmd_t *pmdp; pud_t pud; @@ -807,7 +806,7 @@ static int hmm_vma_walk_pud(pud_t *pudp, return 0; } - split_huge_pud(vma, pudp, addr); + split_huge_pud(walk->vma, pudp, addr); if (pud_none(*pudp)) goto again;