Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dae2743 authored by Gavin Shan's avatar Gavin Shan Committed by Benjamin Herrenschmidt
Browse files

powerpc/eeh: Replace pr_warning() with pr_warn()



pr_warn() is equal to pr_warning(), but the former is a bit more
formal according to commit fc62f2f1 ("kernel.h: add pr_warn for
symmetry to dev_warn, netdev_warn").

The patch replaces pr_warning() with pr_warn().

Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 0ed352dd
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ static int eeh_phb_check_failure(struct eeh_pe *pe)
	/* Find the PHB PE */
	phb_pe = eeh_phb_pe_get(pe->phb);
	if (!phb_pe) {
		pr_warning("%s Can't find PE for PHB#%d\n",
		pr_warn("%s Can't find PE for PHB#%d\n",
			__func__, pe->phb->global_number);
		return -EEXIST;
	}
@@ -787,13 +787,13 @@ void eeh_save_bars(struct eeh_dev *edev)
int __init eeh_ops_register(struct eeh_ops *ops)
{
	if (!ops->name) {
		pr_warning("%s: Invalid EEH ops name for %p\n",
		pr_warn("%s: Invalid EEH ops name for %p\n",
			__func__, ops);
		return -EINVAL;
	}

	if (eeh_ops && eeh_ops != ops) {
		pr_warning("%s: EEH ops of platform %s already existing (%s)\n",
		pr_warn("%s: EEH ops of platform %s already existing (%s)\n",
			__func__, eeh_ops->name, ops->name);
		return -EEXIST;
	}
@@ -813,7 +813,7 @@ int __init eeh_ops_register(struct eeh_ops *ops)
int __exit eeh_ops_unregister(const char *name)
{
	if (!name || !strlen(name)) {
		pr_warning("%s: Invalid EEH ops name\n",
		pr_warn("%s: Invalid EEH ops name\n",
			__func__);
		return -EINVAL;
	}
@@ -878,11 +878,11 @@ int eeh_init(void)

	/* call platform initialization function */
	if (!eeh_ops) {
		pr_warning("%s: Platform EEH operation not found\n",
		pr_warn("%s: Platform EEH operation not found\n",
			__func__);
		return -EEXIST;
	} else if ((ret = eeh_ops->init())) {
		pr_warning("%s: Failed to call platform init function (%d)\n",
		pr_warn("%s: Failed to call platform init function (%d)\n",
			__func__, ret);
		return ret;
	}
@@ -923,7 +923,7 @@ int eeh_init(void)
	if (eeh_enabled())
		pr_info("EEH: PCI Enhanced I/O Error Handling Enabled\n");
	else
		pr_warning("EEH: No capable adapters found\n");
		pr_warn("EEH: No capable adapters found\n");

	return ret;
}
+4 −3
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ eeh_addr_cache_insert(struct pci_dev *dev, unsigned long alo,
		} else {
			if (dev != piar->pcidev ||
			    alo != piar->addr_lo || ahi != piar->addr_hi) {
				pr_warning("PIAR: overlapping address range\n");
				pr_warn("PIAR: overlapping address range\n");
			}
			return piar;
		}
@@ -177,13 +177,14 @@ static void __eeh_addr_cache_insert_dev(struct pci_dev *dev)

	dn = pci_device_to_OF_node(dev);
	if (!dn) {
		pr_warning("PCI: no pci dn found for dev=%s\n", pci_name(dev));
		pr_warn("PCI: no pci dn found for dev=%s\n",
			pci_name(dev));
		return;
	}

	edev = of_node_to_eeh_dev(dn);
	if (!edev) {
		pr_warning("PCI: no EEH dev found for dn=%s\n",
		pr_warn("PCI: no EEH dev found for dn=%s\n",
			dn->full_name);
		return;
	}
+2 −1
Original line number Diff line number Diff line
@@ -57,7 +57,8 @@ void *eeh_dev_init(struct device_node *dn, void *data)
	/* Allocate EEH device */
	edev = kzalloc(sizeof(*edev), GFP_KERNEL);
	if (!edev) {
		pr_warning("%s: out of memory\n", __func__);
		pr_warn("%s: out of memory\n",
			__func__);
		return NULL;
	}

+8 −8
Original line number Diff line number Diff line
@@ -599,7 +599,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
	pe->freeze_count++;
	if (pe->freeze_count > EEH_MAX_ALLOWED_FREEZES)
		goto excess_failures;
	pr_warning("EEH: This PCI device has failed %d times in the last hour\n",
	pr_warn("EEH: This PCI device has failed %d times in the last hour\n",
		pe->freeze_count);

	/* Walk the various device drivers attached to this slot through
@@ -616,7 +616,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
	 */
	rc = eeh_ops->wait_state(pe, MAX_WAIT_FOR_RECOVERY*1000);
	if (rc < 0 || rc == EEH_STATE_NOT_SUPPORT) {
		pr_warning("EEH: Permanent failure\n");
		pr_warn("EEH: Permanent failure\n");
		goto hard_fail;
	}

@@ -635,7 +635,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
		pr_info("EEH: Reset with hotplug activity\n");
		rc = eeh_reset_device(pe, frozen_bus);
		if (rc) {
			pr_warning("%s: Unable to reset, err=%d\n",
			pr_warn("%s: Unable to reset, err=%d\n",
				__func__, rc);
			goto hard_fail;
		}
@@ -678,7 +678,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)

	/* If any device has a hard failure, then shut off everything. */
	if (result == PCI_ERS_RESULT_DISCONNECT) {
		pr_warning("EEH: Device driver gave up\n");
		pr_warn("EEH: Device driver gave up\n");
		goto hard_fail;
	}

@@ -687,7 +687,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
		pr_info("EEH: Reset without hotplug activity\n");
		rc = eeh_reset_device(pe, NULL);
		if (rc) {
			pr_warning("%s: Cannot reset, err=%d\n",
			pr_warn("%s: Cannot reset, err=%d\n",
				__func__, rc);
			goto hard_fail;
		}
@@ -701,7 +701,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
	/* All devices should claim they have recovered by now. */
	if ((result != PCI_ERS_RESULT_RECOVERED) &&
	    (result != PCI_ERS_RESULT_NONE)) {
		pr_warning("EEH: Not recovered\n");
		pr_warn("EEH: Not recovered\n");
		goto hard_fail;
	}

+2 −1
Original line number Diff line number Diff line
@@ -179,7 +179,8 @@ void *eeh_pe_dev_traverse(struct eeh_pe *root,
	void *ret;

	if (!root) {
		pr_warning("%s: Invalid PE %p\n", __func__, root);
		pr_warn("%s: Invalid PE %p\n",
			__func__, root);
		return NULL;
	}

Loading