From: Arnaldo Carvalho de Melo <acme@redhat•com>
To: Remi Denis-Courmont <remi.denis-courmont@nokia•com>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH 1/3] Phonet: Netlink factorization and cleanup
Date: Wed, 24 Sep 2008 13:25:07 -0300 [thread overview]
Message-ID: <20080924162507.GA13760@ghostprotocols.net> (raw)
In-Reply-To: <1222272700-28232-1-git-send-email-remi.denis-courmont@nokia.com>
Em Wed, Sep 24, 2008 at 07:11:38PM +0300, Remi Denis-Courmont escreveu:
> From: Rémi Denis-Courmont <remi.denis-courmont@nokia•com>
>
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia•com>
> ---
> net/phonet/pn_netlink.c | 91 ++++++++++++++++++-----------------------------
> 1 files changed, 35 insertions(+), 56 deletions(-)
>
> diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c
> index b1ea19a..b1770d6 100644
> --- a/net/phonet/pn_netlink.c
> +++ b/net/phonet/pn_netlink.c
> @@ -54,11 +54,16 @@ errout:
> rtnl_set_sk_err(dev_net(dev), RTNLGRP_PHONET_IFADDR, err);
> }
>
> -static int newaddr_doit(struct sk_buff *skb, struct nlmsghdr *nlm, void *attr)
> +static const struct nla_policy ifa_phonet_policy[IFA_MAX+1] = {
since you are changing the above line, please use [IFA_MAX + 1] for consistency
> + [IFA_LOCAL] = { .type = NLA_U8 },
> +};
> +
> +static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *attr)
> {
> - struct rtattr **rta = attr;
> - struct ifaddrmsg *ifm = NLMSG_DATA(nlm);
> + struct net *net = sock_net(skb->sk);
> + struct nlattr *tb[IFA_MAX+1];
Ditto
> struct net_device *dev;
> + struct ifaddrmsg *ifm;
> int err;
> u8 pnaddr;
>
> @@ -67,52 +72,28 @@ static int newaddr_doit(struct sk_buff *skb, struct nlmsghdr *nlm, void *attr)
>
next prev parent reply other threads:[~2008-09-24 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-24 16:11 [PATCH 1/3] Phonet: Netlink factorization and cleanup Remi Denis-Courmont
2008-09-24 16:25 ` Arnaldo Carvalho de Melo [this message]
2008-09-24 16:44 ` Rémi Denis-Courmont
2008-09-30 9:59 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080924162507.GA13760@ghostprotocols.net \
--to=acme@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=remi.denis-courmont@nokia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox