From: Bjorn Helgaas <helgaas@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org,
Karolina Stolarek <karolina.stolarek@oracle.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
Oliver O'Halloran <oohall@gmail.com>
Subject: Re: [PATCH 3/4] PCI: shpchp: Cleanup logging and debug wrappers
Date: Thu, 13 Feb 2025 16:04:53 -0600 [thread overview]
Message-ID: <20250213220453.GA135512@bhelgaas> (raw)
In-Reply-To: <20241216161012.1774-4-ilpo.jarvinen@linux.intel.com>
On Mon, Dec 16, 2024 at 06:10:11PM +0200, Ilpo Järvinen wrote:
> The shpchp hotplug driver defines logging wrappers ctrl_*() and another
> set of wrappers with generic names which are just duplicates of
> existing generic printk() wrappers. Only the former are useful to
> preserve as they handle the controller dereferencing (the latter are
> also unused).
>
> The "shpchp_debug" module parameter is used to enable debug logging.
> The generic ability to turn on/off debug prints dynamically covers this
> usecase already so there is no need to module specific debug handling.
> The ctrl_dbg() wrapper also uses a low-level pci_printk() despite
> always using KERN_DEBUG level.
I think it's great to get rid of the module param. Can you include
a hint about how users of shpchp_debug should now enable debug prints?
The one I have in my notes is to set CONFIG_DYNAMIC_DEBUG=y and boot
with 'dyndbg="file drivers/pci/* +p"'.
> Convert ctrl_dbg() to use the pci_dbg() and remove "shpchp_debug" check
> from it.
>
> Removing the non-ctrl variants of logging wrappers and "shpchp_debug"
> module parameter as they are no longer used.
> -#define dbg(format, arg...) \
> -do { \
> - if (shpchp_debug) \
> - printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg); \
> -} while (0)
> -#define err(format, arg...) \
> - printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
> -#define info(format, arg...) \
> - printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
> -#define warn(format, arg...) \
> - printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
The above are unused, aren't they? Can we make a separate patch to
remove these, for ease of describing and reviewing?
Bjorn
next prev parent reply other threads:[~2025-02-13 22:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 16:10 [PATCH 0/4] PCI: pci_printk() removal (+ related cleanups) Ilpo Järvinen
2024-12-16 16:10 ` [PATCH 1/4] PCI: shpchp: Remove logging from module init/exit functions Ilpo Järvinen
2024-12-16 16:10 ` [PATCH 2/4] PCI: shpchp: Change dbg() -> ctrl_dbg() Ilpo Järvinen
2024-12-16 16:10 ` [PATCH 3/4] PCI: shpchp: Cleanup logging and debug wrappers Ilpo Järvinen
2025-02-13 22:04 ` Bjorn Helgaas [this message]
2025-02-14 14:37 ` Ilpo Järvinen
2024-12-16 16:10 ` [PATCH 4/4] PCI: Descope pci_printk() to aer_printk() Ilpo Järvinen
2025-02-13 22:10 ` Bjorn Helgaas
2025-02-14 11:56 ` Ilpo Järvinen
2025-02-14 20:37 ` Bjorn Helgaas
2025-02-13 22:14 ` [PATCH 0/4] PCI: pci_printk() removal (+ related cleanups) 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=20250213220453.GA135512@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=karolina.stolarek@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.ibm.com \
--cc=oohall@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.