aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_nat_irc.c
diff options
context:
space:
mode:
authorArushi Singhal <arushisinghal19971997@gmail.com>2018-03-12 18:36:29 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-20 13:44:14 +0100
commit5191d70f83fd1878c40029cffe69f6a2bf65fa0e (patch)
tree5b0543a080a40a57e556da1dfb2035b90fa9d7dc /net/netfilter/nf_nat_irc.c
parentnetfilter: xt_conntrack: Support bit-shifting for CONNMARK & MARK targets. (diff)
downloadlinux-dev-5191d70f83fd1878c40029cffe69f6a2bf65fa0e.tar.xz
linux-dev-5191d70f83fd1878c40029cffe69f6a2bf65fa0e.zip
netfilter: Replace printk() with pr_*() and define pr_fmt()
Using pr_<loglevel>() is more concise than printk(KERN_<LOGLEVEL>). This patch: * Replace printks having a log level with the appropriate pr_*() macros. * Define pr_fmt() to include relevant name. * Remove redundant prefixes from pr_*() calls. * Indent the code where possible. * Remove the useless output messages. * Remove periods from messages. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_nat_irc.c')
-rw-r--r--net/netfilter/nf_nat_irc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/netfilter/nf_nat_irc.c b/net/netfilter/nf_nat_irc.c
index dcb5f6375d9d..3aa35a43100d 100644
--- a/net/netfilter/nf_nat_irc.c
+++ b/net/netfilter/nf_nat_irc.c
@@ -10,6 +10,8 @@
* 2 of the License, or (at your option) any later version.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/tcp.h>
@@ -79,7 +81,7 @@ static unsigned int help(struct sk_buff *skb,
*/
/* AAA = "us", ie. where server normally talks to. */
snprintf(buffer, sizeof(buffer), "%u %u", ntohl(newaddr.ip), port);
- pr_debug("nf_nat_irc: inserting '%s' == %pI4, port %u\n",
+ pr_debug("inserting '%s' == %pI4, port %u\n",
buffer, &newaddr.ip, port);
if (!nf_nat_mangle_tcp_packet(skb, ct, ctinfo, protoff, matchoff,
@@ -108,8 +110,7 @@ static int __init nf_nat_irc_init(void)
/* Prior to 2.6.11, we had a ports param. No longer, but don't break users. */
static int warn_set(const char *val, const struct kernel_param *kp)
{
- printk(KERN_INFO KBUILD_MODNAME
- ": kernel >= 2.6.10 only uses 'ports' for conntrack modules\n");
+ pr_info("kernel >= 2.6.10 only uses 'ports' for conntrack modules\n");
return 0;
}
module_param_call(ports, warn_set, NULL, NULL, 0);