Received: by 10.213.65.16 with SMTP id m16csp19792imf; Sun, 11 Mar 2018 12:42:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELvo8s4+HThTNveClzIFTtoMUPs5hq2elTP3I45QwuXH1vJ8HQx7mEfG4UeYfdRgB43nm9RD X-Received: by 2002:a17:902:64cf:: with SMTP id y15-v6mr1557126pli.49.1520797377637; Sun, 11 Mar 2018 12:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520797377; cv=none; d=google.com; s=arc-20160816; b=bAjfwJn+wC8pmzZRQWzKK1h3lVBwZfcfh8TnqOz+JEOZiIFbjE7BHtU+1hLkw3JEu6 kbmkhnfnAhITENXReKzo/y14lcwfYVAU4I5EzDGa5CCKDhOsDY21H/6I6vv3cGuR4oZj COpR/PuIQhVcfxpj+A/eDMWFuMOdFFqHEusj0WR11k9nV9PCYQkVjDv7k1AnmTVownRS tEX1aWwWxkYmnR+VjevWuD6XBMIDAuAKwOIgwTcxy0atBDV4o1ZXnrKAPhacBxAE3oun 476yQ0YvsiehDEVXI9zuw+UrKVvWqGHzWO+NfqBohr5e0xGcWmz1QFoojiuUfTIwRkYt cwJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=oeRqWnbjl9qPBKkNht8Wf0g9ga//qjrjq5gF+znDQcA=; b=RR4sRTcWEKoQS/xOm/gZpf1Tr+n9VIA+oXighkJWQhcSiLalrQIcxqiCEvvpZnSpYF Y4GQl09q1BZewyiQ2OgwBHYjPp1y2YTDqvpylGEb7Mi+VGxC+AK/qdk8OJoIj50rQv46 pjo6ci3nOX+3mNSdLvhI75q+PI3Xscpkab3FjOqr402I+sa0lKDLfVk54tmpSaltg6wz nm/7nDYaXolqrOBCJ1c0CSskWuzG/2I2pm2XFvkDmXGPrOZCQIFNabZ56iW8TaA4W4q8 4HSgHZ2sedpCKGpBmbtlzzUdtTXjC0epY/mP+mt9u+dEjfP0UBLSs7JCx+zXWdTo0UWs d2kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W32i8THK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj1-v6si3692369plb.711.2018.03.11.12.42.43; Sun, 11 Mar 2018 12:42:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W32i8THK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932284AbeCKTlo (ORCPT + 99 others); Sun, 11 Mar 2018 15:41:44 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:45906 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932147AbeCKTlm (ORCPT ); Sun, 11 Mar 2018 15:41:42 -0400 Received: by mail-pl0-f65.google.com with SMTP id v9-v6so8120960plp.12; Sun, 11 Mar 2018 12:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=oeRqWnbjl9qPBKkNht8Wf0g9ga//qjrjq5gF+znDQcA=; b=W32i8THKpEergatTa2shx8kjmgRe9h97B/Hc0LmDRJNeqFZCNHgVbWOF9cqcuv5Dk+ zcBhyToXoE09O/vwzGk8q8KeU87x4hSQc8WzzSuQXgJjKUkKbykZhfJSch8fFr2t9SAV H9jKSluWDjtbZwbB8ypj0LK5nhsSw5ovVJiK3XY2+DxeRoUUR8/5udFCB0NnKGmLpepQ uUT0+I4I4R+FOZnZ2Vv9axSs7L+utnWnYxQ58ajshrXDu2+fWAVVsNC7i1qbywxCesmj 7jqnbe+ZB8OdeibM96sNr+6auPokrfFPlOXy6iVrMhlnZ482sLgmYTkuWcg9Tm8xLgmo uCYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=oeRqWnbjl9qPBKkNht8Wf0g9ga//qjrjq5gF+znDQcA=; b=bJVJEdaKFQCoB6ME/gttJdvh8SIHH9XA22KF3nFMJYxGDzURoQPC9OiKgfI6UriRFT 3cl0Jah2NNbW4fONJp47R6EF6BX43RTTtt+iiD8kHAkd+l9pTGSGpALz6eAqqyLgvkuD hJQ9mTxROV/2pcZ8FS0IRQfTe4ZoJHGofBppUyW6A6JmdoEQce33JJ8ec6eFGvF253x9 /DKtTUtCialrZB5i5/c3yXomFo3/XrLRPlJc4wkxOyRAB46PIAnPv6wQFeS9WkKxa080 uREMcdDXZGWP+iG0uK7rpxU3NHSD9Un/y8zMt6uECBE6EiXS9wVljeIOWjJWGNp3H/26 HdDg== X-Gm-Message-State: AElRT7HaS/qTwfUH3VJhTEmD484un0TUSH4DDGZ58t/CnRVXtoHj/Hk6 UOvnV7ZGzI0vr7WJapvNXHBAiA== X-Received: by 2002:a17:902:bd8c:: with SMTP id q12-v6mr5762400pls.364.1520797301525; Sun, 11 Mar 2018 12:41:41 -0700 (PDT) Received: from seema-Inspiron-15-3567 ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id c15sm13695616pfm.114.2018.03.11.12.41.39 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 11 Mar 2018 12:41:39 -0700 (PDT) Date: Mon, 12 Mar 2018 01:11:05 +0530 From: Arushi Singhal To: pablo@netfilter.org Cc: Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] net: netfilter: Replace printk() with appropriate pr_*() macro Message-ID: <20180311194104.GA17450@seema-Inspiron-15-3567> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using pr_() is more concise than printk(KERN_). Replace printks having a log level with the appropriate pr_*() macros. Signed-off-by: Arushi Singhal --- changes in v2 *in v1 printk() were replaced with netdev_*() net/netfilter/nf_conntrack_acct.c | 2 +- net/netfilter/nf_conntrack_ecache.c | 2 +- net/netfilter/nf_conntrack_timestamp.c | 2 +- net/netfilter/nf_nat_core.c | 2 +- net/netfilter/nfnetlink_queue.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/netfilter/nf_conntrack_acct.c b/net/netfilter/nf_conntrack_acct.c index 8669167..b1c3286 100644 --- a/net/netfilter/nf_conntrack_acct.c +++ b/net/netfilter/nf_conntrack_acct.c @@ -80,7 +80,7 @@ static int nf_conntrack_acct_init_sysctl(struct net *net) net->ct.acct_sysctl_header = register_net_sysctl(net, "net/netfilter", table); if (!net->ct.acct_sysctl_header) { - printk(KERN_ERR "nf_conntrack_acct: can't register to sysctl.\n"); + pr_err("nf_conntrack_acct: can't register to sysctl.\n"); goto out_register; } return 0; diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c index caac41a..21a3048 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c @@ -372,7 +372,7 @@ static int nf_conntrack_event_init_sysctl(struct net *net) net->ct.event_sysctl_header = register_net_sysctl(net, "net/netfilter", table); if (!net->ct.event_sysctl_header) { - printk(KERN_ERR "nf_ct_event: can't register to sysctl.\n"); + pr_err("nf_ct_event: can't register to sysctl.\n"); goto out_register; } return 0; diff --git a/net/netfilter/nf_conntrack_timestamp.c b/net/netfilter/nf_conntrack_timestamp.c index 4c4734b..f32cc86 100644 --- a/net/netfilter/nf_conntrack_timestamp.c +++ b/net/netfilter/nf_conntrack_timestamp.c @@ -58,7 +58,7 @@ static int nf_conntrack_tstamp_init_sysctl(struct net *net) net->ct.tstamp_sysctl_header = register_net_sysctl(net, "net/netfilter", table); if (!net->ct.tstamp_sysctl_header) { - printk(KERN_ERR "nf_ct_tstamp: can't register to sysctl.\n"); + pr_err("nf_ct_tstamp: can't register to sysctl.\n"); goto out_register; } return 0; diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 6c38421..dcda5ac 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -814,7 +814,7 @@ static int __init nf_nat_init(void) ret = nf_ct_extend_register(&nat_extend); if (ret < 0) { nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size); - printk(KERN_ERR "nf_nat_core: Unable to register extension\n"); + pr_err("nf_nat_core: Unable to register extension\n"); return ret; } diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 8bba231..f5ddab1 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -834,8 +834,8 @@ nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff) nskb = skb_copy_expand(e->skb, skb_headroom(e->skb), diff, GFP_ATOMIC); if (!nskb) { - printk(KERN_WARNING "nf_queue: OOM " - "in mangle, dropping packet\n"); + pr_warn("nf_queue: OOM " + "in mangle, dropping packet\n"); return -ENOMEM; } kfree_skb(e->skb); -- 2.7.4