From: Richard Guy Briggs <rgb@redhat.com>
To: Linux-Audit Mailing List <linux-audit@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
netfilter-devel@vger.kernel.org
Cc: Paul Moore <paul@paul-moore.com>,
sgrubb@redhat.com, omosnace@redhat.com, fw@strlen.de,
twoerner@redhat.com, eparis@parisplace.org,
ebiederm@xmission.com, tgraf@infradead.org,
Richard Guy Briggs <rgb@redhat.com>
Subject: [PATCH ghak25 v2 1/9] netfilter: normalize x_table function declarations
Date: Mon, 6 Jan 2020 13:54:02 -0500 [thread overview]
Message-ID: <194bdc565d548a14e12357a7c1a594605b7fdf0f.1577830902.git.rgb@redhat.com> (raw)
In-Reply-To: <cover.1577830902.git.rgb@redhat.com>
In-Reply-To: <cover.1577830902.git.rgb@redhat.com>
Git context diffs were being produced with unhelpful declaration types
in the place of function names to help identify the funciton in which
changes were made.
Normalize x_table function declarations so that git context diff
function labels work as expected.
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
---
net/netfilter/x_tables.c | 43 ++++++++++++++++++-------------------------
1 file changed, 18 insertions(+), 25 deletions(-)
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index ce70c2576bb2..0094853ab42a 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -77,8 +77,7 @@ int xt_register_target(struct xt_target *target)
}
EXPORT_SYMBOL(xt_register_target);
-void
-xt_unregister_target(struct xt_target *target)
+void xt_unregister_target(struct xt_target *target)
{
u_int8_t af = target->family;
@@ -88,8 +87,7 @@ int xt_register_target(struct xt_target *target)
}
EXPORT_SYMBOL(xt_unregister_target);
-int
-xt_register_targets(struct xt_target *target, unsigned int n)
+int xt_register_targets(struct xt_target *target, unsigned int n)
{
unsigned int i;
int err = 0;
@@ -108,8 +106,7 @@ int xt_register_target(struct xt_target *target)
}
EXPORT_SYMBOL(xt_register_targets);
-void
-xt_unregister_targets(struct xt_target *target, unsigned int n)
+void xt_unregister_targets(struct xt_target *target, unsigned int n)
{
while (n-- > 0)
xt_unregister_target(&target[n]);
@@ -127,8 +124,7 @@ int xt_register_match(struct xt_match *match)
}
EXPORT_SYMBOL(xt_register_match);
-void
-xt_unregister_match(struct xt_match *match)
+void xt_unregister_match(struct xt_match *match)
{
u_int8_t af = match->family;
@@ -138,8 +134,7 @@ int xt_register_match(struct xt_match *match)
}
EXPORT_SYMBOL(xt_unregister_match);
-int
-xt_register_matches(struct xt_match *match, unsigned int n)
+int xt_register_matches(struct xt_match *match, unsigned int n)
{
unsigned int i;
int err = 0;
@@ -158,8 +153,7 @@ int xt_register_match(struct xt_match *match)
}
EXPORT_SYMBOL(xt_register_matches);
-void
-xt_unregister_matches(struct xt_match *match, unsigned int n)
+void xt_unregister_matches(struct xt_match *match, unsigned int n)
{
while (n-- > 0)
xt_unregister_match(&match[n]);
@@ -204,8 +198,8 @@ struct xt_match *xt_find_match(u8 af, const char *name, u8 revision)
}
EXPORT_SYMBOL(xt_find_match);
-struct xt_match *
-xt_request_find_match(uint8_t nfproto, const char *name, uint8_t revision)
+struct xt_match *xt_request_find_match(u8 nfproto, const char *name,
+ u8 revision)
{
struct xt_match *match;
@@ -391,8 +385,8 @@ int xt_find_revision(u8 af, const char *name, u8 revision, int target,
}
EXPORT_SYMBOL_GPL(xt_find_revision);
-static char *
-textify_hooks(char *buf, size_t size, unsigned int mask, uint8_t nfproto)
+static char *textify_hooks(char *buf, size_t size, unsigned int mask,
+ uint8_t nfproto)
{
static const char *const inetbr_names[] = {
"PREROUTING", "INPUT", "FORWARD",
@@ -1349,11 +1343,10 @@ struct xt_counters *xt_counters_alloc(unsigned int counters)
}
EXPORT_SYMBOL(xt_counters_alloc);
-struct xt_table_info *
-xt_replace_table(struct xt_table *table,
- unsigned int num_counters,
- struct xt_table_info *newinfo,
- int *error)
+struct xt_table_info *xt_replace_table(struct xt_table *table,
+ unsigned int num_counters,
+ struct xt_table_info *newinfo,
+ int *error)
{
struct xt_table_info *private;
unsigned int cpu;
@@ -1542,7 +1535,7 @@ enum {
};
static void *xt_mttg_seq_next(struct seq_file *seq, void *v, loff_t *ppos,
- bool is_target)
+ bool is_target)
{
static const uint8_t next_class[] = {
[MTTG_TRAV_NFP_UNSPEC] = MTTG_TRAV_NFP_SPEC,
@@ -1583,7 +1576,7 @@ static void *xt_mttg_seq_next(struct seq_file *seq, void *v, loff_t *ppos,
}
static void *xt_mttg_seq_start(struct seq_file *seq, loff_t *pos,
- bool is_target)
+ bool is_target)
{
struct nf_mttg_trav *trav = seq->private;
unsigned int j;
@@ -1692,8 +1685,8 @@ static int xt_target_seq_show(struct seq_file *seq, void *v)
* This function will create the nf_hook_ops that the x_table needs
* to hand to xt_hook_link_net().
*/
-struct nf_hook_ops *
-xt_hook_ops_alloc(const struct xt_table *table, nf_hookfn *fn)
+struct nf_hook_ops *xt_hook_ops_alloc(const struct xt_table *table,
+ nf_hookfn *fn)
{
unsigned int hook_mask = table->valid_hooks;
uint8_t i, num_hooks = hweight32(hook_mask);
--
1.8.3.1
next prev parent reply other threads:[~2020-01-06 18:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 18:54 [PATCH ghak25 v2 0/9] Address NETFILTER_CFG issues Richard Guy Briggs
2020-01-06 18:54 ` Richard Guy Briggs [this message]
2020-01-06 20:23 ` [PATCH ghak25 v2 1/9] netfilter: normalize x_table function declarations Florian Westphal
2020-01-08 16:47 ` Nicolas Dichtel
2020-01-16 21:29 ` Richard Guy Briggs
2020-01-31 3:17 ` Paul Moore
2020-02-10 19:13 ` Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 2/9] netfilter: normalize ebtables " Richard Guy Briggs
2020-01-06 20:30 ` Florian Westphal
2020-01-31 3:17 ` Paul Moore
2020-01-06 18:54 ` [PATCH ghak25 v2 3/9] netfilter: normalize ebtables function declarations II Richard Guy Briggs
2020-01-06 20:31 ` Florian Westphal
2020-01-31 3:17 ` Paul Moore
2020-01-06 18:54 ` [PATCH ghak25 v2 4/9] audit: record nfcfg params Richard Guy Briggs
2020-01-31 3:18 ` Paul Moore
2020-02-18 22:47 ` Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 5/9] netfilter: x_tables audit only on syscall rule Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 6/9] netfilter: ebtables " Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 7/9] netfilter: ebtables audit table registration Richard Guy Briggs
2020-01-31 3:18 ` Paul Moore
2020-02-18 22:35 ` Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 8/9] netfilter: add audit operation field Richard Guy Briggs
2020-01-06 20:23 ` Florian Westphal
2020-01-31 3:18 ` Paul Moore
2020-02-13 12:14 ` Richard Guy Briggs
2020-02-13 12:34 ` Florian Westphal
2020-02-13 14:29 ` Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 9/9] netfilter: audit table unregister actions Richard Guy Briggs
2020-01-31 3:18 ` Paul Moore
2020-01-16 15:05 ` [PATCH ghak25 v2 0/9] Address NETFILTER_CFG issues Pablo Neira Ayuso
2020-01-16 19:07 ` Paul Moore
2020-01-16 21:20 ` Richard Guy Briggs
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=194bdc565d548a14e12357a7c1a594605b7fdf0f.1577830902.git.rgb@redhat.com \
--to=rgb@redhat.com \
--cc=ebiederm@xmission.com \
--cc=eparis@parisplace.org \
--cc=fw@strlen.de \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=sgrubb@redhat.com \
--cc=tgraf@infradead.org \
--cc=twoerner@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).