* [RFC PATCH -next] mm/vmstat: Fix build error without CONFIG_VM_EVENT_COUNTERS
@ 2019-10-22 12:51 YueHaibing
2019-10-22 12:57 ` Yuehaibing
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-10-22 12:51 UTC (permalink / raw)
To: sfr, khlebnikov, akpm, mhocko, hannes, vbabka, yuehaibing, jannh,
gregkh, janne.huttunen, arunks
Cc: linux-mm, linux-kernel
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 <hulkci@huawei.com>
Fixes: 2fdf561910a9 ("mm/memcontrol: use vmstat names for printing statistics")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH -next] mm/vmstat: Fix build error without CONFIG_VM_EVENT_COUNTERS
2019-10-22 12:51 [RFC PATCH -next] mm/vmstat: Fix build error without CONFIG_VM_EVENT_COUNTERS YueHaibing
@ 2019-10-22 12:57 ` Yuehaibing
0 siblings, 0 replies; 2+ messages in thread
From: Yuehaibing @ 2019-10-22 12:57 UTC (permalink / raw)
To: sfr, khlebnikov, akpm, mhocko, hannes, vbabka, jannh, gregkh,
janne.huttunen, arunks
Cc: linux-mm, linux-kernel
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 <hulkci@huawei.com>
> Fixes: 2fdf561910a9 ("mm/memcontrol: use vmstat names for printing statistics")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> 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)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-22 12:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 12:51 [RFC PATCH -next] mm/vmstat: Fix build error without CONFIG_VM_EVENT_COUNTERS YueHaibing
2019-10-22 12:57 ` Yuehaibing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).