* [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" @ 2014-02-17 8:53 Wangyufen 2014-02-17 8:53 ` [PATCH net-next 2/4] ipv6: fix checkpatch errors with brace " Wangyufen ` (3 more replies) 0 siblings, 4 replies; 8+ messages in thread From: Wangyufen @ 2014-02-17 8:53 UTC (permalink / raw) To: davem; +Cc: netdev From: Wang Yufen <wangyufen@huawei.com> ERROR: spaces required and "(foo*)" should be "(foo *)" Signed-off-by: Wang Yufen <wangyufen@huawei.com> --- net/netlink/af_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index fdf5135..e42214b 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1460,7 +1460,7 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr, if (nlk->netlink_bind && nlk->groups[0]) { int i; - for (i=0; i<nlk->ngroups; i++) { + for (i = 0; i < nlk->ngroups; i++) { if (test_bit(i, nlk->groups)) nlk->netlink_bind(i); } @@ -2549,7 +2549,7 @@ __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int fla struct nlmsghdr *nlh; int size = nlmsg_msg_size(len); - nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size)); + nlh = (struct nlmsghdr *)skb_put(skb, NLMSG_ALIGN(size)); nlh->nlmsg_type = type; nlh->nlmsg_len = size; nlh->nlmsg_flags = flags; -- 1.7.12 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 2/4] ipv6: fix checkpatch errors with brace and "foo *bar" 2014-02-17 8:53 [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" Wangyufen @ 2014-02-17 8:53 ` Wangyufen 2014-02-17 21:58 ` David Miller 2014-02-17 8:53 ` [PATCH 3/4] ipv6: fix checkpatch errors with space required or prohibited Wangyufen ` (2 subsequent siblings) 3 siblings, 1 reply; 8+ messages in thread From: Wangyufen @ 2014-02-17 8:53 UTC (permalink / raw) To: davem; +Cc: netdev From: Wang Yufen <wangyufen@huawei.com> Signed-off-by: Wang Yufen <wangyufen@huawei.com> --- net/ipv6/addrlabel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index b30ad37..86829d3 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -28,8 +28,7 @@ /* * Policy Table */ -struct ip6addrlbl_entry -{ +struct ip6addrlbl_entry { #ifdef CONFIG_NET_NS struct net *lbl_net; #endif @@ -527,7 +526,7 @@ static inline int ip6addrlbl_msgsize(void) + nla_total_size(4); /* IFAL_LABEL */ } -static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh) +static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr *nlh) { struct net *net = sock_net(in_skb->sk); struct ifaddrlblmsg *ifal; -- 1.7.12 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 2/4] ipv6: fix checkpatch errors with brace and "foo *bar" 2014-02-17 8:53 ` [PATCH net-next 2/4] ipv6: fix checkpatch errors with brace " Wangyufen @ 2014-02-17 21:58 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2014-02-17 21:58 UTC (permalink / raw) To: wangyufen; +Cc: netdev From: Wangyufen <wangyufen@huawei.com> Date: Mon, 17 Feb 2014 16:53:33 +0800 > From: Wang Yufen <wangyufen@huawei.com> > > > Signed-off-by: Wang Yufen <wangyufen@huawei.com> Applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] ipv6: fix checkpatch errors with space required or prohibited 2014-02-17 8:53 [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" Wangyufen 2014-02-17 8:53 ` [PATCH net-next 2/4] ipv6: fix checkpatch errors with brace " Wangyufen @ 2014-02-17 8:53 ` Wangyufen 2014-02-17 21:58 ` David Miller 2014-02-17 8:53 ` [PATCH 4/4] ipv6:fix checkpatch errors with assignment in if condition Wangyufen 2014-02-17 21:57 ` [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" David Miller 3 siblings, 1 reply; 8+ messages in thread From: Wangyufen @ 2014-02-17 8:53 UTC (permalink / raw) To: davem; +Cc: netdev From: Wang Yufen <wangyufen@huawei.com> Signed-off-by: Wang Yufen <wangyufen@huawei.com> --- net/ipv6/addrlabel.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 86829d3..d702406 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -6,7 +6,7 @@ */ /* * Author: - * YOSHIFUJI Hideaki @ USAGI/WIDE Project <yoshfuji@linux-ipv6.org> + * YOSHIFUJI Hideaki @ USAGI/WIDE Project <yoshfuji@linux-ipv6.org> */ #include <linux/kernel.h> @@ -22,7 +22,7 @@ #if 0 #define ADDRLABEL(x...) printk(x) #else -#define ADDRLABEL(x...) do { ; } while(0) +#define ADDRLABEL(x...) do { ; } while (0) #endif /* @@ -87,39 +87,39 @@ static const __net_initconst struct ip6addrlbl_init_table { /* ::/0 */ .prefix = &in6addr_any, .label = 1, - },{ /* fc00::/7 */ - .prefix = &(struct in6_addr){{{ 0xfc }}}, + }, { /* fc00::/7 */ + .prefix = &(struct in6_addr){ { { 0xfc } } } , .prefixlen = 7, .label = 5, - },{ /* fec0::/10 */ - .prefix = &(struct in6_addr){{{ 0xfe, 0xc0 }}}, + }, { /* fec0::/10 */ + .prefix = &(struct in6_addr){ { { 0xfe, 0xc0 } } }, .prefixlen = 10, .label = 11, - },{ /* 2002::/16 */ - .prefix = &(struct in6_addr){{{ 0x20, 0x02 }}}, + }, { /* 2002::/16 */ + .prefix = &(struct in6_addr){ { { 0x20, 0x02 } } }, .prefixlen = 16, .label = 2, - },{ /* 3ffe::/16 */ - .prefix = &(struct in6_addr){{{ 0x3f, 0xfe }}}, + }, { /* 3ffe::/16 */ + .prefix = &(struct in6_addr){ { { 0x3f, 0xfe } } }, .prefixlen = 16, .label = 12, - },{ /* 2001::/32 */ - .prefix = &(struct in6_addr){{{ 0x20, 0x01 }}}, + }, { /* 2001::/32 */ + .prefix = &(struct in6_addr){ { { 0x20, 0x01 } } }, .prefixlen = 32, .label = 6, - },{ /* 2001:10::/28 */ - .prefix = &(struct in6_addr){{{ 0x20, 0x01, 0x00, 0x10 }}}, + }, { /* 2001:10::/28 */ + .prefix = &(struct in6_addr){ { { 0x20, 0x01, 0x00, 0x10 } } }, .prefixlen = 28, .label = 7, - },{ /* ::ffff:0:0 */ - .prefix = &(struct in6_addr){{{ [10] = 0xff, [11] = 0xff }}}, + }, { /* ::ffff:0:0 */ + .prefix = &(struct in6_addr){ { { [10] = 0xff, [11] = 0xff } } }, .prefixlen = 96, .label = 4, - },{ /* ::/96 */ + }, { /* ::/96 */ .prefix = &in6addr_any, .prefixlen = 96, .label = 3, - },{ /* ::1/128 */ + }, { /* ::1/128 */ .prefix = &in6addr_loopback, .prefixlen = 128, .label = 0, @@ -440,7 +440,7 @@ static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh) if (label == IPV6_ADDR_LABEL_DEFAULT) return -EINVAL; - switch(nlh->nlmsg_type) { + switch (nlh->nlmsg_type) { case RTM_NEWADDRLABEL: if (ifal->ifal_index && !__dev_get_by_index(net, ifal->ifal_index)) -- 1.7.12 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/4] ipv6: fix checkpatch errors with space required or prohibited 2014-02-17 8:53 ` [PATCH 3/4] ipv6: fix checkpatch errors with space required or prohibited Wangyufen @ 2014-02-17 21:58 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2014-02-17 21:58 UTC (permalink / raw) To: wangyufen; +Cc: netdev From: Wangyufen <wangyufen@huawei.com> Date: Mon, 17 Feb 2014 16:53:34 +0800 > From: Wang Yufen <wangyufen@huawei.com> > > > Signed-off-by: Wang Yufen <wangyufen@huawei.com> Applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/4] ipv6:fix checkpatch errors with assignment in if condition 2014-02-17 8:53 [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" Wangyufen 2014-02-17 8:53 ` [PATCH net-next 2/4] ipv6: fix checkpatch errors with brace " Wangyufen 2014-02-17 8:53 ` [PATCH 3/4] ipv6: fix checkpatch errors with space required or prohibited Wangyufen @ 2014-02-17 8:53 ` Wangyufen 2014-02-17 21:58 ` David Miller 2014-02-17 21:57 ` [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" David Miller 3 siblings, 1 reply; 8+ messages in thread From: Wangyufen @ 2014-02-17 8:53 UTC (permalink / raw) To: davem; +Cc: netdev From: Wang Yufen <wangyufen@huawei.com> Signed-off-by: Wang Yufen <wangyufen@huawei.com> --- net/ipv6/addrlabel.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index d702406..731e1e1 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -504,12 +504,13 @@ static int ip6addrlbl_dump(struct sk_buff *skb, struct netlink_callback *cb) hlist_for_each_entry_rcu(p, &ip6addrlbl_table.head, list) { if (idx >= s_idx && net_eq(ip6addrlbl_net(p), net)) { - if ((err = ip6addrlbl_fill(skb, p, - ip6addrlbl_table.seq, - NETLINK_CB(cb->skb).portid, - cb->nlh->nlmsg_seq, - RTM_NEWADDRLABEL, - NLM_F_MULTI)) <= 0) + err = ip6addrlbl_fill(skb, p, + ip6addrlbl_table.seq, + NETLINK_CB(cb->skb).portid, + cb->nlh->nlmsg_seq, + RTM_NEWADDRLABEL, + NLM_F_MULTI); + if (err <= 0) break; } idx++; @@ -567,7 +568,8 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr *nlh) goto out; } - if (!(skb = nlmsg_new(ip6addrlbl_msgsize(), GFP_KERNEL))) { + skb = nlmsg_new(ip6addrlbl_msgsize(), GFP_KERNEL); + if (!skb) { ip6addrlbl_put(p); return -ENOBUFS; } -- 1.7.12 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] ipv6:fix checkpatch errors with assignment in if condition 2014-02-17 8:53 ` [PATCH 4/4] ipv6:fix checkpatch errors with assignment in if condition Wangyufen @ 2014-02-17 21:58 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2014-02-17 21:58 UTC (permalink / raw) To: wangyufen; +Cc: netdev From: Wangyufen <wangyufen@huawei.com> Date: Mon, 17 Feb 2014 16:53:35 +0800 > From: Wang Yufen <wangyufen@huawei.com> > > > Signed-off-by: Wang Yufen <wangyufen@huawei.com> Applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" 2014-02-17 8:53 [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" Wangyufen ` (2 preceding siblings ...) 2014-02-17 8:53 ` [PATCH 4/4] ipv6:fix checkpatch errors with assignment in if condition Wangyufen @ 2014-02-17 21:57 ` David Miller 3 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2014-02-17 21:57 UTC (permalink / raw) To: wangyufen; +Cc: netdev From: Wangyufen <wangyufen@huawei.com> Date: Mon, 17 Feb 2014 16:53:32 +0800 > From: Wang Yufen <wangyufen@huawei.com> > > ERROR: spaces required and "(foo*)" should be "(foo *)" > > Signed-off-by: Wang Yufen <wangyufen@huawei.com> Applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-02-17 21:58 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-02-17 8:53 [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" Wangyufen 2014-02-17 8:53 ` [PATCH net-next 2/4] ipv6: fix checkpatch errors with brace " Wangyufen 2014-02-17 21:58 ` David Miller 2014-02-17 8:53 ` [PATCH 3/4] ipv6: fix checkpatch errors with space required or prohibited Wangyufen 2014-02-17 21:58 ` David Miller 2014-02-17 8:53 ` [PATCH 4/4] ipv6:fix checkpatch errors with assignment in if condition Wangyufen 2014-02-17 21:58 ` David Miller 2014-02-17 21:57 ` [PATCH net-next 1/4] netlink: fix checkpatch errors space and "foo *bar" David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).