* [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4
@ 2015-10-14 22:17 Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 1/6] netfilter-ipv4: Line layout whitespace fixes Ian Morris
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Ian Morris @ 2015-10-14 22:17 UTC (permalink / raw)
To: netfilter-devel, netdev; +Cc: Ian Morris
This series of patches improves the coding style of the netfilter-ipv4
code by addressing some issues detected by checkpatch.
The changes were previously submitted as part of a larger monolithic
patch but on advice from Pablo, these are being re-sent in smaller,
more structured batches.
Ian Morris (6):
netfilter-ipv4: Line layout whitespace fixes
netfilter-ipv4: label placement
netfilter-ipv4: ternary operator layout
netfilter-ipv4: function definition layout
netfilter-ipv4: code indentation
netfilter-ipv4: whitespace around operators
net/ipv4/netfilter/arp_tables.c | 12 ++++++------
net/ipv4/netfilter/ip_tables.c | 20 ++++++++++----------
net/ipv4/netfilter/ipt_CLUSTERIP.c | 8 ++++----
net/ipv4/netfilter/ipt_ECN.c | 2 +-
net/ipv4/netfilter/ipt_SYNPROXY.c | 2 +-
net/ipv4/netfilter/ipt_ah.c | 2 +-
net/ipv4/netfilter/iptable_security.c | 2 +-
net/ipv4/netfilter/nf_nat_pptp.c | 2 +-
net/ipv4/netfilter/nf_nat_snmp_basic.c | 4 ++--
9 files changed, 27 insertions(+), 27 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH nf-next 1/6] netfilter-ipv4: Line layout whitespace fixes
2015-10-14 22:17 [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Ian Morris
@ 2015-10-14 22:17 ` Ian Morris
2015-10-16 17:22 ` Pablo Neira Ayuso
2015-10-14 22:17 ` [PATCH nf-next 2/6] netfilter-ipv4: label placement Ian Morris
` (5 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Ian Morris @ 2015-10-14 22:17 UTC (permalink / raw)
To: netfilter-devel, netdev; +Cc: Ian Morris
Cleanses some whitespace issues by removing a leading space before a tab.
No changes detected by objdiff.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
---
net/ipv4/netfilter/ipt_ECN.c | 2 +-
net/ipv4/netfilter/nf_nat_pptp.c | 2 +-
net/ipv4/netfilter/nf_nat_snmp_basic.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c
index 2707652..6592708 100644
--- a/net/ipv4/netfilter/ipt_ECN.c
+++ b/net/ipv4/netfilter/ipt_ECN.c
@@ -24,7 +24,7 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
MODULE_DESCRIPTION("Xtables: Explicit Congestion Notification (ECN) flag modification");
/* set ECT codepoint from IP header.
- * return false if there was an error. */
+ * return false if there was an error. */
static inline bool
set_ect_ip(struct sk_buff *skb, const struct ipt_ECN_info *einfo)
{
diff --git a/net/ipv4/netfilter/nf_nat_pptp.c b/net/ipv4/netfilter/nf_nat_pptp.c
index 657d230..d5726f7 100644
--- a/net/ipv4/netfilter/nf_nat_pptp.c
+++ b/net/ipv4/netfilter/nf_nat_pptp.c
@@ -16,7 +16,7 @@
* (C) 2006-2012 Patrick McHardy <kaber@trash.net>
*
* TODO: - NAT to a unique tuple, not to TCP source port
- * (needs netfilter tuple reservation)
+ * (needs netfilter tuple reservation)
*/
#include <linux/module.h>
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index 7c67667..8e3dffa 100644
--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -891,7 +891,7 @@ static void fast_csum(__sum16 *csum,
/*
* Mangle IP address.
- * - begin points to the start of the snmp messgae
+ * - begin points to the start of the snmp messgae
* - addr points to the start of the address
*/
static inline void mangle_address(unsigned char *begin,
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH nf-next 2/6] netfilter-ipv4: label placement
2015-10-14 22:17 [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 1/6] netfilter-ipv4: Line layout whitespace fixes Ian Morris
@ 2015-10-14 22:17 ` Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 3/6] netfilter-ipv4: ternary operator layout Ian Morris
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Ian Morris @ 2015-10-14 22:17 UTC (permalink / raw)
To: netfilter-devel, netdev; +Cc: Ian Morris
Whitespace cleansing: Labels should not be indented.
No changes detected by objdiff.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
---
net/ipv4/netfilter/arp_tables.c | 2 +-
net/ipv4/netfilter/ip_tables.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 2dad3e1..7300616 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -468,7 +468,7 @@ static int mark_source_chains(const struct xt_table_info *newinfo,
pos = newpos;
}
}
- next:
+next:
duprintf("Finished chain %u\n", hook);
}
return 1;
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 42d0946..3be2a4d 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -549,7 +549,7 @@ mark_source_chains(const struct xt_table_info *newinfo,
pos = newpos;
}
}
- next:
+next:
duprintf("Finished chain %u\n", hook);
}
return 1;
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH nf-next 3/6] netfilter-ipv4: ternary operator layout
2015-10-14 22:17 [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 1/6] netfilter-ipv4: Line layout whitespace fixes Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 2/6] netfilter-ipv4: label placement Ian Morris
@ 2015-10-14 22:17 ` Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 4/6] netfilter-ipv4: function definition layout Ian Morris
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Ian Morris @ 2015-10-14 22:17 UTC (permalink / raw)
To: netfilter-devel, netdev; +Cc: Ian Morris
Correct whitespace layout of ternary operators in the netfilter-ipv4
code.
No changes detected by objdiff.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
---
net/ipv4/netfilter/arp_tables.c | 4 ++--
net/ipv4/netfilter/ip_tables.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 7300616..eb6663bd 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -186,7 +186,7 @@ static inline int arp_packet_match(const struct arphdr *arphdr,
if (FWINV(ret != 0, ARPT_INV_VIA_IN)) {
dprintf("VIA in mismatch (%s vs %s).%s\n",
indev, arpinfo->iniface,
- arpinfo->invflags&ARPT_INV_VIA_IN ?" (INV)":"");
+ arpinfo->invflags & ARPT_INV_VIA_IN ? " (INV)" : "");
return 0;
}
@@ -195,7 +195,7 @@ static inline int arp_packet_match(const struct arphdr *arphdr,
if (FWINV(ret != 0, ARPT_INV_VIA_OUT)) {
dprintf("VIA out mismatch (%s vs %s).%s\n",
outdev, arpinfo->outiface,
- arpinfo->invflags&ARPT_INV_VIA_OUT ?" (INV)":"");
+ arpinfo->invflags & ARPT_INV_VIA_OUT ? " (INV)" : "");
return 0;
}
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 3be2a4d..08b7ab0 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -102,7 +102,7 @@ ip_packet_match(const struct iphdr *ip,
if (FWINV(ret != 0, IPT_INV_VIA_IN)) {
dprintf("VIA in mismatch (%s vs %s).%s\n",
indev, ipinfo->iniface,
- ipinfo->invflags&IPT_INV_VIA_IN ?" (INV)":"");
+ ipinfo->invflags & IPT_INV_VIA_IN ? " (INV)" : "");
return false;
}
@@ -111,7 +111,7 @@ ip_packet_match(const struct iphdr *ip,
if (FWINV(ret != 0, IPT_INV_VIA_OUT)) {
dprintf("VIA out mismatch (%s vs %s).%s\n",
outdev, ipinfo->outiface,
- ipinfo->invflags&IPT_INV_VIA_OUT ?" (INV)":"");
+ ipinfo->invflags & IPT_INV_VIA_OUT ? " (INV)" : "");
return false;
}
@@ -120,7 +120,7 @@ ip_packet_match(const struct iphdr *ip,
FWINV(ip->protocol != ipinfo->proto, IPT_INV_PROTO)) {
dprintf("Packet protocol %hi does not match %hi.%s\n",
ip->protocol, ipinfo->proto,
- ipinfo->invflags&IPT_INV_PROTO ? " (INV)":"");
+ ipinfo->invflags & IPT_INV_PROTO ? " (INV)" : "");
return false;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH nf-next 4/6] netfilter-ipv4: function definition layout
2015-10-14 22:17 [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Ian Morris
` (2 preceding siblings ...)
2015-10-14 22:17 ` [PATCH nf-next 3/6] netfilter-ipv4: ternary operator layout Ian Morris
@ 2015-10-14 22:17 ` Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 5/6] netfilter-ipv4: code indentation Ian Morris
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Ian Morris @ 2015-10-14 22:17 UTC (permalink / raw)
To: netfilter-devel, netdev; +Cc: Ian Morris
Use tabs instead of spaces to indent second line of parameters in
function definitions.
No changes detected by objdiff.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
---
net/ipv4/netfilter/arp_tables.c | 6 +++---
net/ipv4/netfilter/ip_tables.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index eb6663bd..11dccba 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -632,7 +632,7 @@ static inline void cleanup_entry(struct arpt_entry *e)
* newinfo).
*/
static int translate_table(struct xt_table_info *newinfo, void *entry0,
- const struct arpt_replace *repl)
+ const struct arpt_replace *repl)
{
struct arpt_entry *iter;
unsigned int i;
@@ -892,7 +892,7 @@ static int compat_table_info(const struct xt_table_info *info,
#endif
static int get_info(struct net *net, void __user *user,
- const int *len, int compat)
+ const int *len, int compat)
{
char name[XT_TABLE_MAXNAMELEN];
struct xt_table *t;
@@ -1069,7 +1069,7 @@ static int __do_replace(struct net *net, const char *name,
}
static int do_replace(struct net *net, const void __user *user,
- unsigned int len)
+ unsigned int len)
{
int ret;
struct arpt_replace tmp;
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 08b7ab0..3991a87 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -804,7 +804,7 @@ cleanup_entry(struct ipt_entry *e, struct net *net)
newinfo) */
static int
translate_table(struct net *net, struct xt_table_info *newinfo, void *entry0,
- const struct ipt_replace *repl)
+ const struct ipt_replace *repl)
{
struct ipt_entry *iter;
unsigned int i;
@@ -1078,7 +1078,7 @@ static int compat_table_info(const struct xt_table_info *info,
#endif
static int get_info(struct net *net, void __user *user,
- const int *len, int compat)
+ const int *len, int compat)
{
char name[XT_TABLE_MAXNAMELEN];
struct xt_table *t;
@@ -1304,7 +1304,7 @@ do_replace(struct net *net, const void __user *user, unsigned int len)
static int
do_add_counters(struct net *net, const void __user *user,
- unsigned int len, int compat)
+ unsigned int len, int compat)
{
unsigned int i;
struct xt_counters_info tmp;
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH nf-next 5/6] netfilter-ipv4: code indentation
2015-10-14 22:17 [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Ian Morris
` (3 preceding siblings ...)
2015-10-14 22:17 ` [PATCH nf-next 4/6] netfilter-ipv4: function definition layout Ian Morris
@ 2015-10-14 22:17 ` Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 6/6] netfilter-ipv4: whitespace around operators Ian Morris
2015-10-16 17:20 ` [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Pablo Neira Ayuso
6 siblings, 0 replies; 9+ messages in thread
From: Ian Morris @ 2015-10-14 22:17 UTC (permalink / raw)
To: netfilter-devel, netdev; +Cc: Ian Morris
Use tabs instead of spaces to indent code.
No changes detected by objdiff.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
---
net/ipv4/netfilter/ip_tables.c | 6 +++---
net/ipv4/netfilter/ipt_SYNPROXY.c | 2 +-
net/ipv4/netfilter/iptable_security.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 3991a87..b99affa 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -431,8 +431,8 @@ ipt_do_table(struct sk_buff *skb,
} while (!acpar.hotdrop);
pr_debug("Exiting %s; sp at %u\n", __func__, stackidx);
- xt_write_recseq_end(addend);
- local_bh_enable();
+ xt_write_recseq_end(addend);
+ local_bh_enable();
#ifdef DEBUG_ALLOW_ALL
return NF_ACCEPT;
@@ -484,7 +484,7 @@ mark_source_chains(const struct xt_table_info *newinfo,
unsigned int oldpos, size;
if ((strcmp(t->target.u.user.name,
- XT_STANDARD_TARGET) == 0) &&
+ XT_STANDARD_TARGET) == 0) &&
t->verdict < -NF_MAX_VERDICT - 1) {
duprintf("mark_source_chains: bad "
"negative verdict (%i)\n",
diff --git a/net/ipv4/netfilter/ipt_SYNPROXY.c b/net/ipv4/netfilter/ipt_SYNPROXY.c
index 6a6e762..ff746b33 100644
--- a/net/ipv4/netfilter/ipt_SYNPROXY.c
+++ b/net/ipv4/netfilter/ipt_SYNPROXY.c
@@ -231,7 +231,7 @@ synproxy_send_client_ack(const struct synproxy_net *snet,
synproxy_build_options(nth, opts);
synproxy_send_tcp(snet, skb, nskb, skb->nfct, IP_CT_ESTABLISHED_REPLY,
- niph, nth, tcp_hdr_size);
+ niph, nth, tcp_hdr_size);
}
static bool
diff --git a/net/ipv4/netfilter/iptable_security.c b/net/ipv4/netfilter/iptable_security.c
index f534e2f..c2e23d5 100644
--- a/net/ipv4/netfilter/iptable_security.c
+++ b/net/ipv4/netfilter/iptable_security.c
@@ -79,7 +79,7 @@ static int __init iptable_security_init(void)
int ret;
ret = register_pernet_subsys(&iptable_security_net_ops);
- if (ret < 0)
+ if (ret < 0)
return ret;
sectbl_ops = xt_hook_link(&security_table, iptable_security_hook);
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH nf-next 6/6] netfilter-ipv4: whitespace around operators
2015-10-14 22:17 [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Ian Morris
` (4 preceding siblings ...)
2015-10-14 22:17 ` [PATCH nf-next 5/6] netfilter-ipv4: code indentation Ian Morris
@ 2015-10-14 22:17 ` Ian Morris
2015-10-16 17:20 ` [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Pablo Neira Ayuso
6 siblings, 0 replies; 9+ messages in thread
From: Ian Morris @ 2015-10-14 22:17 UTC (permalink / raw)
To: netfilter-devel, netdev; +Cc: Ian Morris
This patch cleanses whitespace around arithmetical operators.
No changes detected by objdiff.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
---
net/ipv4/netfilter/ipt_CLUSTERIP.c | 8 ++++----
net/ipv4/netfilter/ipt_ah.c | 2 +-
net/ipv4/netfilter/nf_nat_snmp_basic.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 3f32c03..4a9e6db 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -492,14 +492,14 @@ static void arp_print(struct arp_payload *payload)
{
#define HBUFFERLEN 30
char hbuffer[HBUFFERLEN];
- int j,k;
+ int j, k;
- for (k=0, j=0; k < HBUFFERLEN-3 && j < ETH_ALEN; j++) {
+ for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < ETH_ALEN; j++) {
hbuffer[k++] = hex_asc_hi(payload->src_hw[j]);
hbuffer[k++] = hex_asc_lo(payload->src_hw[j]);
- hbuffer[k++]=':';
+ hbuffer[k++] = ':';
}
- hbuffer[--k]='\0';
+ hbuffer[--k] = '\0';
pr_debug("src %pI4@%s, dst %pI4\n",
&payload->src_ip, hbuffer, &payload->dst_ip);
diff --git a/net/ipv4/netfilter/ipt_ah.c b/net/ipv4/netfilter/ipt_ah.c
index 14a2aa8..a787d07 100644
--- a/net/ipv4/netfilter/ipt_ah.c
+++ b/net/ipv4/netfilter/ipt_ah.c
@@ -25,7 +25,7 @@ spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert)
bool r;
pr_debug("spi_match:%c 0x%x <= 0x%x <= 0x%x\n",
invert ? '!' : ' ', min, spi, max);
- r=(spi >= min && spi <= max) ^ invert;
+ r = (spi >= min && spi <= max) ^ invert;
pr_debug(" result %s\n", r ? "PASS" : "FAILED");
return r;
}
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index 8e3dffa..89be5c5 100644
--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -1156,7 +1156,7 @@ static int snmp_parse_mangle(unsigned char *msg,
}
if (obj->type == SNMP_IPADDR)
- mangle_address(ctx.begin, ctx.pointer - 4 , map, check);
+ mangle_address(ctx.begin, ctx.pointer - 4, map, check);
kfree(obj->id);
kfree(obj);
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4
2015-10-14 22:17 [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Ian Morris
` (5 preceding siblings ...)
2015-10-14 22:17 ` [PATCH nf-next 6/6] netfilter-ipv4: whitespace around operators Ian Morris
@ 2015-10-16 17:20 ` Pablo Neira Ayuso
6 siblings, 0 replies; 9+ messages in thread
From: Pablo Neira Ayuso @ 2015-10-16 17:20 UTC (permalink / raw)
To: Ian Morris; +Cc: netfilter-devel, netdev
On Wed, Oct 14, 2015 at 11:17:02PM +0100, Ian Morris wrote:
> This series of patches improves the coding style of the netfilter-ipv4
> code by addressing some issues detected by checkpatch.
>
> The changes were previously submitted as part of a larger monolithic
> patch but on advice from Pablo, these are being re-sent in smaller,
> more structured batches.
Series applied, except patch 1/6 that I have kept back. I'll follow up
with an explanation.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH nf-next 1/6] netfilter-ipv4: Line layout whitespace fixes
2015-10-14 22:17 ` [PATCH nf-next 1/6] netfilter-ipv4: Line layout whitespace fixes Ian Morris
@ 2015-10-16 17:22 ` Pablo Neira Ayuso
0 siblings, 0 replies; 9+ messages in thread
From: Pablo Neira Ayuso @ 2015-10-16 17:22 UTC (permalink / raw)
To: Ian Morris; +Cc: netfilter-devel, netdev
On Wed, Oct 14, 2015 at 11:17:03PM +0100, Ian Morris wrote:
> Cleanses some whitespace issues by removing a leading space before a tab.
>
> No changes detected by objdiff.
>
> Signed-off-by: Ian Morris <ipm@chirality.org.uk>
> ---
> net/ipv4/netfilter/ipt_ECN.c | 2 +-
> net/ipv4/netfilter/nf_nat_pptp.c | 2 +-
> net/ipv4/netfilter/nf_nat_snmp_basic.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c
> index 2707652..6592708 100644
> --- a/net/ipv4/netfilter/ipt_ECN.c
> +++ b/net/ipv4/netfilter/ipt_ECN.c
> @@ -24,7 +24,7 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
> MODULE_DESCRIPTION("Xtables: Explicit Congestion Notification (ECN) flag modification");
>
> /* set ECT codepoint from IP header.
> - * return false if there was an error. */
> + * return false if there was an error. */
In netdev coding style we prefer for multiline comments:
/* This is a comment blah blah blah blah blah blah blah blah blah blah blah blah
* blah blah blah.
*/
For single line:
/* This is a comment blah blah blah */
This case, I suggest we can even get rid of that comment there since
it's obvious what set_ect_ip() is doing by reading the function name
and looking at what it returns.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-10-16 17:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 22:17 [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 1/6] netfilter-ipv4: Line layout whitespace fixes Ian Morris
2015-10-16 17:22 ` Pablo Neira Ayuso
2015-10-14 22:17 ` [PATCH nf-next 2/6] netfilter-ipv4: label placement Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 3/6] netfilter-ipv4: ternary operator layout Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 4/6] netfilter-ipv4: function definition layout Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 5/6] netfilter-ipv4: code indentation Ian Morris
2015-10-14 22:17 ` [PATCH nf-next 6/6] netfilter-ipv4: whitespace around operators Ian Morris
2015-10-16 17:20 ` [PATCH nf-next 0/6] coding style improvements: netfilter-ipv4 Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.