From patchwork Thu Sep 17 07:17:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Shixin X-Patchwork-Id: 11781687 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1F5E36CA for ; Thu, 17 Sep 2020 06:55:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D9A7C206B6 for ; Thu, 17 Sep 2020 06:55:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9A7C206B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0E3AD6B0003; Thu, 17 Sep 2020 02:55:41 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 06D7E6B0037; Thu, 17 Sep 2020 02:55:40 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E9D606B0055; Thu, 17 Sep 2020 02:55:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0151.hostedemail.com [216.40.44.151]) by kanga.kvack.org (Postfix) with ESMTP id D07026B0003 for ; Thu, 17 Sep 2020 02:55:40 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id AD29112C0 for ; Thu, 17 Sep 2020 06:55:39 +0000 (UTC) X-FDA: 77271642798.18.crack95_0c08f0327120 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 73141100EC676 for ; Thu, 17 Sep 2020 06:55:39 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,liushixin2@huawei.com,,RULES_HIT:30054,0,RBL:45.249.212.32:@huawei.com:.lbl8.mailshell.net-62.18.2.100 64.95.201.95;04yfsprie4ookqaft5z4geq76bzbxopgqnd1ny3ceoc3mxys5o1n4b63x1wo84u.rbnn6nociajztzob8y3e3shq1guk5xuhx5u9eqgtf5if7kdshbn649q68w9n69e.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: crack95_0c08f0327120 X-Filterd-Recvd-Size: 1884 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Sep 2020 06:55:38 +0000 (UTC) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 4540C8AC5D0F2C10B575; Thu, 17 Sep 2020 14:55:34 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Thu, 17 Sep 2020 14:55:24 +0800 From: Liu Shixin To: Andrew Morton CC: , , Liu Shixin Subject: [PATCH -next] mm/madvise: Remove set but not used variable 'zone' Date: Thu, 17 Sep 2020 15:17:57 +0800 Message-ID: <20200917071757.1915501-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 73141100EC676 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: 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. 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))