Received: by 10.213.65.16 with SMTP id m16csp63886imf; Sun, 11 Mar 2018 15:32:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELvDPWTN0Eau+Yz7QlYbNK4UL31nQakrLSsXiD0WbVX4sCDS0fOHq/YbOnLsJb2roq4/nG4F X-Received: by 2002:a17:902:20c9:: with SMTP id v9-v6mr6151850plg.41.1520807569619; Sun, 11 Mar 2018 15:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520807569; cv=none; d=google.com; s=arc-20160816; b=xAq/RC3cDicimByzOXWkWq+vEyFxpZl4U8XvICm4wgghriILaEbSsYmisvNtyDAB+3 Ek9yjJZLFJmz/kFRleQO7y1BmtLtdD15eiYHKHNpZMCBEJNoBelSMWQslZ6QUWj7Mzb9 FjWaH9q9vWVRxkvM555XhEYVLCqx7igXouOJWpKloKmQuiXKgO4TKKMv0HtgHb0lNba1 EYj+2CFqzonRj6Tp7BcNeJ4WCmEGS5+/MS5LZV7ud0UNXjqxFjGKmChn+aar8U2j8J/H 5NvC6DnCXLmQyuHAWRhsjMuTr7g3CWDxdBEQqonN33qVepVy5Tf+1RwtED/DFW8NcjZO ZiTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=yrMy+/OtNhyGkQz1gJmb2p/FmtvAMt13mJrXxLtXN6A=; b=wr52ZH0p4flPmtloVpxfFyFcBUDr852Wn+adtGFCJ3fDNU0DN9kp9k9szmvbWWqTiM Ev9Mhf2uoKc7j19WHT3f3zSStpi8Z1olzTzJ4idc87JX1iBlZ42UPcTxicoi/riDQ8QS d4jM7hN36baPVxfpD4s36wju8qsXWt3gIK5BokwPuY2tBpnGMyd/UxCLvi1CxX92CNyA g6fNn9LPFXEJRBzkAEYguFuVQv8N/7F/GoGxCYBRWYmRMkweodwJzbr+hEryB9BBP2ve P88Gdp5eyhZFzJZKhqtBU5XGN1A8xWlMb0RDe/OD1AJOLwWZgBalVycvGqnpQx+d5YOl 2KDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2-v6si4922157plo.33.2018.03.11.15.32.35; Sun, 11 Mar 2018 15:32:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932508AbeCKWbm (ORCPT + 99 others); Sun, 11 Mar 2018 18:31:42 -0400 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:60598 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932166AbeCKWbl (ORCPT ); Sun, 11 Mar 2018 18:31:41 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.84_2) (envelope-from ) id 1ev9V7-0007zC-4s; Sun, 11 Mar 2018 23:31:33 +0100 Date: Sun, 11 Mar 2018 23:31:33 +0100 From: Florian Westphal To: Arushi Singhal Cc: Pablo Neira Ayuso , Joe Perches , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Netfilter Developer Mailing List , coreteam@netfilter.org, Linux Kernel Network Developers , LKML Subject: Re: [PATCH v2] net: netfilter: Replace printk() with appropriate pr_*() macro Message-ID: <20180311223133.GH11882@breakpoint.cc> References: <20180311194104.GA17450@seema-Inspiron-15-3567> <1520797961.19456.4.camel@perches.com> <20180311204734.aczkhqqgtb7z2kkj@salvia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arushi Singhal wrote: > On Mon, Mar 12, 2018 at 2:17 AM, Pablo Neira Ayuso > wrote: > > > Hi Joe, > > > > On Sun, Mar 11, 2018 at 12:52:41PM -0700, Joe Perches wrote: > > > On Mon, 2018-03-12 at 01:11 +0530, Arushi Singhal wrote: > > > > 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(-) > > > > > > None of these files have a #define for pr_fmt so this > > > should be OK. > > > > I think Arushi could add pr_fmt in the same go, so we skip another > > follow up patch for this. @Arushi: I suggested this in my previous > > email, please have a look. > > > > Hello Pablo > > Should I send two patches, one with the conversion of printk() to pr_() and > another for defining pr_fmt(). > > Or > > only one patch with all the changes? Both in one, it reduces code churn. With pr_* + pr_fmt, the module name will be prefixed automatically, see e.g. commit e016c5e43db51875c2b541b59bd217494d213174 as an example. > > This would also probably allows us to save the line break in the error > > message, which IIRC is not a good practise either, eg. > > > > pr_warn("nf_queue: OOM " > > "in mangle, dropping packet\n"); > > > > > Perhaps coalesce the formats and remove the unnecessary periods too. The above message should be removed, its useless (on oom allocator already warns).