From: Ian Kent <raven@themaw.net>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
autofs mailing list <autofs@vger.kernel.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 04/13] autofs4 - change printks AUTOFS defined prints
Date: Thu, 06 Nov 2014 07:02:53 +0800 [thread overview]
Message-ID: <1415228573.2365.24.camel@perseus.themaw.net> (raw)
In-Reply-To: <1415025215.17743.12.camel@perches.com>
On Mon, 2014-11-03 at 06:33 -0800, Joe Perches wrote:
>
> That's fine. I left out the trailing semicolon/space.
> The pr_fmt could be something like:
> #define pr_fmt(fmt) KBUILD_MODNAME ":%d:%s: " fmt, current->pid, __func__
> or add a "pid:" descriptor prefix if you like too:
> #define pr_fmt(fmt) KBUILD_MODNAME ":pid:%d:%s: " fmt, current->pid, __func__
>
> > > it's better to use a consistent style for
> > > these logging functions ideally with terminating
> > > newlines so there isn't a mix of code with
> > > and without those newlines. That inconsistency
> > > leads to unintended defects.
> >
> > The idea here was to make the logging consistent throughout.
>
> Mine too.
>
> > I have become used of not using the new-line terminator in logging over
> > the years and tend to favour that myself. You recommend not doing that
> > probably from a kernel wide consistency perspective? Maybe that is
> > better ...
>
> Yes, kernel style consistency is the rationale.
>
> Over time, people come along and add messages
> while not reading the code very closely so using
> the kernel style with newlines can help avoid
> these trivial defects.
I can see how not including the trailing newline in the macros is a good
thing and I'll forward a couple more patches to Andrew for this and fix
the inconsistencies.
But idea of using pr_xxx() and pr_fmt() (actually that's too open to
name clashes so it would need to be named something like autofs_pr_fmt()
anyway) looks like it results in less readable code so I'd really prefer
not to do that.
But thanks for pointing out the problems with the logging calls and for
you constructive suggestions.
Ian
next prev parent reply other threads:[~2014-11-05 23:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 8:12 [PATCH 01/13] autofs4 - coding style fixes Ian Kent
2014-11-03 8:12 ` [PATCH 02/13] autofs4 - fix some white space errors Ian Kent
2014-11-03 8:12 ` [PATCH 03/13] autofs4 - use pr print in AUTOFS prints Ian Kent
2014-11-03 8:12 ` [PATCH 04/13] autofs4 - change printks AUTOFS defined prints Ian Kent
2014-11-03 8:25 ` Joe Perches
2014-11-03 9:20 ` Ian Kent
2014-11-03 14:33 ` Joe Perches
2014-11-05 23:02 ` Ian Kent [this message]
2014-11-05 23:20 ` Joe Perches
2014-11-05 23:42 ` Ian Kent
2014-11-03 8:12 ` [PATCH 05/13] autofs4 - fix string.h include in auto_dev-ioctl.h Ian Kent
2014-11-03 8:12 ` [PATCH 06/13] autofs4 - move linux/auto_dev-ioctl.h to uapi/linux Ian Kent
2014-11-03 8:12 ` [PATCH 07/13] autofs - merge auto_fs.h and auto_fs4.h Ian Kent
2014-11-03 8:12 ` [PATCH 08/13] autofs - use autofs instead of autofs4 everywhere Ian Kent
2014-11-03 8:13 ` [PATCH 09/13] autofs - copy autofs4 to autofs Ian Kent
2014-11-03 8:13 ` [PATCH 10/13] autofs - create autofs Kconfig and Makefile Ian Kent
2014-11-03 8:13 ` [PATCH 11/13] autofs - update fs/autofs4/Kconfig Ian Kent
2014-11-03 8:13 ` [PATCH 12/13] autofs - update fs/autofs4/Makefile Ian Kent
2014-11-03 8:13 ` [PATCH 13/13] autofs - delete fs/autofs4 source files Ian Kent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415228573.2365.24.camel@perseus.themaw.net \
--to=raven@themaw.net \
--cc=akpm@linux-foundation.org \
--cc=autofs@vger.kernel.org \
--cc=joe@perches.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox