public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Joe Perches <joe@perches.com>, Bjorn Helgaas <helgaas@kernel.org>,
	kvm@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vfio: Use dev_printk() when possible
Date: Fri, 29 Mar 2019 14:32:39 -0600	[thread overview]
Message-ID: <20190329143239.60d4b9a6@x1.home> (raw)
In-Reply-To: <CAErSpo7bGn8JP9n6UaPUdTJ1ZFonnZX+C+bCFgfN4HH2Hu6OpA@mail.gmail.com>

On Fri, 29 Mar 2019 12:03:11 -0500
Bjorn Helgaas <bhelgaas@google.com> wrote:

> On Mon, Mar 25, 2019 at 3:49 PM Joe Perches <joe@perches.com> wrote:
> >
> > On Mon, 2019-03-25 at 14:42 -0500, Bjorn Helgaas wrote:  
> > > Use dev_printk() when possible to make messages consistent with other
> > > device-related messages.  
> >
> > trivial note:
> >  
> > > diff --git a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c  
> > []  
> > > @@ -89,7 +89,8 @@ static int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev)
> > >       } while ((pcs_value & MDIO_CTRL1_RESET) && --count);
> > >
> > >       if (pcs_value & MDIO_CTRL1_RESET)
> > > -             pr_warn("%s XGBE PHY reset timeout\n", __func__);
> > > +             dev_warn(&vdev->device, "%s XGBE PHY reset timeout\n",
> > > +                      __func__);  
> >
> > Many of these could use a colon after the %s used with __func__
> > to make the output more consistent with other modules.  
> 
> Thanks, Joe.  I added a colon to the two in
> vfio_platform_amdxgbe_reset().  Those were the only ones I saw, except
> for a couple "%s failed" messages in
> drivers/vfio/vfio_iommu_spapr_tce.c, which I didn't change because (1)
> they can't use dev_err() so slightly out of scope for this patch, and
> (2) it arguably reads more naturally without the colon.
> 
> In vfio_pci.c, I converted some pr_info() to dev_info() without adding
> a dev_fmt definition, so that removed the KBUILD_MODNAME prefix, which
> I didn't intend.  I'll add "#define dev_fmt pr_fmt" to restore the
> prefix.
> 
> Messages from drivers/vfio use a variety of prefixes (none, "VFIO: ",
> KBUILD_MODNAME, __func__).  That could potentially be rationalized but
> I would want Alex's guidance first.

Hmm, sort of hard to generalize.  I suspect "VFIO:" is not super
useful, the module name is probably a better choice, augmented by
__func__ where it adds useful context.  That's probably the approach
I'd take.  Thanks,

Alex

  reply	other threads:[~2019-03-29 20:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 19:42 [PATCH] vfio: Use dev_printk() when possible Bjorn Helgaas
2019-03-25 20:49 ` Joe Perches
2019-03-29 17:03   ` Bjorn Helgaas
2019-03-29 20:32     ` Alex Williamson [this message]
2019-03-25 21:59 ` Auger Eric
2019-03-28 20:40   ` Bjorn Helgaas

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=20190329143239.60d4b9a6@x1.home \
    --to=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=joe@perches.com \
    --cc=kvm@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