linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: fred@fredlawl.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, mika.westerberg@linux.intel.com,
	lukas@wunner.de, keith.busch@intel.com, mr.nuke.me@gmail.com,
	liudongdong3@huawei.com, thesven73@gmail.com
Subject: Re: [PATCH 3/4] PCI: pciehp: Remove unused macro definitions
Date: Sun, 28 Apr 2019 19:13:02 -0500	[thread overview]
Message-ID: <20190429001302.GL14616@google.com> (raw)
In-Reply-To: <20190428155536.GU9224@smile.fi.intel.com>

On Sun, Apr 28, 2019 at 06:55:36PM +0300, Andy Shevchenko wrote:
> On Sat, Apr 27, 2019 at 02:13:03PM -0500, fred@fredlawl.com wrote:
> > Now that all uses for the ctrl_*() printk wrappers are removed from
> > files and replaces with pci_*() or pr_*() printk wrappers, remove the
> > unused macro definitions. In addition to that, remove the MY_NAME macro.
> 
> >  extern bool pciehp_debug;
> 
> How it's used after all?
> 
> > -#define dbg(format, arg...)						\
> > -do {									\
> > -	if (pciehp_debug)						\
> > -		printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg);	\
> > -} while (0)
> 
> > -#define ctrl_dbg(ctrl, format, arg...)					\
> > -	do {								\
> > -		if (pciehp_debug)					\
> > -			dev_printk(KERN_DEBUG, &ctrl->pcie->device,	\
> > -					format, ## arg);		\
> > -	} while (0)
> 
> Besides ruining the pciehp_debug support this will make unequivalent behaviour.

I'm not super attached to pciehp_debug.  But perhaps pciehp is one
place where it would make sense to use pci_dbg().

There are a lot of uses of ctrl_dbg() and some of them look like
they're too low-level to just convert to pci_info(), e.g., info about
every command we write to the controller.  We probably don't need all
that info all the time.

But if we want to keep it, maybe we could convert it to use pci_dbg()
and the dynamic debug stuff.  I'm pretty sure the dyndbg syntax is
complicated enough to enable pciehp logging specifically.  Then we
could use that instead of the pciehp-specific module parameter.

Bjorn

  reply	other threads:[~2019-04-29  0:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-27 19:13 [PATCH 0/4] PCI: Use PCIe service name in dmesg logs fred
2019-04-27 19:13 ` [PATCH 1/4] PCI: Replace dev_*() printk wrappers with pci_*() printk wrappers fred
2019-04-28 15:43   ` Andy Shevchenko
2019-04-30 22:25     ` Frederick Lawler
2019-04-29  0:02   ` Bjorn Helgaas
2019-04-29  0:52     ` Bjorn Helgaas
2019-04-30 22:26       ` Frederick Lawler
2019-04-27 19:13 ` [PATCH 2/4] PCI: pciehp: Replace ctrl_*() with pci_*() fred
2019-04-27 20:03   ` Lukas Wunner
2019-04-29  0:36     ` Bjorn Helgaas
2019-04-27 19:13 ` [PATCH 3/4] PCI: pciehp: Remove unused macro definitions fred
2019-04-28 15:55   ` Andy Shevchenko
2019-04-29  0:13     ` Bjorn Helgaas [this message]
2019-04-27 19:13 ` [PATCH 4/4] PCI/portdrv: Add dev_fmt() to port drivers fred
2019-04-29  0:17   ` 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=20190429001302.GL14616@google.com \
    --to=helgaas@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=fred@fredlawl.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liudongdong3@huawei.com \
    --cc=lukas@wunner.de \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mr.nuke.me@gmail.com \
    --cc=thesven73@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).