summaryrefslogtreecommitdiffstats
path: root/lib/strnlen_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strnlen_user.c')
-rw-r--r--lib/strnlen_user.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
index 28ff554a1be8..6c0005d5dd5c 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -3,16 +3,10 @@
3#include <linux/export.h> 3#include <linux/export.h>
4#include <linux/uaccess.h> 4#include <linux/uaccess.h>
5#include <linux/mm.h> 5#include <linux/mm.h>
6#include <linux/bitops.h>
6 7
7#include <asm/word-at-a-time.h> 8#include <asm/word-at-a-time.h>
8 9
9/* Set bits in the first 'n' bytes when loaded from memory */
10#ifdef __LITTLE_ENDIAN
11# define aligned_byte_mask(n) ((1ul << 8*(n))-1)
12#else
13# define aligned_byte_mask(n) (~0xfful << (BITS_PER_LONG - 8 - 8*(n)))
14#endif
15
16/* 10/*
17 * Do a strnlen, return length of string *with* final '\0'. 11 * Do a strnlen, return length of string *with* final '\0'.
18 * 'count' is the user-supplied count, while 'max' is the 12 * 'count' is the user-supplied count, while 'max' is the