[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130627145116.03e2f892@nehalam.linuxnetplumber.net>
Date: Thu, 27 Jun 2013 14:51:16 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Cong Wang <amwang@...hat.com>
Cc: netdev@...r.kernel.org, Daniel Borkmann <dborkman@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Neil Horman <nhorman@...driver.com>,
Jiri Pirko <jiri@...nulli.us>,
Eric Dumazet <edumazet@...gle.com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC Patch net-next 2/5] net: introduce generic inet_pton()
On Thu, 27 Jun 2013 14:43:15 +0800
Cong Wang <amwang@...hat.com> wrote:
> Signed-off-by: Cong Wang <amwang@...hat.com>
> ---
> include/net/inet_addr.h | 20 ++++++++++++++++++++
> net/core/netpoll.c | 24 ++----------------------
> 2 files changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/include/net/inet_addr.h b/include/net/inet_addr.h
> index 66a16fe..1379287 100644
> --- a/include/net/inet_addr.h
> +++ b/include/net/inet_addr.h
> @@ -4,6 +4,7 @@
> #include <linux/in.h>
> #include <linux/in6.h>
> #include <linux/socket.h>
> +#include <linux/inet.h>
> #include <net/addrconf.h>
>
> union inet_addr {
> @@ -59,4 +60,23 @@ static inline bool inet_addr_multicast(const union inet_addr *ipa)
> }
> #endif
>
> +static inline int inet_pton(const char *str, union inet_addr *addr)
> +{
>
A couple of comments:
1. No reason for this to be inline
2. If function has same name as userspace it must have same arguments
and return value. Either:
a. rename it to kinet_pton or some other name
b. make it work the same.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists