* [patch net-next 0/7] fix checkpatch errors @ 2013-12-20 11:57 Chen Weilong 2013-12-20 11:57 ` [patch net-next 1/7] ipv4: do clean up with spaces Chen Weilong ` (5 more replies) 0 siblings, 6 replies; 9+ messages in thread From: Chen Weilong @ 2013-12-20 11:57 UTC (permalink / raw) To: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert Cc: netdev, netfilter-devel, netfilter From: Weilong Chen <chenweilong@huawei.com> Weilong Chen (7): ipv4: do clean up with spaces ipv4: fix checkpatch error "space prohibited XXX" ipv4: fix checkpatch error with foo * bar ipv4: fix all space errors in file igmp.c ipv4: ERROR: do not initialise globals to 0 or NULL ipv4: ERROR: code indent should use tabs where possible ipv4: ERROR: do not use C99 // comments net/ipv4/cipso_ipv4.c | 6 +-- net/ipv4/igmp.c | 70 +++++++++++++++++----------------- net/ipv4/inetpeer.c | 4 +- net/ipv4/ip_options.c | 12 +++--- net/ipv4/netfilter/nf_nat_snmp_basic.c | 12 +++--- net/ipv4/syncookies.c | 2 +- net/ipv4/sysctl_net_ipv4.c | 2 +- net/ipv4/tcp_input.c | 4 +- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_probe.c | 4 +- net/ipv4/tcp_yeah.c | 18 ++++----- net/ipv4/xfrm4_mode_beet.c | 2 +- 12 files changed, 69 insertions(+), 69 deletions(-) -- 1.7.12 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch net-next 1/7] ipv4: do clean up with spaces 2013-12-20 11:57 [patch net-next 0/7] fix checkpatch errors Chen Weilong @ 2013-12-20 11:57 ` Chen Weilong 2013-12-20 11:57 ` [patch net-next 3/7] ipv4: fix checkpatch error with foo * bar Chen Weilong ` (4 subsequent siblings) 5 siblings, 0 replies; 9+ messages in thread From: Chen Weilong @ 2013-12-20 11:57 UTC (permalink / raw) To: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert Cc: netdev, netfilter-devel, netfilter From: Weilong Chen <chenweilong@huawei.com> Fix checkpatch errors like: ERROR: spaces required around that XXX Signed-off-by: Weilong Chen <chenweilong@huawei.com> --- net/ipv4/ip_options.c | 12 ++++++------ net/ipv4/tcp_input.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index ec72645..dd9d90b 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@ -167,7 +167,7 @@ int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb) soffset -= 4; if (soffset > 3) { memcpy(&faddr, &start[soffset-1], 4); - for (soffset-=4, doffset=4; soffset > 3; soffset-=4, doffset+=4) + for (soffset -= 4, doffset = 4; soffset > 3; soffset -= 4, doffset += 4) memcpy(&dptr[doffset-1], &start[soffset-1], 4); /* * RFC1812 requires to fix illegal source routes. @@ -227,7 +227,7 @@ void ip_options_fragment(struct sk_buff *skb) continue; } optlen = optptr[1]; - if (optlen<2 || optlen>l) + if (optlen < 2 || optlen > l) return; if (!IPOPT_COPIED(*optptr)) memset(optptr, IPOPT_NOOP, optlen); @@ -276,7 +276,7 @@ int ip_options_compile(struct net *net, for (l = opt->optlen; l > 0; ) { switch (*optptr) { case IPOPT_END: - for (optptr++, l--; l>0; optptr++, l--) { + for (optptr++, l--; l > 0; optptr++, l--) { if (*optptr != IPOPT_END) { *optptr = IPOPT_END; opt->is_changed = 1; @@ -289,7 +289,7 @@ int ip_options_compile(struct net *net, continue; } optlen = optptr[1]; - if (optlen<2 || optlen>l) { + if (optlen < 2 || optlen > l) { pp_ptr = optptr; goto error; } @@ -572,7 +572,7 @@ void ip_forward_options(struct sk_buff *skb) optptr = raw + opt->srr; - for ( srrptr=optptr[2], srrspace = optptr[1]; + for ( srrptr = optptr[2], srrspace = optptr[1]; srrptr <= srrspace; srrptr += 4 ) { @@ -628,7 +628,7 @@ int ip_options_rcv_srr(struct sk_buff *skb) if (rt->rt_type != RTN_LOCAL) return -EINVAL; - for (srrptr=optptr[2], srrspace = optptr[1]; srrptr <= srrspace; srrptr += 4) { + for (srrptr = optptr[2], srrspace = optptr[1]; srrptr <= srrspace; srrptr += 4) { if (srrptr + 3 > srrspace) { icmp_send(skb, ICMP_PARAMETERPROB, 0, htonl((opt->srr+2)<<24)); return -EINVAL; diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c53b7f3..f75cf15 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3686,7 +3686,7 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th) int opcode = *ptr++; int opsize; - switch(opcode) { + switch (opcode) { case TCPOPT_EOL: return NULL; case TCPOPT_NOP: @@ -4046,7 +4046,7 @@ static void tcp_sack_remove(struct tcp_sock *tp) WARN_ON(before(tp->rcv_nxt, sp->end_seq)); /* Zap this SACK, by moving forward any other SACKS. */ - for (i=this_sack+1; i < num_sacks; i++) + for (i = this_sack+1; i < num_sacks; i++) tp->selective_acks[i-1] = tp->selective_acks[i]; num_sacks--; continue; -- 1.7.12 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch net-next 3/7] ipv4: fix checkpatch error with foo * bar 2013-12-20 11:57 [patch net-next 0/7] fix checkpatch errors Chen Weilong 2013-12-20 11:57 ` [patch net-next 1/7] ipv4: do clean up with spaces Chen Weilong @ 2013-12-20 11:57 ` Chen Weilong 2013-12-20 11:57 ` [patch net-next 4/7] ipv4: fix all space errors in file igmp.c Chen Weilong ` (3 subsequent siblings) 5 siblings, 0 replies; 9+ messages in thread From: Chen Weilong @ 2013-12-20 11:57 UTC (permalink / raw) To: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert Cc: netdev, netfilter-devel, netfilter From: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Weilong Chen <chenweilong@huawei.com> --- net/ipv4/tcp_ipv4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index bbaf8cb..7297b56 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -827,7 +827,7 @@ static int tcp_v4_send_synack(struct sock *sk, struct dst_entry *dst, const struct inet_request_sock *ireq = inet_rsk(req); struct flowi4 fl4; int err = -1; - struct sk_buff * skb; + struct sk_buff *skb; /* First, grab a route. */ if (!dst && (dst = inet_csk_route_req(sk, &fl4, req)) == NULL) -- 1.7.12 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch net-next 4/7] ipv4: fix all space errors in file igmp.c 2013-12-20 11:57 [patch net-next 0/7] fix checkpatch errors Chen Weilong 2013-12-20 11:57 ` [patch net-next 1/7] ipv4: do clean up with spaces Chen Weilong 2013-12-20 11:57 ` [patch net-next 3/7] ipv4: fix checkpatch error with foo * bar Chen Weilong @ 2013-12-20 11:57 ` Chen Weilong 2013-12-20 11:57 ` [patch net-next 5/7] ipv4: ERROR: do not initialise globals to 0 or NULL Chen Weilong ` (2 subsequent siblings) 5 siblings, 0 replies; 9+ messages in thread From: Chen Weilong @ 2013-12-20 11:57 UTC (permalink / raw) To: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert Cc: netdev, netfilter-devel, netfilter From: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Weilong Chen <chenweilong@huawei.com> --- net/ipv4/igmp.c | 70 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 7defdc9..84c4329 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -310,7 +310,7 @@ igmp_scount(struct ip_mc_list *pmc, int type, int gdeleted, int sdeleted) struct ip_sf_list *psf; int scount = 0; - for (psf=pmc->sources; psf; psf=psf->sf_next) { + for (psf = pmc->sources; psf; psf = psf->sf_next) { if (!is_in(pmc, psf, type, gdeleted, sdeleted)) continue; scount++; @@ -463,7 +463,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc, } first = 1; psf_prev = NULL; - for (psf=*psf_list; psf; psf=psf_next) { + for (psf = *psf_list; psf; psf = psf_next) { __be32 *psrc; psf_next = psf->sf_next; @@ -520,7 +520,7 @@ empty_source: return skb; if (pmc->crcount || isquery) { /* make sure we have room for group header */ - if (skb && AVAILABLE(skb)<sizeof(struct igmpv3_grec)) { + if (skb && AVAILABLE(skb) < sizeof(struct igmpv3_grec)) { igmpv3_sendpack(skb); skb = NULL; /* add_grhead will get a new one */ } @@ -576,7 +576,7 @@ static void igmpv3_clear_zeros(struct ip_sf_list **ppsf) struct ip_sf_list *psf_prev, *psf_next, *psf; psf_prev = NULL; - for (psf=*ppsf; psf; psf = psf_next) { + for (psf = *ppsf; psf; psf = psf_next) { psf_next = psf->sf_next; if (psf->sf_crcount == 0) { if (psf_prev) @@ -600,7 +600,7 @@ static void igmpv3_send_cr(struct in_device *in_dev) /* deleted MCA's */ pmc_prev = NULL; - for (pmc=in_dev->mc_tomb; pmc; pmc=pmc_next) { + for (pmc = in_dev->mc_tomb; pmc; pmc = pmc_next) { pmc_next = pmc->next; if (pmc->sfmode == MCAST_INCLUDE) { type = IGMPV3_BLOCK_OLD_SOURCES; @@ -764,7 +764,7 @@ static void igmp_ifc_event(struct in_device *in_dev) static void igmp_timer_expire(unsigned long data) { - struct ip_mc_list *im=(struct ip_mc_list *)data; + struct ip_mc_list *im = (struct ip_mc_list *)data; struct in_device *in_dev = im->interface; spin_lock(&im->lock); @@ -794,10 +794,10 @@ static int igmp_xmarksources(struct ip_mc_list *pmc, int nsrcs, __be32 *srcs) int i, scount; scount = 0; - for (psf=pmc->sources; psf; psf=psf->sf_next) { + for (psf = pmc->sources; psf; psf = psf->sf_next) { if (scount == nsrcs) break; - for (i=0; i<nsrcs; i++) { + for (i = 0; i < nsrcs; i++) { /* skip inactive filters */ if (psf->sf_count[MCAST_INCLUDE] || pmc->sfcount[MCAST_EXCLUDE] != @@ -825,10 +825,10 @@ static int igmp_marksources(struct ip_mc_list *pmc, int nsrcs, __be32 *srcs) /* mark INCLUDE-mode sources */ scount = 0; - for (psf=pmc->sources; psf; psf=psf->sf_next) { + for (psf = pmc->sources; psf; psf = psf->sf_next) { if (scount == nsrcs) break; - for (i=0; i<nsrcs; i++) + for (i = 0; i < nsrcs; i++) if (srcs[i] == psf->sf_inaddr) { psf->sf_gsresp = 1; scount++; @@ -1103,7 +1103,7 @@ static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im) pmc->tomb = im->tomb; pmc->sources = im->sources; im->tomb = im->sources = NULL; - for (psf=pmc->sources; psf; psf=psf->sf_next) + for (psf = pmc->sources; psf; psf = psf->sf_next) psf->sf_crcount = pmc->crcount; } spin_unlock_bh(&im->lock); @@ -1121,7 +1121,7 @@ static void igmpv3_del_delrec(struct in_device *in_dev, __be32 multiaddr) spin_lock_bh(&in_dev->mc_tomb_lock); pmc_prev = NULL; - for (pmc=in_dev->mc_tomb; pmc; pmc=pmc->next) { + for (pmc = in_dev->mc_tomb; pmc; pmc = pmc->next) { if (pmc->multiaddr == multiaddr) break; pmc_prev = pmc; @@ -1134,7 +1134,7 @@ static void igmpv3_del_delrec(struct in_device *in_dev, __be32 multiaddr) } spin_unlock_bh(&in_dev->mc_tomb_lock); if (pmc) { - for (psf=pmc->tomb; psf; psf=psf_next) { + for (psf = pmc->tomb; psf; psf = psf_next) { psf_next = psf->sf_next; kfree(psf); } @@ -1167,7 +1167,7 @@ static void igmpv3_clear_delrec(struct in_device *in_dev) psf = pmc->tomb; pmc->tomb = NULL; spin_unlock_bh(&pmc->lock); - for (; psf; psf=psf_next) { + for (; psf; psf = psf_next) { psf_next = psf->sf_next; kfree(psf); } @@ -1557,7 +1557,7 @@ static int ip_mc_del1_src(struct ip_mc_list *pmc, int sfmode, int rv = 0; psf_prev = NULL; - for (psf=pmc->sources; psf; psf=psf->sf_next) { + for (psf = pmc->sources; psf; psf = psf->sf_next) { if (psf->sf_inaddr == *psfsrc) break; psf_prev = psf; @@ -1630,7 +1630,7 @@ static int ip_mc_del_src(struct in_device *in_dev, __be32 *pmca, int sfmode, pmc->sfcount[sfmode]--; } err = 0; - for (i=0; i<sfcount; i++) { + for (i = 0; i < sfcount; i++) { int rv = ip_mc_del1_src(pmc, sfmode, &psfsrc[i]); changerec |= rv > 0; @@ -1650,7 +1650,7 @@ static int ip_mc_del_src(struct in_device *in_dev, __be32 *pmca, int sfmode, pmc->crcount = in_dev->mr_qrv ? in_dev->mr_qrv : IGMP_Unsolicited_Report_Count; in_dev->mr_ifc_count = pmc->crcount; - for (psf=pmc->sources; psf; psf = psf->sf_next) + for (psf = pmc->sources; psf; psf = psf->sf_next) psf->sf_crcount = 0; igmp_ifc_event(pmc->interface); } else if (sf_setstate(pmc) || changerec) { @@ -1671,7 +1671,7 @@ static int ip_mc_add1_src(struct ip_mc_list *pmc, int sfmode, struct ip_sf_list *psf, *psf_prev; psf_prev = NULL; - for (psf=pmc->sources; psf; psf=psf->sf_next) { + for (psf = pmc->sources; psf; psf = psf->sf_next) { if (psf->sf_inaddr == *psfsrc) break; psf_prev = psf; @@ -1699,7 +1699,7 @@ static void sf_markstate(struct ip_mc_list *pmc) struct ip_sf_list *psf; int mca_xcount = pmc->sfcount[MCAST_EXCLUDE]; - for (psf=pmc->sources; psf; psf=psf->sf_next) + for (psf = pmc->sources; psf; psf = psf->sf_next) if (pmc->sfcount[MCAST_EXCLUDE]) { psf->sf_oldin = mca_xcount == psf->sf_count[MCAST_EXCLUDE] && @@ -1716,7 +1716,7 @@ static int sf_setstate(struct ip_mc_list *pmc) int new_in, rv; rv = 0; - for (psf=pmc->sources; psf; psf=psf->sf_next) { + for (psf = pmc->sources; psf; psf = psf->sf_next) { if (pmc->sfcount[MCAST_EXCLUDE]) { new_in = mca_xcount == psf->sf_count[MCAST_EXCLUDE] && !psf->sf_count[MCAST_INCLUDE]; @@ -1726,7 +1726,7 @@ static int sf_setstate(struct ip_mc_list *pmc) if (!psf->sf_oldin) { struct ip_sf_list *prev = NULL; - for (dpsf=pmc->tomb; dpsf; dpsf=dpsf->sf_next) { + for (dpsf = pmc->tomb; dpsf; dpsf = dpsf->sf_next) { if (dpsf->sf_inaddr == psf->sf_inaddr) break; prev = dpsf; @@ -1748,7 +1748,7 @@ static int sf_setstate(struct ip_mc_list *pmc) * add or update "delete" records if an active filter * is now inactive */ - for (dpsf=pmc->tomb; dpsf; dpsf=dpsf->sf_next) + for (dpsf = pmc->tomb; dpsf; dpsf = dpsf->sf_next) if (dpsf->sf_inaddr == psf->sf_inaddr) break; if (!dpsf) { @@ -1800,7 +1800,7 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, if (!delta) pmc->sfcount[sfmode]++; err = 0; - for (i=0; i<sfcount; i++) { + for (i = 0; i < sfcount; i++) { err = ip_mc_add1_src(pmc, sfmode, &psfsrc[i]); if (err) break; @@ -1810,7 +1810,7 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, if (!delta) pmc->sfcount[sfmode]--; - for (j=0; j<i; j++) + for (j = 0; j < i; j++) (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[j]); } else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) { #ifdef CONFIG_IP_MULTICAST @@ -1829,7 +1829,7 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, pmc->crcount = in_dev->mr_qrv ? in_dev->mr_qrv : IGMP_Unsolicited_Report_Count; in_dev->mr_ifc_count = pmc->crcount; - for (psf=pmc->sources; psf; psf = psf->sf_next) + for (psf = pmc->sources; psf; psf = psf->sf_next) psf->sf_crcount = 0; igmp_ifc_event(in_dev); } else if (sf_setstate(pmc)) { @@ -1844,12 +1844,12 @@ static void ip_mc_clear_src(struct ip_mc_list *pmc) { struct ip_sf_list *psf, *nextpsf; - for (psf=pmc->tomb; psf; psf=nextpsf) { + for (psf = pmc->tomb; psf; psf = nextpsf) { nextpsf = psf->sf_next; kfree(psf); } pmc->tomb = NULL; - for (psf=pmc->sources; psf; psf=nextpsf) { + for (psf = pmc->sources; psf; psf = nextpsf) { nextpsf = psf->sf_next; kfree(psf); } @@ -2043,7 +2043,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct if (!psl) goto done; /* err = -EADDRNOTAVAIL */ rv = !0; - for (i=0; i<psl->sl_count; i++) { + for (i = 0; i < psl->sl_count; i++) { rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr, sizeof(__be32)); if (rv == 0) @@ -2062,7 +2062,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct ip_mc_del_src(in_dev, &mreqs->imr_multiaddr, omode, 1, &mreqs->imr_sourceaddr, 1); - for (j=i+1; j<psl->sl_count; j++) + for (j = i+1; j < psl->sl_count; j++) psl->sl_addr[j-1] = psl->sl_addr[j]; psl->sl_count--; err = 0; @@ -2088,7 +2088,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct newpsl->sl_max = count; newpsl->sl_count = count - IP_SFBLOCK; if (psl) { - for (i=0; i<psl->sl_count; i++) + for (i = 0; i < psl->sl_count; i++) newpsl->sl_addr[i] = psl->sl_addr[i]; /* decrease mem now to avoid the memleak warning */ atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc); @@ -2098,7 +2098,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct psl = newpsl; } rv = 1; /* > 0 for insert logic below if sl_count is 0 */ - for (i=0; i<psl->sl_count; i++) { + for (i = 0; i < psl->sl_count; i++) { rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr, sizeof(__be32)); if (rv == 0) @@ -2106,7 +2106,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct } if (rv == 0) /* address already there is an error */ goto done; - for (j=psl->sl_count-1; j>=i; j--) + for (j = psl->sl_count-1; j >= i; j--) psl->sl_addr[j+1] = psl->sl_addr[j]; psl->sl_addr[i] = mreqs->imr_sourceaddr; psl->sl_count++; @@ -2305,7 +2305,7 @@ int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, copy_to_user(optval, gsf, GROUP_FILTER_SIZE(0))) { return -EFAULT; } - for (i=0; i<copycount; i++) { + for (i = 0; i < copycount; i++) { struct sockaddr_storage ss; psin = (struct sockaddr_in *)&ss; @@ -2350,7 +2350,7 @@ int ip_mc_sf_allow(struct sock *sk, __be32 loc_addr, __be32 rmt_addr, int dif) if (!psl) goto unlock; - for (i=0; i<psl->sl_count; i++) { + for (i = 0; i < psl->sl_count; i++) { if (psl->sl_addr[i] == rmt_addr) break; } @@ -2423,7 +2423,7 @@ int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u rv = 1; } else if (im) { if (src_addr) { - for (psf=im->sources; psf; psf=psf->sf_next) { + for (psf = im->sources; psf; psf = psf->sf_next) { if (psf->sf_inaddr == src_addr) break; } -- 1.7.12 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch net-next 5/7] ipv4: ERROR: do not initialise globals to 0 or NULL 2013-12-20 11:57 [patch net-next 0/7] fix checkpatch errors Chen Weilong ` (2 preceding siblings ...) 2013-12-20 11:57 ` [patch net-next 4/7] ipv4: fix all space errors in file igmp.c Chen Weilong @ 2013-12-20 11:57 ` Chen Weilong 2013-12-20 11:57 ` [patch net-next 6/7] ipv4: ERROR: code indent should use tabs where possible Chen Weilong 2013-12-20 11:57 ` [patch net-next 7/7] ipv4: ERROR: do not use C99 // comments Chen Weilong 5 siblings, 0 replies; 9+ messages in thread From: Chen Weilong @ 2013-12-20 11:57 UTC (permalink / raw) To: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert Cc: netdev, netfilter-devel, netfilter From: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Weilong Chen <chenweilong@huawei.com> --- net/ipv4/tcp_probe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 8b97d71..1f2d376 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c @@ -38,7 +38,7 @@ MODULE_DESCRIPTION("TCP cwnd snooper"); MODULE_LICENSE("GPL"); MODULE_VERSION("1.1"); -static int port __read_mostly = 0; +static int port __read_mostly; MODULE_PARM_DESC(port, "Port to match (0=all)"); module_param(port, int, 0); @@ -46,7 +46,7 @@ static unsigned int bufsize __read_mostly = 4096; MODULE_PARM_DESC(bufsize, "Log buffer size in packets (4096)"); module_param(bufsize, uint, 0); -static unsigned int fwmark __read_mostly = 0; +static unsigned int fwmark __read_mostly; MODULE_PARM_DESC(fwmark, "skb mark to match (0=no mark)"); module_param(fwmark, uint, 0); -- 1.7.12 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch net-next 6/7] ipv4: ERROR: code indent should use tabs where possible 2013-12-20 11:57 [patch net-next 0/7] fix checkpatch errors Chen Weilong ` (3 preceding siblings ...) 2013-12-20 11:57 ` [patch net-next 5/7] ipv4: ERROR: do not initialise globals to 0 or NULL Chen Weilong @ 2013-12-20 11:57 ` Chen Weilong 2013-12-20 17:53 ` Ben Hutchings 2013-12-20 11:57 ` [patch net-next 7/7] ipv4: ERROR: do not use C99 // comments Chen Weilong 5 siblings, 1 reply; 9+ messages in thread From: Chen Weilong @ 2013-12-20 11:57 UTC (permalink / raw) To: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert Cc: netdev, netfilter-devel, netfilter From: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Weilong Chen <chenweilong@huawei.com> --- net/ipv4/cipso_ipv4.c | 6 +++--- net/ipv4/sysctl_net_ipv4.c | 2 +- net/ipv4/xfrm4_mode_beet.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 4b59b6e..081f51a 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c @@ -1336,7 +1336,7 @@ static int cipso_v4_parsetag_rbm(const struct cipso_v4_doi *doi_def, if (tag_len > 4) { secattr->attr.mls.cat = - netlbl_secattr_catmap_alloc(GFP_ATOMIC); + netlbl_secattr_catmap_alloc(GFP_ATOMIC); if (secattr->attr.mls.cat == NULL) return -ENOMEM; @@ -1432,7 +1432,7 @@ static int cipso_v4_parsetag_enum(const struct cipso_v4_doi *doi_def, if (tag_len > 4) { secattr->attr.mls.cat = - netlbl_secattr_catmap_alloc(GFP_ATOMIC); + netlbl_secattr_catmap_alloc(GFP_ATOMIC); if (secattr->attr.mls.cat == NULL) return -ENOMEM; @@ -1527,7 +1527,7 @@ static int cipso_v4_parsetag_rng(const struct cipso_v4_doi *doi_def, if (tag_len > 4) { secattr->attr.mls.cat = - netlbl_secattr_catmap_alloc(GFP_ATOMIC); + netlbl_secattr_catmap_alloc(GFP_ATOMIC); if (secattr->attr.mls.cat == NULL) return -ENOMEM; diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index d7b63a6..1d2480a 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -700,7 +700,7 @@ static struct ctl_table ipv4_table[] = { .mode = 0644, .proc_handler = proc_dointvec }, - { + { .procname = "tcp_thin_dupack", .data = &sysctl_tcp_thin_dupack, .maxlen = sizeof(int), diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index e3db3f9..71acd00 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c @@ -48,7 +48,7 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) hdrlen += IPV4_BEET_PHMAXLEN - (optlen & 4); skb_set_network_header(skb, -x->props.header_len - - hdrlen + (XFRM_MODE_SKB_CB(skb)->ihl - sizeof(*top_iph))); + hdrlen + (XFRM_MODE_SKB_CB(skb)->ihl - sizeof(*top_iph))); if (x->sel.family != AF_INET6) skb->network_header += IPV4_BEET_PHMAXLEN; skb->mac_header = skb->network_header + -- 1.7.12 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch net-next 6/7] ipv4: ERROR: code indent should use tabs where possible 2013-12-20 11:57 ` [patch net-next 6/7] ipv4: ERROR: code indent should use tabs where possible Chen Weilong @ 2013-12-20 17:53 ` Ben Hutchings 2013-12-23 2:11 ` chenweilong 0 siblings, 1 reply; 9+ messages in thread From: Ben Hutchings @ 2013-12-20 17:53 UTC (permalink / raw) To: Chen Weilong Cc: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert, netdev, netfilter-devel, netfilter On Fri, 2013-12-20 at 19:57 +0800, Chen Weilong wrote: > From: Weilong Chen <chenweilong@huawei.com> > > > Signed-off-by: Weilong Chen <chenweilong@huawei.com> > --- > net/ipv4/cipso_ipv4.c | 6 +++--- > net/ipv4/sysctl_net_ipv4.c | 2 +- > net/ipv4/xfrm4_mode_beet.c | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c > index 4b59b6e..081f51a 100644 > --- a/net/ipv4/cipso_ipv4.c > +++ b/net/ipv4/cipso_ipv4.c > @@ -1336,7 +1336,7 @@ static int cipso_v4_parsetag_rbm(const struct cipso_v4_doi *doi_def, > > if (tag_len > 4) { > secattr->attr.mls.cat = > - netlbl_secattr_catmap_alloc(GFP_ATOMIC); > + netlbl_secattr_catmap_alloc(GFP_ATOMIC); > if (secattr->attr.mls.cat == NULL) > return -ENOMEM; > > @@ -1432,7 +1432,7 @@ static int cipso_v4_parsetag_enum(const struct cipso_v4_doi *doi_def, > > if (tag_len > 4) { > secattr->attr.mls.cat = > - netlbl_secattr_catmap_alloc(GFP_ATOMIC); > + netlbl_secattr_catmap_alloc(GFP_ATOMIC); > if (secattr->attr.mls.cat == NULL) > return -ENOMEM; > > @@ -1527,7 +1527,7 @@ static int cipso_v4_parsetag_rng(const struct cipso_v4_doi *doi_def, > > if (tag_len > 4) { > secattr->attr.mls.cat = > - netlbl_secattr_catmap_alloc(GFP_ATOMIC); > + netlbl_secattr_catmap_alloc(GFP_ATOMIC); > if (secattr->attr.mls.cat == NULL) > return -ENOMEM; > [...] These lines are still excessively indented (one extra tab is enough), and could just be appended to the lines above them: secattr->attr.mls.cat = netlbl_secattr_catmap_alloc(GFP_ATOMIC); (exactly 80 columns long). Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net-next 6/7] ipv4: ERROR: code indent should use tabs where possible 2013-12-20 17:53 ` Ben Hutchings @ 2013-12-23 2:11 ` chenweilong 0 siblings, 0 replies; 9+ messages in thread From: chenweilong @ 2013-12-23 2:11 UTC (permalink / raw) To: Ben Hutchings Cc: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert, netdev, netfilter-devel, netfilter On 2013/12/21 1:53, Ben Hutchings wrote: > On Fri, 2013-12-20 at 19:57 +0800, Chen Weilong wrote: >> From: Weilong Chen <chenweilong@huawei.com> >> >> >> Signed-off-by: Weilong Chen <chenweilong@huawei.com> >> --- >> net/ipv4/cipso_ipv4.c | 6 +++--- >> net/ipv4/sysctl_net_ipv4.c | 2 +- >> net/ipv4/xfrm4_mode_beet.c | 2 +- >> 3 files changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c >> index 4b59b6e..081f51a 100644 >> --- a/net/ipv4/cipso_ipv4.c >> +++ b/net/ipv4/cipso_ipv4.c >> @@ -1336,7 +1336,7 @@ static int cipso_v4_parsetag_rbm(const struct cipso_v4_doi *doi_def, >> >> if (tag_len > 4) { >> secattr->attr.mls.cat = >> - netlbl_secattr_catmap_alloc(GFP_ATOMIC); >> + netlbl_secattr_catmap_alloc(GFP_ATOMIC); >> if (secattr->attr.mls.cat == NULL) >> return -ENOMEM; >> >> @@ -1432,7 +1432,7 @@ static int cipso_v4_parsetag_enum(const struct cipso_v4_doi *doi_def, >> >> if (tag_len > 4) { >> secattr->attr.mls.cat = >> - netlbl_secattr_catmap_alloc(GFP_ATOMIC); >> + netlbl_secattr_catmap_alloc(GFP_ATOMIC); >> if (secattr->attr.mls.cat == NULL) >> return -ENOMEM; >> >> @@ -1527,7 +1527,7 @@ static int cipso_v4_parsetag_rng(const struct cipso_v4_doi *doi_def, >> >> if (tag_len > 4) { >> secattr->attr.mls.cat = >> - netlbl_secattr_catmap_alloc(GFP_ATOMIC); >> + netlbl_secattr_catmap_alloc(GFP_ATOMIC); >> if (secattr->attr.mls.cat == NULL) >> return -ENOMEM; >> > [...] > > These lines are still excessively indented (one extra tab is enough), > and could just be appended to the lines above them: > > secattr->attr.mls.cat = netlbl_secattr_catmap_alloc(GFP_ATOMIC); > > (exactly 80 columns long). > > Ben. > OK, That's very good, Thanks! ^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch net-next 7/7] ipv4: ERROR: do not use C99 // comments 2013-12-20 11:57 [patch net-next 0/7] fix checkpatch errors Chen Weilong ` (4 preceding siblings ...) 2013-12-20 11:57 ` [patch net-next 6/7] ipv4: ERROR: code indent should use tabs where possible Chen Weilong @ 2013-12-20 11:57 ` Chen Weilong 5 siblings, 0 replies; 9+ messages in thread From: Chen Weilong @ 2013-12-20 11:57 UTC (permalink / raw) To: davem, kuznet, jmorris, yoshfuji, kaber, steffen.klassert, herbert Cc: netdev, netfilter-devel, netfilter From: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Weilong Chen <chenweilong@huawei.com> --- net/ipv4/tcp_yeah.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c index 20cfaab..aeeae9e 100644 --- a/net/ipv4/tcp_yeah.c +++ b/net/ipv4/tcp_yeah.c @@ -15,13 +15,13 @@ #include "tcp_vegas.h" -#define TCP_YEAH_ALPHA 80 //lin number of packets queued at the bottleneck -#define TCP_YEAH_GAMMA 1 //lin fraction of queue to be removed per rtt -#define TCP_YEAH_DELTA 3 //log minimum fraction of cwnd to be removed on loss -#define TCP_YEAH_EPSILON 1 //log maximum fraction to be removed on early decongestion -#define TCP_YEAH_PHY 8 //lin maximum delta from base -#define TCP_YEAH_RHO 16 //lin minimum number of consecutive rtt to consider competition on loss -#define TCP_YEAH_ZETA 50 //lin minimum number of state switchs to reset reno_count +#define TCP_YEAH_ALPHA 80 /* lin number of packets queued at the bottleneck */ +#define TCP_YEAH_GAMMA 1 /* lin fraction of queue to be removed per rtt */ +#define TCP_YEAH_DELTA 3 /* log minimum fraction of cwnd to be removed on loss */ +#define TCP_YEAH_EPSILON 1 /* log maximum fraction to be removed on early decongestion */ +#define TCP_YEAH_PHY 8 /* lin maximum delta from base */ +#define TCP_YEAH_RHO 16 /* lin minimum number of consecutive rtt to consider competition on loss */ +#define TCP_YEAH_ZETA 50 /* lin minimum number of state switchs to reset reno_count */ #define TCP_SCALABLE_AI_CNT 100U -- 1.7.12 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-12-23 2:12 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-20 11:57 [patch net-next 0/7] fix checkpatch errors Chen Weilong 2013-12-20 11:57 ` [patch net-next 1/7] ipv4: do clean up with spaces Chen Weilong 2013-12-20 11:57 ` [patch net-next 3/7] ipv4: fix checkpatch error with foo * bar Chen Weilong 2013-12-20 11:57 ` [patch net-next 4/7] ipv4: fix all space errors in file igmp.c Chen Weilong 2013-12-20 11:57 ` [patch net-next 5/7] ipv4: ERROR: do not initialise globals to 0 or NULL Chen Weilong 2013-12-20 11:57 ` [patch net-next 6/7] ipv4: ERROR: code indent should use tabs where possible Chen Weilong 2013-12-20 17:53 ` Ben Hutchings 2013-12-23 2:11 ` chenweilong 2013-12-20 11:57 ` [patch net-next 7/7] ipv4: ERROR: do not use C99 // comments Chen Weilong
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).