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=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, 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 0CCBCCA9EA0 for ; Tue, 22 Oct 2019 12:57:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C71E62075A for ; Tue, 22 Oct 2019 12:57:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C71E62075A 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 737726B0007; Tue, 22 Oct 2019 08:57:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C1DF6B0008; Tue, 22 Oct 2019 08:57:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5AF386B000A; Tue, 22 Oct 2019 08:57:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id 33E546B0007 for ; Tue, 22 Oct 2019 08:57:45 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id B4F467591 for ; Tue, 22 Oct 2019 12:57:44 +0000 (UTC) X-FDA: 76071422448.04.hand83_94633e7b6435 X-HE-Tag: hand83_94633e7b6435 X-Filterd-Recvd-Size: 2762 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Oct 2019 12:57:43 +0000 (UTC) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C59296D3148C1257A736; Tue, 22 Oct 2019 20:57:39 +0800 (CST) Received: from [127.0.0.1] (10.133.213.239) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 22 Oct 2019 20:57:36 +0800 Subject: Re: [RFC PATCH -next] mm/vmstat: Fix build error without CONFIG_VM_EVENT_COUNTERS To: , , , , , , , , , References: <20191022125124.32812-1-yuehaibing@huawei.com> CC: , From: Yuehaibing Message-ID: <8929a502-96d3-fef6-8c5c-885da60d60b2@huawei.com> Date: Tue, 22 Oct 2019 20:57:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20191022125124.32812-1-yuehaibing@huawei.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.213.239] 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: Pls ignore this, seems has fixed. https://lore.kernel.org/linux-mm/cd1c42ae-281f-c8a8-70ac-1d01d417b2e1@infradead.org/T/#u On 2019/10/22 20:51, YueHaibing wrote: > If CONFIG_VM_EVENT_COUNTERS is n but CONFIG_MEMCG is y, > vmstat_text is not equal stat_items_size: > > mm/vmstat.c: In function vmstat_start: > ./include/linux/compiler.h:350:38: error: call to __compiletime_assert_1659 declared > with attribute error: BUILD_BUG_ON failed: stat_items_size != ARRAY_SIZE(vmstat_text) * sizeof(unsigned long) > _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) > > Reported-by: Hulk Robot > Fixes: 2fdf561910a9 ("mm/memcontrol: use vmstat names for printing statistics") > Signed-off-by: YueHaibing > --- > mm/vmstat.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/mm/vmstat.c b/mm/vmstat.c > index b2fd344..a19ed6e 100644 > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -1655,8 +1655,6 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos) > stat_items_size += sizeof(struct vm_event_state); > #endif > > - BUILD_BUG_ON(stat_items_size != > - ARRAY_SIZE(vmstat_text) * sizeof(unsigned long)); > v = kmalloc(stat_items_size, GFP_KERNEL); > m->private = v; > if (!v) >