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 <[email protected]>
---
 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

Reply via email to