summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/command.h5
-rw-r--r--include/elf.h2
-rw-r--r--include/fb.h4
-rw-r--r--include/linux/mount.h2
-rw-r--r--include/linux/phy.h2
-rw-r--r--include/linux/rbtree.h4
-rw-r--r--include/linux/stddef.h2
-rw-r--r--include/wchar.h3
8 files changed, 11 insertions, 13 deletions
diff --git a/include/command.h b/include/command.h
index 4ed5e37395..2e7278099b 100644
--- a/include/command.h
+++ b/include/command.h
@@ -25,10 +25,7 @@
#include <linux/list.h>
#include <linux/stringify.h>
-
-#ifndef NULL
-#define NULL 0
-#endif
+#include <linux/stddef.h>
#ifndef __ASSEMBLY__
diff --git a/include/elf.h b/include/elf.h
index 6d4addf53b..a749bec34e 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -284,7 +284,7 @@ typedef struct elf64_phdr {
#define SHN_ABS 0xfff1
#define SHN_COMMON 0xfff2
#define SHN_HIRESERVE 0xffff
-
+
typedef struct {
Elf32_Word sh_name;
Elf32_Word sh_type;
diff --git a/include/fb.h b/include/fb.h
index cf113c4300..b2a9c7152b 100644
--- a/include/fb.h
+++ b/include/fb.h
@@ -73,8 +73,8 @@ struct fb_videomode {
struct fb_bitfield {
u32 offset; /* beginning of bitfield */
u32 length; /* length of bitfield */
- u32 msb_right; /* != 0 : Most significant bit is */
- /* right */
+ u32 msb_right; /* != 0 : Most significant bit is */
+ /* right */
};
struct fb_info;
diff --git a/include/linux/mount.h b/include/linux/mount.h
index e4d185ccf8..57d5ba9523 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -1,6 +1,6 @@
/*
*
- * Definitions for mount interface. This describes the in the kernel build
+ * Definitions for mount interface. This describes the in the kernel build
* linkedlist with mounted filesystems.
*
* Author: Marco van Wieringen <mvw@planets.elm.net>
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 38b0670187..d7b10afbc9 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -251,7 +251,7 @@ struct phy_driver {
struct driver_d drv;
};
-#define to_phy_driver(d) container_of(d, struct phy_driver, drv)
+#define to_phy_driver(d) ((d) ? container_of(d, struct phy_driver, drv) : NULL)
#define PHY_ANY_ID "MATCH ANY PHY"
#define PHY_ANY_UID 0xffffffff
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
index d85b0adb5c..a5ef1b9a98 100644
--- a/include/linux/rbtree.h
+++ b/include/linux/rbtree.h
@@ -1,7 +1,7 @@
/*
Red Black Trees
(C) 1999 Andrea Arcangeli <andrea@suse.de>
-
+
* SPDX-License-Identifier: GPL-2.0+
linux/include/linux/rbtree.h
@@ -61,7 +61,7 @@ extern struct rb_node *rb_first_postorder(const struct rb_root *);
extern struct rb_node *rb_next_postorder(const struct rb_node *);
/* Fast replacement of a single node without remove/rebalance/add/rebalance */
-extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
+extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
struct rb_root *root);
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index e36632872d..680d0c7662 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -17,6 +17,8 @@ enum {
#include <linux/types.h>
#endif
+typedef unsigned short wchar_t;
+
#undef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
diff --git a/include/wchar.h b/include/wchar.h
index 702d8e239a..adb4f373e9 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -2,8 +2,7 @@
#define __WCHAR_H
#include <linux/types.h>
-
-typedef u16 wchar_t;
+#include <linux/stddef.h>
wchar_t *strdup_wchar(const wchar_t *src);