public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Corey Minyard <minyard@acm.org>
Cc: Joe Perches <joe@perches.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] device: Add #define dev_fmt similar to #define pr_fmt
Date: Sat, 7 Jul 2018 10:35:28 +0200	[thread overview]
Message-ID: <20180707083528.GA2371@kroah.com> (raw)
In-Reply-To: <54432c2a-a956-b721-0b2b-762a61898ae1@acm.org>

On Fri, Jul 06, 2018 at 03:50:16PM -0500, Corey Minyard wrote:
> On 07/06/2018 10:50 AM, Greg Kroah-Hartman wrote:
> > On Fri, Jul 06, 2018 at 08:41:34AM -0700, Joe Perches wrote:
> > > On Fri, 2018-07-06 at 17:30 +0200, Greg Kroah-Hartman wrote:
> > > > On Wed, May 09, 2018 at 08:15:46AM -0700, Joe Perches wrote:
> > > > > Add a prefixing macro to dev_<level> uses similar to the pr_fmt
> > > > > prefixing macro used in pr_<level> calls.
> > > > > 
> > > > > This can help avoid some string duplication in dev_<level> uses.
> > > > > 
> > > > > The default, like pr_fmt, is an empty #define dev_fmt(fmt) fmt
> > > > > 
> > > > > Rename the existing dev_<level> functions to _dev_<level> and
> > > > > introduce #define dev_<level> _dev_<level> macros that use the
> > > > > new #define dev_fmt
> > > > > 
> > > > > Miscellanea:
> > > > > 
> > > > > o Consistently use #defines with fmt, ... and ##__VA_ARGS__
> > > > > o Remove unnecessary externs
> > > > SHouldn't these be separate patches please?
> > > Multiple patches touching the same lines are unnecessary work.
> > > 
> > > So I don't think so as it's just touching bits that need change
> > > anyway.
> > > 
> > > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > > > ---
> > > > >   drivers/base/core.c    |  12 +++---
> > > > >   include/linux/device.h | 103 ++++++++++++++++++++++++++++---------------------
> > > > >   2 files changed, 64 insertions(+), 51 deletions(-)
> > > > Ok this seems like a lot of churn for no real apparent gain.  What is
> > > > all of this getting us?
> > > > 
> > > > What is the benifit, you have more code now,
> > > > why is that good?
> > > IPMI and a few other subsystems prefix all their output
> > > dev_<level> with specific duplicated content.
> > That's crazy and strange as the whole idea was that dev_* would uniquely
> > identify the driver/device such that "prefixes" would not be needed.
> > 
> > Ugh.
> > 
> > > This centralizes those prefixes just like pr_fmt.
> > > 
> > > The IPMI changes are already in mainline and now
> > > need this mechanism to maintain their output content.
> > > 
> > > IPMI and a few other subsystems prefix all their output
> > > dev_<level> with specific duplicated content.
> > > 
> > > This centralizes those prefixes just like pr_fmt.
> > > 
> > > commit a2d70dfdda6f ("ipmi: msghandler: Add and use pr_fmt and dev_fmt,
> > > remove PFX")
> > Ok, I'll take this.  I don't like it, as drivers should really not need
> > this at all.  But ipmi is known for doing "odd" things anyway...
> 
> I've been trying to make things less odd as time has gone by.  And I'm happy
> to pull out this change.  I've been slowly working on the logging in
> the ipmi driver to clean this kind of stuff up.

Cleaning up the logging would be great to see happen.  Until then, we
can leave these patches in.

thanks,

greg k-h

  reply	other threads:[~2018-07-07  8:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 15:15 [PATCH 0/6] treewide: Add and use dev_fmt similar to pr_fmt Joe Perches
2018-05-09 15:15 ` [PATCH 1/6] x86/early-quirks: Rename duplicate define of dev_err Joe Perches
2018-05-13 13:03   ` Thomas Gleixner
2018-05-13 17:30     ` Joe Perches
2018-05-13 18:09   ` [tip:x86/cleanups] " tip-bot for Joe Perches
2018-05-09 15:15 ` [PATCH 2/6] device: Add #define dev_fmt similar to #define pr_fmt Joe Perches
2018-06-19 13:31   ` Joe Perches
2018-06-24 15:41     ` Joe Perches
2018-06-25  0:51       ` Greg Kroah-Hartman
2018-07-05 22:57         ` Joe Perches
2018-07-06 13:38           ` Greg Kroah-Hartman
2018-07-06 14:42             ` Joe Perches
2018-07-06 15:30   ` Greg Kroah-Hartman
2018-07-06 15:41     ` Joe Perches
2018-07-06 15:50       ` Greg Kroah-Hartman
2018-07-06 20:50         ` Corey Minyard
2018-07-07  8:35           ` Greg Kroah-Hartman [this message]
2018-05-09 15:15 ` [PATCH 3/6] ipmi: msghandler: Add and use pr_fmt and dev_fmt, remove PFX Joe Perches
2018-05-09 15:15 ` [PATCH 4/6] ipmi: Use more common logging styles Joe Perches
2018-05-09 15:15 ` [PATCH 5/6] ipmi: Convert printk(KERN_<level> to pr_<level>( Joe Perches
2018-05-09 15:15 ` [PATCH 6/6] infiniband: qplib_fp: Use dev_fmt Joe Perches
2018-05-15 14:40   ` Doug Ledford
2018-05-15 15:01     ` Selvin Xavier
2018-05-09 16:47 ` [PATCH 0/6] treewide: Add and use dev_fmt similar to pr_fmt Corey Minyard
2018-05-09 17:04   ` Joe Perches
2018-05-09 17:22     ` Corey Minyard

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=20180707083528.GA2371@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=x86@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