Skip to content

Commit b0edba2

Browse files
a3a3elummakynes
authored andcommitted
netfilter: fix coding-style errors.
Several header-files, Kconfig files and Makefiles have trailing white-space. Remove it. In netfilter/Kconfig, indent the type of CONFIG_NETFILTER_NETLINK_ACCT correctly. There are semicolons at the end of two function definitions in include/net/netfilter/nf_conntrack_acct.h and include/net/netfilter/nf_conntrack_ecache.h. Remove them. Fix indentation in nf_conntrack_l4proto.h. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 0286fbc commit b0edba2

11 files changed

Lines changed: 23 additions & 23 deletions

File tree

‎include/linux/netfilter/x_tables.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ void xt_free_table_info(struct xt_table_info *info);
340340

341341
/**
342342
* xt_recseq - recursive seqcount for netfilter use
343-
*
343+
*
344344
* Packet processing changes the seqcount only if no recursion happened
345345
* get_counters() can use read_seqcount_begin()/read_seqcount_retry(),
346346
* because we use the normal seqcount convention :

‎include/linux/netfilter_ipv6.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* IPv6-specific defines for netfilter.
22
* (C)1998 Rusty Russell -- This code is GPL.
33
* (C)1999 David Jeffery
4-
* this header was blatantly ripped from netfilter_ipv4.h
4+
* this header was blatantly ripped from netfilter_ipv4.h
55
* it's amazing what adding a bunch of 6s can do =8^)
66
*/
77
#ifndef __LINUX_IP6_NETFILTER_H

‎include/net/netfilter/nf_conntrack_acct.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct nf_conn_acct *nf_ct_acct_ext_add(struct nf_conn *ct, gfp_t gfp)
4545
#else
4646
return NULL;
4747
#endif
48-
};
48+
}
4949

5050
/* Check if connection tracking accounting is enabled */
5151
static inline bool nf_ct_acct_enabled(struct net *net)

‎include/net/netfilter/nf_conntrack_ecache.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ nf_ct_ecache_ext_add(struct nf_conn *ct, u16 ctmask, u16 expmask, gfp_t gfp)
6161
#else
6262
return NULL;
6363
#endif
64-
};
64+
}
6565

6666
#ifdef CONFIG_NF_CONNTRACK_EVENTS
6767
/* This structure is passed to event handler */

‎include/net/netfilter/nf_conntrack_expect.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t,
126126
const union nf_inet_addr *,
127127
u_int8_t, const __be16 *, const __be16 *);
128128
void nf_ct_expect_put(struct nf_conntrack_expect *exp);
129-
int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
129+
int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
130130
u32 portid, int report, unsigned int flags);
131131
static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect,
132132
unsigned int flags)

‎include/net/netfilter/nf_conntrack_l4proto.h‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,41 +181,41 @@ void nf_ct_l4proto_log_invalid(const struct sk_buff *skb,
181181
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
182182
static inline struct nf_generic_net *nf_generic_pernet(struct net *net)
183183
{
184-
return &net->ct.nf_ct_proto.generic;
184+
return &net->ct.nf_ct_proto.generic;
185185
}
186186

187187
static inline struct nf_tcp_net *nf_tcp_pernet(struct net *net)
188188
{
189-
return &net->ct.nf_ct_proto.tcp;
189+
return &net->ct.nf_ct_proto.tcp;
190190
}
191191

192192
static inline struct nf_udp_net *nf_udp_pernet(struct net *net)
193193
{
194-
return &net->ct.nf_ct_proto.udp;
194+
return &net->ct.nf_ct_proto.udp;
195195
}
196196

197197
static inline struct nf_icmp_net *nf_icmp_pernet(struct net *net)
198198
{
199-
return &net->ct.nf_ct_proto.icmp;
199+
return &net->ct.nf_ct_proto.icmp;
200200
}
201201

202202
static inline struct nf_icmp_net *nf_icmpv6_pernet(struct net *net)
203203
{
204-
return &net->ct.nf_ct_proto.icmpv6;
204+
return &net->ct.nf_ct_proto.icmpv6;
205205
}
206206
#endif
207207

208208
#ifdef CONFIG_NF_CT_PROTO_DCCP
209209
static inline struct nf_dccp_net *nf_dccp_pernet(struct net *net)
210210
{
211-
return &net->ct.nf_ct_proto.dccp;
211+
return &net->ct.nf_ct_proto.dccp;
212212
}
213213
#endif
214214

215215
#ifdef CONFIG_NF_CT_PROTO_SCTP
216216
static inline struct nf_sctp_net *nf_sctp_pernet(struct net *net)
217217
{
218-
return &net->ct.nf_ct_proto.sctp;
218+
return &net->ct.nf_ct_proto.sctp;
219219
}
220220
#endif
221221

‎include/net/netfilter/nf_conntrack_tuple.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ struct nf_conntrack_tuple_hash {
124124
#if IS_ENABLED(CONFIG_NETFILTER)
125125
static inline bool __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1,
126126
const struct nf_conntrack_tuple *t2)
127-
{
127+
{
128128
return (nf_inet_addr_cmp(&t1->src.u3, &t2->src.u3) &&
129129
t1->src.u.all == t2->src.u.all &&
130130
t1->src.l3num == t2->src.l3num);

‎net/ipv4/netfilter/Kconfig‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ config IP_NF_TARGET_CLUSTERIP
272272
The CLUSTERIP target allows you to build load-balancing clusters of
273273
network servers without having a dedicated load-balancing
274274
router/server/switch.
275-
275+
276276
To compile it as a module, choose M here. If unsure, say N.
277277

278278
config IP_NF_TARGET_ECN
@@ -281,7 +281,7 @@ config IP_NF_TARGET_ECN
281281
depends on NETFILTER_ADVANCED
282282
---help---
283283
This option adds a `ECN' target, which can be used in the iptables mangle
284-
table.
284+
table.
285285

286286
You can use this target to remove the ECN bits from the IPv4 header of
287287
an IP packet. This is particularly useful, if you need to work around
@@ -306,7 +306,7 @@ config IP_NF_RAW
306306
This option adds a `raw' table to iptables. This table is the very
307307
first in the netfilter framework and hooks in at the PREROUTING
308308
and OUTPUT chains.
309-
309+
310310
If you want to compile it as a module, say M here and read
311311
<file:Documentation/kbuild/modules.rst>. If unsure, say `N'.
312312

@@ -318,7 +318,7 @@ config IP_NF_SECURITY
318318
help
319319
This option adds a `security' table to iptables, for use
320320
with Mandatory Access Control (MAC) policy.
321-
321+
322322
If unsure, say N.
323323

324324
endif # IP_NF_IPTABLES

‎net/ipv4/netfilter/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ obj-$(CONFIG_NFT_DUP_IPV4) += nft_dup_ipv4.o
3131
# flow table support
3232
obj-$(CONFIG_NF_FLOW_TABLE_IPV4) += nf_flow_table_ipv4.o
3333

34-
# generic IP tables
34+
# generic IP tables
3535
obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o
3636

3737
# the three instances of ip_tables

‎net/netfilter/Kconfig‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ config NETFILTER_FAMILY_ARP
2020
bool
2121

2222
config NETFILTER_NETLINK_ACCT
23-
tristate "Netfilter NFACCT over NFNETLINK interface"
23+
tristate "Netfilter NFACCT over NFNETLINK interface"
2424
depends on NETFILTER_ADVANCED
2525
select NETFILTER_NETLINK
2626
help
@@ -34,7 +34,7 @@ config NETFILTER_NETLINK_QUEUE
3434
help
3535
If this option is enabled, the kernel will include support
3636
for queueing packets via NFNETLINK.
37-
37+
3838
config NETFILTER_NETLINK_LOG
3939
tristate "Netfilter LOG over NFNETLINK interface"
4040
default m if NETFILTER_ADVANCED=n
@@ -1502,7 +1502,7 @@ config NETFILTER_XT_MATCH_REALM
15021502
This option adds a `realm' match, which allows you to use the realm
15031503
key from the routing subsystem inside iptables.
15041504

1505-
This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option
1505+
This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option
15061506
in tc world.
15071507

15081508
If you want to compile it as a module, say M here and read
@@ -1523,7 +1523,7 @@ config NETFILTER_XT_MATCH_SCTP
15231523
depends on NETFILTER_ADVANCED
15241524
default IP_SCTP
15251525
help
1526-
With this option enabled, you will be able to use the
1526+
With this option enabled, you will be able to use the
15271527
`sctp' match in order to match on SCTP source/destination ports
15281528
and SCTP chunk types.
15291529

0 commit comments

Comments
 (0)