Commit e2ae9cf3 authored by Wei Yang's avatar Wei Yang Committed by Mike Rapoport (Microsoft)
Browse files

tools/testing: abstract two init.h into common include directory



Currently we have two test suits define its own init.h. This is a little
redundant.

Let's create a init.h in common include directory and merge these two
into it.

Signed-off-by: default avatarWei Yang <richard.weiyang@gmail.com>
CC: Mike Rapoport <rppt@kernel.org>
CC: Liam R. Howlett <Liam.Howlett@oracle.com>
Link: https://lore.kernel.org/r/20240712035138.24674-3-richard.weiyang@gmail.com


Signed-off-by: default avatarMike Rapoport (Microsoft) <rppt@kernel.org>
parent d68c0817
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -126,10 +126,6 @@
# define unlikely(x)		__builtin_expect(!!(x), 0)
#endif

#ifndef __init
# define __init
#endif

#include <linux/types.h>

/*
+11 −3
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_INIT_H
#define _LINUX_INIT_H
#ifndef _TOOLS_LINUX_INIT_H_
#define _TOOLS_LINUX_INIT_H_

#include <linux/compiler.h>

#ifndef __init
# define __init
#endif

#ifndef __exit
# define __exit
#endif

#define __section(section)              __attribute__((__section__(section)))

#define __initconst
@@ -29,4 +37,4 @@ struct obs_kernel_param {
#define early_param(str, fn)						\
	__setup_param(str, fn, fn, 1)

#endif
#endif /*  _TOOLS_LINUX_INIT_H_ */
+0 −2
Original line number Diff line number Diff line
#define __init
#define __exit
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#include "test.h"
#include <stdlib.h>
#include <time.h>
#include "linux/init.h"
#include <linux/init.h>
#define module_init(x)
#define module_exit(x)