Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp473908ybc; Tue, 19 Nov 2019 04:26:52 -0800 (PST) X-Google-Smtp-Source: APXvYqy+2gsMDafIbJ6LeVY2rV/6g9CrHY+LNzcEQCaka0MCuouGHM6W3XEO7tQ0yGW24CsWLkSV X-Received: by 2002:a17:907:2070:: with SMTP id qp16mr35081086ejb.115.1574166412523; Tue, 19 Nov 2019 04:26:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574166412; cv=none; d=google.com; s=arc-20160816; b=sD5bPRxPEWEEsJeoRAMaRUk5cZRz5jttAHOoPJMsUIBTOaNk5SFC9qCcpydY4r7GIQ yGRANbiBqNJ+BigLuPhT1j/S7GPvqRSdQYyN1NmJ5I89ADqtt/YT3dYXZ5VlanA6dRDZ aXmMrjx37vRholHbCu/q/VJwwY/Y1ms3aoeka8pXo9/oHTmWibLtilITiZoMnmDN53Jy hj5F8G+Gw+cieQpAYroJAjAp3LcqMZkvfM13XVpDjDTZaepHtOFdKqle1Y+EMIUT79rs 28SOwivLexSXmrV29U+xljs9SbRmC2wC5jkl4DSJEflps2jCoTkB3WenRXAKOjRY9Jpa 3hEw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=IijAvnII+IobAc/jmkQRtqzgHXw/HTHIMK2zK11+/C8=; b=xNuFmw3cPZ/NPrZVpNgoBKeQOeE4udnWeWKyL65/WS1+8JEJ3k7MvxFmqlgjyMA7e5 h7kcscLhbVMokjOdz337XqF71IxOA+RTmusje/VWp7zbLSYVicgpZ9l5EjEXPE/d/keh AWNiik7VP5NkiVWOLqQBbGcJNDbU8ftCgypMszmbLs+Rzr4EamrHB4tXCoW70zTnrJj7 SBTKFIGdd2TOgkoE6Arr77SC7FBZWrdULAEh2okbKWRnhLa0RDYas3iS+lT+E00lDKsc vUyHYzr6BmT3FcO+NBzn3T3OLL3RT+/VpnECH/QNUBRkIWbM9EP4eZ/4ARK0NcJpHVOG hjpg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si13112090ejd.401.2019.11.19.04.26.28; Tue, 19 Nov 2019 04:26:52 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbfKSMYR (ORCPT + 99 others); Tue, 19 Nov 2019 07:24:17 -0500 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:45090 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727948AbfKSMYQ (ORCPT ); Tue, 19 Nov 2019 07:24:16 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04427;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0TiZ64Bq_1574166244; Received: from localhost(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0TiZ64Bq_1574166244) by smtp.aliyun-inc.com(127.0.0.1); Tue, 19 Nov 2019 20:24:05 +0800 From: Alex Shi To: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, mgorman@techsingularity.net, tj@kernel.org, hughd@google.com, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, yang.shi@linux.alibaba.com, willy@infradead.org, shakeelb@google.com, hannes@cmpxchg.org Cc: Alex Shi Subject: [PATCH v4 1/9] mm/swap: fix uninitialized compiler warning Date: Tue, 19 Nov 2019 20:23:15 +0800 Message-Id: <1574166203-151975-2-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1574166203-151975-1-git-send-email-alex.shi@linux.alibaba.com> References: <1574166203-151975-1-git-send-email-alex.shi@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ../mm/swap.c: In function ‘__page_cache_release’: ../mm/swap.c:67:10: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized] lruvec = lock_page_lruvec_irqsave(page, pgdat, flags); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alex Shi Cc: Andrew Morton Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swap.c b/mm/swap.c index 5341ae93861f..c36a10244d07 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -62,7 +62,7 @@ static void __page_cache_release(struct page *page) if (PageLRU(page)) { pg_data_t *pgdat = page_pgdat(page); struct lruvec *lruvec; - unsigned long flags; + unsigned long flags = 0; spin_lock_irqsave(&pgdat->lru_lock, flags); lruvec = mem_cgroup_page_lruvec(page, pgdat); -- 1.8.3.1