powerpc/eeh: Replace pr_warning() with pr_warn()
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Thu, 17 Jul 2014 04:41:41 +0000 (14:41 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 5 Aug 2014 05:41:34 +0000 (15:41 +1000)
pr_warn() is equal to pr_warning(), but the former is a bit more
formal according to commit fc62f2f ("kernel.h: add pr_warn for
symmetry to dev_warn, netdev_warn").

The patch replaces pr_warning() with pr_warn().

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/eeh.c
arch/powerpc/kernel/eeh_cache.c
arch/powerpc/kernel/eeh_dev.c
arch/powerpc/kernel/eeh_driver.c
arch/powerpc/kernel/eeh_pe.c
arch/powerpc/platforms/powernv/eeh-ioda.c
arch/powerpc/platforms/powernv/eeh-powernv.c
arch/powerpc/platforms/pseries/eeh_pseries.c

index afde50549ca274625efcc56a4cbedb9496b57c40..02a67740b151ebde3c1be0c3f6354a448df47aaa 100644 (file)
@@ -337,8 +337,8 @@ 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",
-                          __func__, pe->phb->global_number);
+               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;
 }
index 3639bee5d9cea964beeaab85f78bb2758e4f73fa..07d8a2423a6140a7ac8320c536f998752a28c868 100644 (file)
@@ -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;
        }
index 1efa28f5fc54c9e4234eef5439b0137f39654b1d..e5274ee9a75f0a1c909a539bbb1a934e011105d9 100644 (file)
@@ -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;
        }
 
index 420da61d4ce001d74ba64b675f8615b65f6e812a..6a0dcee8e931f6584ac5066b8997e114dbc2cba9 100644 (file)
@@ -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,8 +635,8 @@ 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",
-                                  __func__, rc);
+                       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,8 +687,8 @@ 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",
-                                  __func__, rc);
+                       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;
        }
 
index 418d79c9eaa4df0a6fc9930eba3f8a3dc5724866..77632abf6a7587a23e55f65276be483fa742d04d 100644 (file)
@@ -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;
        }
 
index f6abdb11ee84fb073ee14ff7f09663362cb77594..5ab61b78dfc6f44fdb44c85b2dd47e5ce5c494fa 100644 (file)
@@ -247,8 +247,8 @@ static void ioda_eeh_phb_diag(struct pci_controller *hose)
        rc = opal_pci_get_phb_diag_data2(phb->opal_id, phb->diag.blob,
                                         PNV_PCI_DIAG_BUF_SIZE);
        if (rc != OPAL_SUCCESS) {
-               pr_warning("%s: Failed to get diag-data for PHB#%x (%ld)\n",
-                           __func__, hose->global_number, rc);
+               pr_warn("%s: Failed to get diag-data for PHB#%x (%ld)\n",
+                       __func__, hose->global_number, rc);
                return;
        }
 
@@ -627,8 +627,8 @@ static void ioda_eeh_hub_diag(struct pci_controller *hose)
 
        rc = opal_pci_get_hub_diag_data(phb->hub_id, data, sizeof(*data));
        if (rc != OPAL_SUCCESS) {
-               pr_warning("%s: Failed to get HUB#%llx diag-data (%ld)\n",
-                          __func__, phb->hub_id, rc);
+               pr_warn("%s: Failed to get HUB#%llx diag-data (%ld)\n",
+                       __func__, phb->hub_id, rc);
                return;
        }
 
@@ -664,8 +664,8 @@ static void ioda_eeh_hub_diag(struct pci_controller *hose)
                ioda_eeh_hub_diag_common(data);
                break;
        default:
-               pr_warning("%s: Invalid type of HUB#%llx diag-data (%d)\n",
-                          __func__, phb->hub_id, data->type);
+               pr_warn("%s: Invalid type of HUB#%llx diag-data (%d)\n",
+                       __func__, phb->hub_id, data->type);
        }
 }
 
index 0401f84f7b894f3cb9ecaaacccb12b861167a928..4a113f3c91719abf6eedbb52f8648fe61b70106d 100644 (file)
@@ -50,7 +50,8 @@ static int powernv_eeh_init(void)
 
        /* We require OPALv3 */
        if (!firmware_has_feature(FW_FEATURE_OPALv3)) {
-               pr_warning("%s: OPALv3 is required !\n", __func__);
+               pr_warn("%s: OPALv3 is required !\n",
+                       __func__);
                return -EINVAL;
        }
 
@@ -304,8 +305,8 @@ static int powernv_eeh_wait_state(struct eeh_pe *pe, int max_wait)
 
                max_wait -= mwait;
                if (max_wait <= 0) {
-                       pr_warning("%s: Timeout getting PE#%x's state (%d)\n",
-                                  __func__, pe->addr, max_wait);
+                       pr_warn("%s: Timeout getting PE#%x's state (%d)\n",
+                               __func__, pe->addr, max_wait);
                        return EEH_STATE_NOT_SUPPORT;
                }
 
index dd1874ca56d9d854f89b94c71be78cd48f8026f3..b08053819d99f1f9d2a7da36828faa268837e66e 100644 (file)
@@ -89,26 +89,26 @@ static int pseries_eeh_init(void)
         * of domain/bus/slot/function for EEH RTAS operations.
         */
        if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE) {
-               pr_warning("%s: RTAS service <ibm,set-eeh-option> invalid\n",
+               pr_warn("%s: RTAS service <ibm,set-eeh-option> invalid\n",
                        __func__);
                return -EINVAL;
        } else if (ibm_set_slot_reset == RTAS_UNKNOWN_SERVICE) {
-               pr_warning("%s: RTAS service <ibm,set-slot-reset> invalid\n",
+               pr_warn("%s: RTAS service <ibm,set-slot-reset> invalid\n",
                        __func__);
                return -EINVAL;
        } else if (ibm_read_slot_reset_state2 == RTAS_UNKNOWN_SERVICE &&
                   ibm_read_slot_reset_state == RTAS_UNKNOWN_SERVICE) {
-               pr_warning("%s: RTAS service <ibm,read-slot-reset-state2> and "
+               pr_warn("%s: RTAS service <ibm,read-slot-reset-state2> and "
                        "<ibm,read-slot-reset-state> invalid\n",
                        __func__);
                return -EINVAL;
        } else if (ibm_slot_error_detail == RTAS_UNKNOWN_SERVICE) {
-               pr_warning("%s: RTAS service <ibm,slot-error-detail> invalid\n",
+               pr_warn("%s: RTAS service <ibm,slot-error-detail> invalid\n",
                        __func__);
                return -EINVAL;
        } else if (ibm_configure_pe == RTAS_UNKNOWN_SERVICE &&
                   ibm_configure_bridge == RTAS_UNKNOWN_SERVICE) {
-               pr_warning("%s: RTAS service <ibm,configure-pe> and "
+               pr_warn("%s: RTAS service <ibm,configure-pe> and "
                        "<ibm,configure-bridge> invalid\n",
                        __func__);
                return -EINVAL;
@@ -118,11 +118,11 @@ static int pseries_eeh_init(void)
        spin_lock_init(&slot_errbuf_lock);
        eeh_error_buf_size = rtas_token("rtas-error-log-max");
        if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) {
-               pr_warning("%s: unknown EEH error log size\n",
+               pr_warn("%s: unknown EEH error log size\n",
                        __func__);
                eeh_error_buf_size = 1024;
        } else if (eeh_error_buf_size > RTAS_ERROR_LOG_MAX) {
-               pr_warning("%s: EEH error log size %d exceeds the maximal %d\n",
+               pr_warn("%s: EEH error log size %d exceeds the maximal %d\n",
                        __func__, eeh_error_buf_size, RTAS_ERROR_LOG_MAX);
                eeh_error_buf_size = RTAS_ERROR_LOG_MAX;
        }
@@ -270,7 +270,7 @@ static void *pseries_eeh_of_probe(struct device_node *dn, void *flag)
        /* Retrieve the device address */
        regs = of_get_property(dn, "reg", NULL);
        if (!regs) {
-               pr_warning("%s: OF node property %s::reg not found\n",
+               pr_warn("%s: OF node property %s::reg not found\n",
                        __func__, dn->full_name);
                return NULL;
        }
@@ -398,7 +398,7 @@ static int pseries_eeh_get_pe_addr(struct eeh_pe *pe)
                                pe->config_addr, BUID_HI(pe->phb->buid),
                                BUID_LO(pe->phb->buid), 0);
                if (ret) {
-                       pr_warning("%s: Failed to get address for PHB#%d-PE#%x\n",
+                       pr_warn("%s: Failed to get address for PHB#%d-PE#%x\n",
                                __func__, pe->phb->global_number, pe->config_addr);
                        return 0;
                }
@@ -411,7 +411,7 @@ static int pseries_eeh_get_pe_addr(struct eeh_pe *pe)
                                pe->config_addr, BUID_HI(pe->phb->buid),
                                BUID_LO(pe->phb->buid), 0);
                if (ret) {
-                       pr_warning("%s: Failed to get address for PHB#%d-PE#%x\n",
+                       pr_warn("%s: Failed to get address for PHB#%d-PE#%x\n",
                                __func__, pe->phb->global_number, pe->config_addr);
                        return 0;
                }
@@ -584,17 +584,17 @@ static int pseries_eeh_wait_state(struct eeh_pe *pe, int max_wait)
                        return ret;
 
                if (max_wait <= 0) {
-                       pr_warning("%s: Timeout when getting PE's state (%d)\n",
+                       pr_warn("%s: Timeout when getting PE's state (%d)\n",
                                __func__, max_wait);
                        return EEH_STATE_NOT_SUPPORT;
                }
 
                if (mwait <= 0) {
-                       pr_warning("%s: Firmware returned bad wait value %d\n",
+                       pr_warn("%s: Firmware returned bad wait value %d\n",
                                __func__, mwait);
                        mwait = EEH_STATE_MIN_WAIT_TIME;
                } else if (mwait > EEH_STATE_MAX_WAIT_TIME) {
-                       pr_warning("%s: Firmware returned too long wait value %d\n",
+                       pr_warn("%s: Firmware returned too long wait value %d\n",
                                __func__, mwait);
                        mwait = EEH_STATE_MAX_WAIT_TIME;
                }
@@ -675,7 +675,7 @@ static int pseries_eeh_configure_bridge(struct eeh_pe *pe)
        }
 
        if (ret)
-               pr_warning("%s: Unable to configure bridge PHB#%d-PE#%x (%d)\n",
+               pr_warn("%s: Unable to configure bridge PHB#%d-PE#%x (%d)\n",
                        __func__, pe->phb->global_number, pe->addr, ret);
 
        return ret;