From: Emanuel Bennici <benniciemanuel78@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Tyrel Datwyler <tyreld@linux.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Joe Perches <joe@perches.com>,
Sebastian Ott <sebott@linux.ibm.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Lukas Wunner <lukas@wunner.de>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH] pci: hotplug: Replace function names with __func__ Macro
Date: Sun, 2 Jun 2019 18:12:46 +0200 [thread overview]
Message-ID: <20190602161254.31521-1-benniciemanuel78@gmail.com> (raw)
Replace hardcoded function names with __func__ Macro so if the function
name changes we have not to check all Messages and to retain the code
structure.
Signed-off-by: Emanuel Bennici <benniciemanuel78@gmail.com>
---
drivers/pci/hotplug/cpqphp_ctrl.c | 4 ++--
drivers/pci/hotplug/ibmphp_ebda.c | 4 ++--
drivers/pci/hotplug/ibmphp_hpc.c | 15 ++++++++-------
drivers/pci/hotplug/ibmphp_res.c | 2 +-
drivers/pci/hotplug/rpaphp_slot.c | 3 ++-
5 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
index b7f4e1f099d9..4f4e3725566e 100644
--- a/drivers/pci/hotplug/cpqphp_ctrl.c
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c
@@ -401,7 +401,7 @@ static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **h
struct pci_resource *split_node;
u32 rc;
u32 temp_dword;
- dbg("do_pre_bridge_resource_split\n");
+ dbg("%s\n", __func__);
if (!(*head) || !(*orig_head))
return NULL;
@@ -2297,7 +2297,7 @@ static u32 configure_new_device(struct controller *ctrl, struct pci_func *func
}
} while (function < max_functions);
- dbg("returning from configure_new_device\n");
+ dbg("returning from %s\n", __func__);
return 0;
}
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index 7e523ce071b3..7bea904a5203 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -130,7 +130,7 @@ static void __init print_bus_info(void)
static void print_lo_info(void)
{
struct rio_detail *ptr;
- debug("print_lo_info ----\n");
+ debug("%s ----\n", __func__);
list_for_each_entry(ptr, &rio_lo_head, rio_detail_list) {
debug("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id);
debug("%s - rio_type = %x\n", __func__, ptr->rio_type);
@@ -1112,7 +1112,7 @@ static int ibmphp_probe(struct pci_dev *dev, const struct pci_device_id *ids)
{
struct controller *ctrl;
- debug("inside ibmphp_probe\n");
+ debug("inside %s\n", __func__);
list_for_each_entry(ctrl, &ebda_hpc_head, ebda_hpc_list) {
if (ctrl->ctlr_type == 1) {
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c
index 508a62a6b5f9..6846923b42d3 100644
--- a/drivers/pci/hotplug/ibmphp_hpc.c
+++ b/drivers/pci/hotplug/ibmphp_hpc.c
@@ -350,7 +350,7 @@ static void isa_ctrl_write(struct controller *ctlr_ptr, u8 offset, u8 data)
static u8 pci_ctrl_read(struct controller *ctrl, u8 offset)
{
u8 data = 0x00;
- debug("inside pci_ctrl_read\n");
+ debug("inside %s\n", __func__);
if (ctrl->ctrl_dev)
pci_read_config_byte(ctrl->ctrl_dev, HPC_PCI_OFFSET + offset, &data);
return data;
@@ -359,7 +359,7 @@ static u8 pci_ctrl_read(struct controller *ctrl, u8 offset)
static u8 pci_ctrl_write(struct controller *ctrl, u8 offset, u8 data)
{
u8 rc = -ENODEV;
- debug("inside pci_ctrl_write\n");
+ debug("inside %s\n", __func__);
if (ctrl->ctrl_dev) {
pci_write_config_byte(ctrl->ctrl_dev, HPC_PCI_OFFSET + offset, data);
rc = 0;
@@ -445,7 +445,7 @@ static u8 hpc_writecmdtoindex(u8 cmd, u8 index)
break;
default:
- err("hpc_writecmdtoindex - Error invalid cmd[%x]\n", cmd);
+ err("%s - Error invalid cmd[%x]\n", __func__, cmd);
rc = HPC_ERROR;
}
@@ -903,7 +903,8 @@ static int process_changeinstatus(struct slot *pslot, struct slot *poldslot)
u8 disable = 0;
u8 update = 0;
- debug("process_changeinstatus - Entry pslot[%p], poldslot[%p]\n", pslot, poldslot);
+ debug("%s - Entry pslot[%p], poldslot[%p]\n", __func__, pslot,
+ poldslot);
// bit 0 - HPC_SLOT_POWER
if ((pslot->status & 0x01) != (poldslot->status & 0x01))
@@ -959,7 +960,7 @@ static int process_changeinstatus(struct slot *pslot, struct slot *poldslot)
update = 1;
if (disable) {
- debug("process_changeinstatus - disable slot\n");
+ debug("%s - disable slot\n", __func__);
pslot->flag = 0;
rc = ibmphp_do_disable_slot(pslot);
}
@@ -1071,7 +1072,7 @@ static int hpc_wait_ctlr_notworking(int timeout, struct controller *ctlr_ptr, vo
int rc = 0;
u8 done = 0;
- debug_polling("hpc_wait_ctlr_notworking - Entry timeout[%d]\n", timeout);
+ debug_polling("%s - Entry timeout[%d]\n", __func__, timeout);
while (!done) {
*pstatus = ctrl_read(ctlr_ptr, wpg_bbar, WPG_CTLR_INDEX);
@@ -1091,6 +1092,6 @@ static int hpc_wait_ctlr_notworking(int timeout, struct controller *ctlr_ptr, vo
timeout--;
}
}
- debug_polling("hpc_wait_ctlr_notworking - Exit rc[%x] status[%x]\n", rc, *pstatus);
+ debug_polling("%s - Exit rc[%x] status[%x]\n", __func__, rc, *pstatus);
return rc;
}
diff --git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c
index 5e8caf7a4452..b12dc0ea04cf 100644
--- a/drivers/pci/hotplug/ibmphp_res.c
+++ b/drivers/pci/hotplug/ibmphp_res.c
@@ -1351,7 +1351,7 @@ int ibmphp_remove_bus(struct bus_node *bus, u8 parent_busno)
return -ENODEV;
}
- debug("In ibmphp_remove_bus... prev_bus->busno is %x\n", prev_bus->busno);
+ debug("In %s ... prev_bus->busno is %x\n", __func__, prev_bus->busno);
rc = remove_ranges(bus, prev_bus);
if (rc)
diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c
index 93b4a945c55d..1cbd307df635 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -92,7 +92,8 @@ int rpaphp_register_slot(struct slot *slot)
/* should not try to register the same slot twice */
if (is_registered(slot)) {
- err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
+ err("%s: slot[%s] is already registered\n", __func__,
+ slot->name);
return -EAGAIN;
}
--
2.19.1
next reply other threads:[~2019-06-02 16:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-02 16:12 Emanuel Bennici [this message]
2019-06-02 16:24 ` Joe Perches
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=20190602161254.31521-1-benniciemanuel78@gmail.com \
--to=benniciemanuel78@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=rafael.j.wysocki@intel.com \
--cc=sebott@linux.ibm.com \
--cc=tyreld@linux.ibm.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
all inboxes | Powered by JetHome®