diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2011-01-13 15:06:28 +0900 | 
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-13 15:06:28 +0900 | 
| commit | f43dc23d5ea91fca257be02138a255f02d98e806 (patch) | |
| tree | b29722f6e965316e90ac97abf79923ced250dc21 /net/core/utils.c | |
| parent | f8e53553f452dcbf67cb89c8cba63a1cd6eb4cc0 (diff) | |
| parent | 4162cf64973df51fc885825bc9ca4d055891c49f (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into common/serial-rework
Conflicts:
	arch/sh/kernel/cpu/sh2/setup-sh7619.c
	arch/sh/kernel/cpu/sh2a/setup-mxg.c
	arch/sh/kernel/cpu/sh2a/setup-sh7201.c
	arch/sh/kernel/cpu/sh2a/setup-sh7203.c
	arch/sh/kernel/cpu/sh2a/setup-sh7206.c
	arch/sh/kernel/cpu/sh3/setup-sh7705.c
	arch/sh/kernel/cpu/sh3/setup-sh770x.c
	arch/sh/kernel/cpu/sh3/setup-sh7710.c
	arch/sh/kernel/cpu/sh3/setup-sh7720.c
	arch/sh/kernel/cpu/sh4/setup-sh4-202.c
	arch/sh/kernel/cpu/sh4/setup-sh7750.c
	arch/sh/kernel/cpu/sh4/setup-sh7760.c
	arch/sh/kernel/cpu/sh4a/setup-sh7343.c
	arch/sh/kernel/cpu/sh4a/setup-sh7366.c
	arch/sh/kernel/cpu/sh4a/setup-sh7722.c
	arch/sh/kernel/cpu/sh4a/setup-sh7723.c
	arch/sh/kernel/cpu/sh4a/setup-sh7724.c
	arch/sh/kernel/cpu/sh4a/setup-sh7763.c
	arch/sh/kernel/cpu/sh4a/setup-sh7770.c
	arch/sh/kernel/cpu/sh4a/setup-sh7780.c
	arch/sh/kernel/cpu/sh4a/setup-sh7785.c
	arch/sh/kernel/cpu/sh4a/setup-sh7786.c
	arch/sh/kernel/cpu/sh4a/setup-shx3.c
	arch/sh/kernel/cpu/sh5/setup-sh5.c
	drivers/serial/sh-sci.c
	drivers/serial/sh-sci.h
	include/linux/serial_sci.h
Diffstat (limited to 'net/core/utils.c')
| -rw-r--r-- | net/core/utils.c | 20 | 
1 files changed, 10 insertions, 10 deletions
| diff --git a/net/core/utils.c b/net/core/utils.c index 83221aee708..5fea0ab2190 100644 --- a/net/core/utils.c +++ b/net/core/utils.c @@ -24,6 +24,8 @@  #include <linux/types.h>  #include <linux/percpu.h>  #include <linux/init.h> +#include <linux/ratelimit.h> +  #include <net/sock.h>  #include <asm/byteorder.h> @@ -73,9 +75,8 @@ __be32 in_aton(const char *str)  				str++;  		}  	} -	return(htonl(l)); +	return htonl(l);  } -  EXPORT_SYMBOL(in_aton);  #define IN6PTON_XDIGIT		0x00010000 @@ -91,18 +92,19 @@ EXPORT_SYMBOL(in_aton);  static inline int xdigit2bin(char c, int delim)  { +	int val; +  	if (c == delim || c == '\0')  		return IN6PTON_DELIM;  	if (c == ':')  		return IN6PTON_COLON_MASK;  	if (c == '.')  		return IN6PTON_DOT; -	if (c >= '0' && c <= '9') -		return (IN6PTON_XDIGIT | IN6PTON_DIGIT| (c - '0')); -	if (c >= 'a' && c <= 'f') -		return (IN6PTON_XDIGIT | (c - 'a' + 10)); -	if (c >= 'A' && c <= 'F') -		return (IN6PTON_XDIGIT | (c - 'A' + 10)); + +	val = hex_to_bin(c); +	if (val >= 0) +		return val | IN6PTON_XDIGIT | (val < 10 ? IN6PTON_DIGIT : 0); +  	if (delim == -1)  		return IN6PTON_DELIM;  	return IN6PTON_UNKNOWN; @@ -160,7 +162,6 @@ out:  		*end = s;  	return ret;  } -  EXPORT_SYMBOL(in4_pton);  int in6_pton(const char *src, int srclen, @@ -278,7 +279,6 @@ out:  		*end = s;  	return ret;  } -  EXPORT_SYMBOL(in6_pton);  void inet_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb, | 
