Skip to contentSkip to conversation

Shows proper function name for pr_debug() messages.

PATCH In review Weongyo Jeong 2 participants 3 messages Mar 14, 2016 – Mar 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Shows proper function name for pr_debug() messages.

It seems pr_debug() calls didn't be updated while code was refactoring.

---
 net/netfilter/nf_conntrack_core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
net/netfilter/nf_conntrack_core.c +4 -3
index f60b4fd..ebd4d23 100644
@@ -1081,14 +1081,15 @@ resolve_normal_ct(struct net *net, struct nf_conn *tmpl,
 	} else {
 		/* Once we've had two way comms, always ESTABLISHED. */
 		if (test_bit(IPS_SEEN_REPLY_BIT, &ct->status)) {
-			pr_debug("nf_conntrack_in: normal packet for %p\n", ct);
+			pr_debug("resolve_normal_ct: normal packet for %p\n",
+			    ct);
 			*ctinfo = IP_CT_ESTABLISHED;
 		} else if (test_bit(IPS_EXPECTED_BIT, &ct->status)) {
-			pr_debug("nf_conntrack_in: related packet for %p\n",
+			pr_debug("resolve_normal_ct: related packet for %p\n",
 				 ct);
 			*ctinfo = IP_CT_RELATED;
 		} else {
-			pr_debug("nf_conntrack_in: new packet for %p\n", ct);
+			pr_debug("resolve_normal_ct: new packet for %p\n", ct);
 			*ctinfo = IP_CT_NEW;
 		}
 		*set_reply = 0;
Signature · 1 line
2.1.3
#1 lore raw
Quoted 1 line · Weongyo Jeong

It seems pr_debug() calls didn't be updated while code was refactoring.

Better add:

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

at the top of the file.

Have a look at beacd3e8ef23 ("netfilter: nfnetlink_log: Make use of pr_fmt where applicable") for instance.

#2 lore raw
Quoted 11 lines · Pablo Neira Ayuso
Quoted 1 line · Weongyo Jeong

It seems pr_debug() calls didn't be updated while code was refactoring.

Better add:

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

at the top of the file.

Have a look at beacd3e8ef23 ("netfilter: nfnetlink_log: Make use of pr_fmt where applicable") for instance.

Thank you for review. I'd submitted a patch again following your suggestion.

Regards,
Weongyo Jeong