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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 314A3CA9EA0 for ; Tue, 22 Oct 2019 12:52:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F16CD2075A for ; Tue, 22 Oct 2019 12:52:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F16CD2075A 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 9AC376B0007; Tue, 22 Oct 2019 08:52:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 95D2E6B0008; Tue, 22 Oct 2019 08:52:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 872F26B000A; Tue, 22 Oct 2019 08:52:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id 64A4A6B0007 for ; Tue, 22 Oct 2019 08:52:43 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 04741180AD804 for ; Tue, 22 Oct 2019 12:52:43 +0000 (UTC) X-FDA: 76071409806.04.able49_6df148672d409 X-HE-Tag: able49_6df148672d409 X-Filterd-Recvd-Size: 2335 Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Oct 2019 12:52:35 +0000 (UTC) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2FAB5611C6A600EF6DD7; Tue, 22 Oct 2019 20:52:26 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Tue, 22 Oct 2019 20:52:15 +0800 From: YueHaibing To: , , , , , , , , , , CC: , Subject: [RFC PATCH -next] mm/vmstat: Fix build error without CONFIG_VM_EVENT_COUNTERS Date: Tue, 22 Oct 2019 20:51:24 +0800 Message-ID: <20191022125124.32812-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain 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: 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) -- 2.7.4