From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965413AbdJQQb4 (ORCPT ); Tue, 17 Oct 2017 12:31:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58442 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965380AbdJQQbv (ORCPT ); Tue, 17 Oct 2017 12:31:51 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BB423C058ECA Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jglisse@redhat.com Date: Tue, 17 Oct 2017 12:31:49 -0400 From: Jerome Glisse To: Colin King Cc: linux-mm@kvack.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/hmm: remove redundant variable align_end Message-ID: <20171017163148.GC2933@redhat.com> References: <20171017143837.23207-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171017143837.23207-1-colin.king@canonical.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 17 Oct 2017 16:31:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 17, 2017 at 03:38:37PM +0100, Colin King wrote: > From: Colin Ian King > > Variable align_end is assigned a value but it is never read, so > the variable is redundant and can be removed. Cleans up the clang > warning: Value stored to 'align_end' is never read > > Signed-off-by: Colin Ian King Reviewed-by: Jérôme Glisse > --- > mm/hmm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/mm/hmm.c b/mm/hmm.c > index a88a847bccba..ea19742a5d60 100644 > --- a/mm/hmm.c > +++ b/mm/hmm.c > @@ -803,11 +803,10 @@ static RADIX_TREE(hmm_devmem_radix, GFP_KERNEL); > > static void hmm_devmem_radix_release(struct resource *resource) > { > - resource_size_t key, align_start, align_size, align_end; > + resource_size_t key, align_start, align_size; > > align_start = resource->start & ~(PA_SECTION_SIZE - 1); > align_size = ALIGN(resource_size(resource), PA_SECTION_SIZE); > - align_end = align_start + align_size - 1; > > mutex_lock(&hmm_devmem_lock); > for (key = resource->start; > -- > 2.14.1 >