kbuild: force to define __UBOOT__ in all the C sources
U-Boot has imported various source files from other projects,
mostly Linux.
Something like
#ifdef __UBOOT__
[ modification for U-Boot ]
#else
[ original code ]
#endif
is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.
Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
committed by
Tom Rini
parent
5d9f423ddb
commit
3b61297024
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include "ubifs.h"
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/writeback.h>
|
||||
#else
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* various local functions of those subsystems.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/module.h>
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#ifndef __UBIFS_DEBUG_H__
|
||||
#define __UBIFS_DEBUG_H__
|
||||
|
||||
#define __UBOOT__
|
||||
/* Checking helper functions */
|
||||
typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
|
||||
struct ubifs_zbranch *zbr, void *priv);
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
* they are read from the flash media.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* journal.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifdef __UBOOT__
|
||||
#include <linux/err.h>
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
* an empty LEB for the journal, or a very dirty LEB for garbage collection.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifdef __UBOOT__
|
||||
#include <linux/err.h>
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
*/
|
||||
|
||||
#include "ubifs.h"
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/crc16.h>
|
||||
#include <linux/math64.h>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* subsystem.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/crc16.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
/* This file implements reading and writing the master node */
|
||||
|
||||
#define __UBOOT__
|
||||
#include "ubifs.h"
|
||||
#ifdef __UBOOT__
|
||||
#include <linux/compat.h>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#ifndef __UBIFS_MISC_H__
|
||||
#define __UBIFS_MISC_H__
|
||||
|
||||
#define __UBOOT__
|
||||
/**
|
||||
* ubifs_zn_dirty - check if znode is dirty.
|
||||
* @znode: znode to check
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
* refuses to mount.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
* larger is the journal, the more memory its index may consume.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifdef __UBOOT__
|
||||
#include <linux/compat.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
#include "ubifs.h"
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/slab.h>
|
||||
#include <linux/random.h>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* debugging functions.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifdef __UBOOT__
|
||||
#include <linux/err.h>
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* corresponding subsystems, but most of it is here.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
* the mutex locked.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* putting it all in one file would make that file too big and unreadable.
|
||||
*/
|
||||
|
||||
#define __UBOOT__
|
||||
#ifdef __UBOOT__
|
||||
#include <linux/err.h>
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "ubifs.h"
|
||||
#include <u-boot/zlib.h>
|
||||
|
||||
#define __UBOOT__
|
||||
#include <linux/err.h>
|
||||
#include <linux/lzo.h>
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#ifndef __UBIFS_H__
|
||||
#define __UBIFS_H__
|
||||
|
||||
#define __UBOOT__
|
||||
#ifndef __UBOOT__
|
||||
#include <asm/div64.h>
|
||||
#include <linux/statfs.h>
|
||||
|
||||
Reference in New Issue
Block a user