Commit 4f0a8fe3 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fixes-2024-04-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock

Pull memblock fixes from Mike Rapoport:
 "Fix build errors in memblock tests:

   - add stubs to functions that calls to them were recently added to
     memblock but they were missing in tests

   - update gfp_types.h to include bits.h so that BIT() definitions
     won't depend on other includes"

* tag 'fixes-2024-04-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
  memblock tests: fix undefined reference to `BIT'
  memblock tests: fix undefined reference to `panic'
  memblock tests: fix undefined reference to `early_pfn_to_nid'
parents fec50db7 592447f6
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifndef __LINUX_GFP_TYPES_H #ifndef __LINUX_GFP_TYPES_H
#define __LINUX_GFP_TYPES_H #define __LINUX_GFP_TYPES_H
#include <linux/bits.h>
/* The typedef is in types.h but we want the documentation here */ /* The typedef is in types.h but we want the documentation here */
#if 0 #if 0
/** /**
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <linux/build_bug.h> #include <linux/build_bug.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/math.h> #include <linux/math.h>
#include <linux/panic.h>
#include <endian.h> #include <endian.h>
#include <byteswap.h> #include <byteswap.h>
......
...@@ -37,4 +37,9 @@ static inline void totalram_pages_add(long count) ...@@ -37,4 +37,9 @@ static inline void totalram_pages_add(long count)
{ {
} }
static inline int early_pfn_to_nid(unsigned long pfn)
{
return 0;
}
#endif #endif
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _TOOLS_LINUX_PANIC_H
#define _TOOLS_LINUX_PANIC_H
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
static inline void panic(const char *fmt, ...)
{
va_list argp;
va_start(argp, fmt);
vfprintf(stderr, fmt, argp);
va_end(argp);
exit(-1);
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment