Skip to content

Commit fb8b1b9

Browse files
committed
Merge tag 'fixes-2023-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull memblock test fixes from Mike Rapoport: "Fix several compilation errors and warnings in memblock tests" * tag 'fixes-2023-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock tests: fix warning ‘struct seq_file’ declared inside parameter list memblock tests: fix warning: "__ALIGN_KERNEL" redefined memblock tests: Fix compilation errors.
2 parents 2af5acb + 55122e0 commit fb8b1b9

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

tools/include/linux/mm.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#define PHYS_ADDR_MAX (~(phys_addr_t)0)
1313

14-
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
15-
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
1614
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
1715
#define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a))
1816

@@ -29,7 +27,7 @@ static inline void *phys_to_virt(unsigned long address)
2927
return __va(address);
3028
}
3129

32-
void reserve_bootmem_region(phys_addr_t start, phys_addr_t end);
30+
void reserve_bootmem_region(phys_addr_t start, phys_addr_t end, int nid);
3331

3432
static inline void totalram_pages_inc(void)
3533
{

tools/include/linux/seq_file.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#ifndef _TOOLS_INCLUDE_LINUX_SEQ_FILE_H
22
#define _TOOLS_INCLUDE_LINUX_SEQ_FILE_H
33

4+
struct seq_file;
5+
46
#endif /* _TOOLS_INCLUDE_LINUX_SEQ_FILE_H */

tools/testing/memblock/internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ void memblock_free_pages(struct page *page, unsigned long pfn,
2020
{
2121
}
2222

23+
static inline void accept_memory(phys_addr_t start, phys_addr_t end)
24+
{
25+
}
26+
2327
#endif

tools/testing/memblock/mmzone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ struct pglist_data *next_online_pgdat(struct pglist_data *pgdat)
1111
return NULL;
1212
}
1313

14-
void reserve_bootmem_region(phys_addr_t start, phys_addr_t end)
14+
void reserve_bootmem_region(phys_addr_t start, phys_addr_t end, int nid)
1515
{
1616
}
1717

tools/testing/memblock/tests/basic_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
2+
#include "basic_api.h"
23
#include <string.h>
34
#include <linux/memblock.h>
4-
#include "basic_api.h"
55

66
#define EXPECTED_MEMBLOCK_REGIONS 128
77
#define FUNC_ADD "memblock_add"

tools/testing/memblock/tests/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stdlib.h>
66
#include <assert.h>
77
#include <linux/types.h>
8+
#include <linux/seq_file.h>
89
#include <linux/memblock.h>
910
#include <linux/sizes.h>
1011
#include <linux/printk.h>

0 commit comments

Comments
 (0)