Commit 68f4eae7 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

net: checksum: drop the linux/uaccess.h include

net/checksum.h pulls in linux/uaccess.h which is large.

In the x86 header the include seems to not be needed at all.
ARM on the other hand does not include uaccess.h, even tho
it calls access_ok().

In the generic implementation guard the include of linux/uaccess.h
with the same condition as the code that needs it.

With this change pre-processed net/checksum.h shrinks on x86
from 30616 lines to just 1193.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a859da2
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#define __ASM_ARM_CHECKSUM_H #define __ASM_ARM_CHECKSUM_H
#include <linux/in6.h> #include <linux/in6.h>
#include <linux/uaccess.h>
/* /*
* computes the checksum of a memory block at buff, length len, * computes the checksum of a memory block at buff, length len,
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
*/ */
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/uaccess.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
/** /**
......
...@@ -18,8 +18,10 @@ ...@@ -18,8 +18,10 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#if !defined(_HAVE_ARCH_COPY_AND_CSUM_FROM_USER) || !defined(HAVE_CSUM_COPY_USER)
#include <linux/uaccess.h>
#endif
#ifndef _HAVE_ARCH_COPY_AND_CSUM_FROM_USER #ifndef _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
static __always_inline static __always_inline
......
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