[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190503035946.23608-8-fred@fredlawl.com>
Date: Thu, 2 May 2019 22:59:44 -0500
From: Frederick Lawler <fred@...dlawl.com>
To: bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
mika.westerberg@...ux.intel.com, lukas@...ner.de,
andriy.shevchenko@...ux.intel.com, keith.busch@...el.com,
mr.nuke.me@...il.com, liudongdong3@...wei.com, thesven73@...il.com,
Frederick Lawler <fred@...dlawl.com>
Subject: [PATCH v2 7/9] PCI: hotplug: Prefer CONFIG_DYNAMIC_DEBUG/DEBUG for dmesg logs
dbg() and ctrl_dbg() requires pciehp_debug module parameter to be set
for debug log purposes. There are niche situations in pciehp_hpc.c where
pciehp_debug is used: dbg_ctrl(), and pci_bus_check_dev().
Enabling CONFIG_DYNAMIC_DEBUG/DEBUG is well known for logging debug
information. Therefore, prefer pr/pci_dbg() for debug information, and
reserve pciehp_debug for niche situations.
Signed-off-by: Frederick Lawler <fred@...dlawl.com>
---
drivers/pci/hotplug/pciehp.h | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 78325c8d961e..e852aa478802 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -32,10 +32,7 @@ extern int pciehp_poll_time;
extern bool pciehp_debug;
#define dbg(format, arg...) \
-do { \
- if (pciehp_debug) \
- pr_info(format, ## arg); \
-} while (0)
+ pr_debug(format, ## arg);
#define err(format, arg...) \
pr_err(format, ## arg)
#define info(format, arg...) \
@@ -44,11 +41,7 @@ do { \
pr_warn(format, ## arg)
#define ctrl_dbg(ctrl, format, arg...) \
- do { \
- if (pciehp_debug) \
- pci_info(ctrl->pcie->port, \
- format, ## arg); \
- } while (0)
+ pci_dbg(ctrl->pcie->port, format, ## arg)
#define ctrl_err(ctrl, format, arg...) \
pci_err(ctrl->pcie->port, format, ## arg)
#define ctrl_info(ctrl, format, arg...) \
--
2.17.1
Powered by blists - more mailing lists