lkml.org 
[lkml]   [2018]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] net: netfilter: Replace printk() with appropriate pr_*() macro
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_<loglevel>() is more concise than
> > printk(KERN_<LOGLEVEL>).
> > Replace printks having a log level with the appropriate
> > pr_*() macros.
> >
> > Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> > ---
> > 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.

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.

Yes, removing periods seems fine.

Thanks.

\
 
 \ /
  Last update: 2018-03-11 21:48    [W:0.064 / U:6.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site