aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/gpio.h2
-rw-r--r--include/linux/hugetlb.h5
-rw-r--r--include/linux/rtnetlink.h7
-rw-r--r--include/linux/slab.h1
-rw-r--r--include/net/request_sock.h5
5 files changed, 9 insertions, 11 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index a3034d20ebd..c764a8fcb05 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -13,7 +13,7 @@
*
* While the GPIO programming interface defines valid GPIO numbers
* to be in the range 0..MAX_INT, this library restricts them to the
- * smaller range 0..ARCH_NR_GPIOS.
+ * smaller range 0..ARCH_NR_GPIOS-1.
*/
#ifndef ARCH_NR_GPIOS
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 9a71d4cc88c..32e0ef0f6e1 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -273,7 +273,10 @@ struct hstate {};
#define huge_page_mask(h) PAGE_MASK
#define huge_page_order(h) 0
#define huge_page_shift(h) PAGE_SHIFT
-#define pages_per_huge_page(h) 1
+static inline unsigned int pages_per_huge_page(struct hstate *h)
+{
+ return 1;
+}
#endif
#endif /* _LINUX_HUGETLB_H */
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index f4d386c191f..ca643b13b02 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -755,13 +755,6 @@ extern void __rtnl_unlock(void);
} \
} while(0)
-#define BUG_TRAP(x) do { \
- if (unlikely(!(x))) { \
- printk(KERN_ERR "KERNEL: assertion (%s) failed at %s (%d)\n", \
- #x, __FILE__ , __LINE__); \
- } \
-} while(0)
-
static inline u32 rtm_get_table(struct rtattr **rta, u8 table)
{
return RTA_GET_U32(rta[RTA_TABLE-1]);
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 9ff8e849940..5ff9676c1e2 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -96,6 +96,7 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
/*
* Common kmalloc functions provided by all allocators
*/
+void * __must_check __krealloc(const void *, size_t, gfp_t);
void * __must_check krealloc(const void *, size_t, gfp_t);
void kfree(const void *);
size_t ksize(const void *);
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index 0c96e7bed5d..8d6e991ef4d 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/types.h>
+#include <linux/bug.h>
#include <net/sock.h>
@@ -170,7 +171,7 @@ static inline struct request_sock *reqsk_queue_remove(struct request_sock_queue
{
struct request_sock *req = queue->rskq_accept_head;
- BUG_TRAP(req != NULL);
+ WARN_ON(req == NULL);
queue->rskq_accept_head = req->dl_next;
if (queue->rskq_accept_head == NULL)
@@ -185,7 +186,7 @@ static inline struct sock *reqsk_queue_get_child(struct request_sock_queue *queu
struct request_sock *req = reqsk_queue_remove(queue);
struct sock *child = req->sk;
- BUG_TRAP(child != NULL);
+ WARN_ON(child == NULL);
sk_acceptq_removed(parent);
__reqsk_free(req);