lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun,  2 Jun 2019 17:56:17 +0200
From:   Emanuel Bennici <benniciemanuel78@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>, Joe Perches <joe@...ches.com>,
        Lukas Wunner <lukas@...ner.de>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Tyrel Datwyler <tyreld@...ux.vnet.ibm.com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Arnd Bergmann <arnd@...db.de>
Subject: [PATCH] pci: ibmphp: Replace functionname with __func__ in Messages

Replace the hardcoded Function-Names in error and debug Messages with
the __func__ Macro.
If the Function-Name changes we haven't to check all the error/ debug
messages.

Signed-off-by: Emanuel Bennici <benniciemanuel78@...il.com>
---
 drivers/pci/hotplug/ibmphp_core.c | 34 +++++++++++++++----------------
 1 file changed, 16 insertions(+), 18 deletions(-)

diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index 17124254d897..59840a094973 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -194,7 +194,7 @@ static inline int power_on(struct slot *slot_cur)
 		return retval;
 	}
 	if (CTLR_RESULT(slot_cur->ctrl->status)) {
-		err("command not completed successfully in power_on\n");
+		err("command not completed successfully in %s\n", __func__);
 		return -EIO;
 	}
 	msleep(3000);	/* For ServeRAID cards, and some 66 PCI */
@@ -212,7 +212,7 @@ static inline int power_off(struct slot *slot_cur)
 		return retval;
 	}
 	if (CTLR_RESULT(slot_cur->ctrl->status)) {
-		err("command not completed successfully in power_off\n");
+		err("command not completed successfully in %s\n", __func__);
 		retval = -EIO;
 	}
 	return retval;
@@ -224,8 +224,8 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
 	struct slot *pslot;
 	u8 cmd = 0x00;     /* avoid compiler warning */

-	debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n",
-			(ulong) hotplug_slot, value);
+	debug("%s - Entry hotplug_slot[%lx] value[%x]\n",
+			__func__, (ulong) hotplug_slot, value);
 	ibmphp_lock_operations();


@@ -242,7 +242,7 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
 			break;
 		default:
 			rc = -ENODEV;
-			err("set_attention_status - Error : invalid input [%x]\n",
+			err("%s - Error : invalid input [%x]\n", __func__,
 					value);
 			break;
 		}
@@ -255,7 +255,7 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)

 	ibmphp_unlock_operations();

-	debug("set_attention_status - Exit rc[%d]\n", rc);
+	debug("%s - Exit rc[%d]\n", __func__, rc);
 	return rc;
 }

@@ -265,7 +265,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
 	struct slot *pslot;
 	struct slot myslot;

-	debug("get_attention_status - Entry hotplug_slot[%lx] pvalue[%lx]\n",
+	debug("%s - Entry hotplug_slot[%lx] pvalue[%lx]\n", __func__,
 					(ulong) hotplug_slot, (ulong) value);

 	ibmphp_lock_operations();
@@ -282,7 +282,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
 	}

 	ibmphp_unlock_operations();
-	debug("get_attention_status - Exit rc[%d] value[%x]\n", rc, *value);
+	debug("%s - Exit rc[%d] value[%x]\n", __func__, rc, *value);
 	return rc;
 }

@@ -292,7 +292,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
 	struct slot *pslot;
 	struct slot myslot;

-	debug("get_latch_status - Entry hotplug_slot[%lx] pvalue[%lx]\n",
+	debug("%s - Entry hotplug_slot[%lx] pvalue[%lx]\n", __func__,
 					(ulong) hotplug_slot, (ulong) value);
 	ibmphp_lock_operations();
 	if (hotplug_slot) {
@@ -305,8 +305,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
 	}

 	ibmphp_unlock_operations();
-	debug("get_latch_status - Exit rc[%d] rc[%x] value[%x]\n",
-			rc, rc, *value);
+	debug("%s - Exit rc[%d] rc[%x] value[%x]\n", __func__, rc, rc, *value);
 	return rc;
 }

@@ -317,7 +316,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
 	struct slot *pslot;
 	struct slot myslot;

-	debug("get_power_status - Entry hotplug_slot[%lx] pvalue[%lx]\n",
+	debug("%s - Entry hotplug_slot[%lx] pvalue[%lx]\n", __func__,
 					(ulong) hotplug_slot, (ulong) value);
 	ibmphp_lock_operations();
 	if (hotplug_slot) {
@@ -330,8 +329,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
 	}

 	ibmphp_unlock_operations();
-	debug("get_power_status - Exit rc[%d] rc[%x] value[%x]\n",
-			rc, rc, *value);
+	debug("%s - Exit rc[%d] rc[%x] value[%x]\n", __func__, rc, rc, *value);
 	return rc;
 }

@@ -360,7 +358,7 @@ static int get_adapter_present(struct hotplug_slot *hotplug_slot, u8 *value)
 	}

 	ibmphp_unlock_operations();
-	debug("get_adapter_present - Exit rc[%d] value[%x]\n", rc, *value);
+	debug("%s - Exit rc[%d] value[%x]\n", __func__, rc, *value);
 	return rc;
 }

@@ -711,8 +709,7 @@ static u8 bus_structure_fixup(u8 busno)
 	for (dev->devfn = 0; dev->devfn < 256; dev->devfn += 8) {
 		if (!pci_read_config_word(dev, PCI_VENDOR_ID, &l) &&
 					(l != 0x0000) && (l != 0xffff)) {
-			debug("%s - Inside bus_structure_fixup()\n",
-							__func__);
+			debug("%s - Inside %s\n", __func__, __func__);
 			b = pci_scan_bus(busno, ibmphp_pci_bus->ops, NULL);
 			if (!b)
 				continue;
@@ -885,7 +882,8 @@ static int set_bus(struct slot *slot_cur)
 			return retval;
 		}
 		if (CTLR_RESULT(slot_cur->ctrl->status)) {
-			err("command not completed successfully in set_bus\n");
+			err("command not completed successfully in %s\n",
+				__func__);
 			return -EIO;
 		}
 	}
--
2.19.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ