From patchwork Fri Sep 18 09:04:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiang X-Patchwork-Id: 11784389 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 AC2CE6CB for ; Fri, 18 Sep 2020 09:08:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4C05C21D24 for ; Fri, 18 Sep 2020 09:08:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C05C21D24 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2E6A06B0003; Fri, 18 Sep 2020 05:08:42 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 297D86B0055; Fri, 18 Sep 2020 05:08:42 -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 1AD596B005A; Fri, 18 Sep 2020 05:08:42 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id 0581F6B0003 for ; Fri, 18 Sep 2020 05:08:42 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B9AB28249980 for ; Fri, 18 Sep 2020 09:08:41 +0000 (UTC) X-FDA: 77275606842.04.waste27_250d4732712a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 9CBA4800FCBD for ; Fri, 18 Sep 2020 09:08:41 +0000 (UTC) X-Spam-Summary: 1,0,0,8cdf8240ec0f33e6,d41d8cd98f00b204,chenxiang66@hisilicon.com,,RULES_HIT:41:355:379:541:582:800:960:968:973:988:989:1152:1260:1261:1277:1313:1314:1345:1437:1516:1518:1534:1539:1568:1711:1714:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3865:3866:3867:3870:3871:5007:6117:6119:6261:7576:7903:8603:10004:10400:11026:11658:11914:12043:12296:12297:12438:12555:12679:12895:13069:13311:13357:14181:14394:14721:21080:21324:21554:21627:30054,0,RBL:45.249.212.35:@hisilicon.com:.lbl8.mailshell.net-64.201.201.201 62.14.2.100;04yrzsdr5r9nxr6j36ghoqq4q3yr3oc46nqisjc5erourezi3xxawmrqd7ibt7b.hnkizt8fj3bpmcbgf7ki9eswdkaknhkojnuxoehnaqnwsi1c4wrhk1msbwu8ho8.a-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:24,LUA_SUMMARY:none X-HE-Tag: waste27_250d4732712a X-Filterd-Recvd-Size: 1722 Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 09:08:40 +0000 (UTC) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 248DA503EFC35C81615F; Fri, 18 Sep 2020 17:08:35 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Fri, 18 Sep 2020 17:08:24 +0800 From: chenxiang To: , CC: , , Xiang Chen Subject: [PATCH] mm/zbud: remove redundant initialization Date: Fri, 18 Sep 2020 17:04:45 +0800 Message-ID: <1600419885-191907-1-git-send-email-chenxiang66@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected 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: From: Xiang Chen zhdr is already initialized in the front of the function, so remove redundant initialization here. Signed-off-by: Xiang Chen Reviewed-by: David Hildenbrand --- mm/zbud.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/zbud.c b/mm/zbud.c index bc93aa4..c49966e 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -367,7 +367,6 @@ int zbud_alloc(struct zbud_pool *pool, size_t size, gfp_t gfp, spin_lock(&pool->lock); /* First, try to find an unbuddied zbud page. */ - zhdr = NULL; for_each_unbuddied_list(i, chunks) { if (!list_empty(&pool->unbuddied[i])) { zhdr = list_first_entry(&pool->unbuddied[i],