From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FEDCC433E2 for ; Thu, 17 Sep 2020 07:54:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B486021D90 for ; Thu, 17 Sep 2020 07:54:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B486021D90 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 41C126B0003; Thu, 17 Sep 2020 03:54:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F0A86B0037; Thu, 17 Sep 2020 03:54:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3075C6B0055; Thu, 17 Sep 2020 03:54:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0088.hostedemail.com [216.40.44.88]) by kanga.kvack.org (Postfix) with ESMTP id 186936B0003 for ; Thu, 17 Sep 2020 03:54:03 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C3737362D for ; Thu, 17 Sep 2020 07:54:02 +0000 (UTC) X-FDA: 77271789924.08.spade55_100c35a27120 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 9998D1819E769 for ; Thu, 17 Sep 2020 07:54:02 +0000 (UTC) X-HE-Tag: spade55_100c35a27120 X-Filterd-Recvd-Size: 2034 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Sep 2020 07:54:01 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E01A8B1AA; Thu, 17 Sep 2020 07:54:15 +0000 (UTC) Date: Thu, 17 Sep 2020 09:53:58 +0200 From: Oscar Salvador To: Liu Shixin Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] mm/madvise: Remove set but not used variable 'zone' Message-ID: <20200917075354.GA27201@linux> References: <20200917071757.1915501-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917071757.1915501-1-liushixin2@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 9998D1819E769 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Sep 17, 2020 at 03:17:57PM +0800, Liu Shixin wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > mm/madvise.c: In function 'madvise_inject_error': > mm/madvise.c:882:15: warning: unused variable 'zone' [-Wunused-variable] > > After 4b63fdbe2b25 ("mm: remove the now-unnecessary mmget_still_valid() > hack"), variable 'zone' is never used. Remove it to avoid build warning. Hi Liu, Andrew already fixed that in the mmotm tree. Thanks anyway > > Signed-off-by: Liu Shixin > --- > mm/madvise.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/madvise.c b/mm/madvise.c > index 460e19d60ba3..94b9d17331b9 100644 > --- a/mm/madvise.c > +++ b/mm/madvise.c > @@ -879,7 +879,6 @@ static long madvise_remove(struct vm_area_struct *vma, > static int madvise_inject_error(int behavior, > unsigned long start, unsigned long end) > { > - struct zone *zone; > unsigned long size; > > if (!capable(CAP_SYS_ADMIN)) > -- > 2.25.1 > > -- Oscar Salvador SUSE L3