Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memblock tests: fix warning ‘struct seq_file’ declared inside parameter list

Building memblock tests produces the following warning:

cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT -c -o main.o main.c
In file included from tests/common.h:9,
from tests/basic_api.h:5,
from main.c:2:
./linux/memblock.h:601:50: warning: ‘struct seq_file’ declared inside parameter list will not be visible outside of this definition or declaration
601 | static inline void memtest_report_meminfo(struct seq_file *m) { }
| ^~~~~~~~

Add declaration of 'struct seq_file' to tools/include/linux/seq_file.h
to fix it.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>

+4 -1
+2
tools/include/linux/seq_file.h
··· 1 1 #ifndef _TOOLS_INCLUDE_LINUX_SEQ_FILE_H 2 2 #define _TOOLS_INCLUDE_LINUX_SEQ_FILE_H 3 3 4 + struct seq_file; 5 + 4 6 #endif /* _TOOLS_INCLUDE_LINUX_SEQ_FILE_H */
+1 -1
tools/testing/memblock/tests/basic_api.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 + #include "basic_api.h" 2 3 #include <string.h> 3 4 #include <linux/memblock.h> 4 - #include "basic_api.h" 5 5 6 6 #define EXPECTED_MEMBLOCK_REGIONS 128 7 7 #define FUNC_ADD "memblock_add"
+1
tools/testing/memblock/tests/common.h
··· 5 5 #include <stdlib.h> 6 6 #include <assert.h> 7 7 #include <linux/types.h> 8 + #include <linux/seq_file.h> 8 9 #include <linux/memblock.h> 9 10 #include <linux/sizes.h> 10 11 #include <linux/printk.h>