* [PATCH v2] powerpc/eeh: powerpc/eeh: Fix undefined variable
@ 2013-08-07 6:01 Mike Qiu
2013-08-09 7:57 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Mike Qiu @ 2013-08-07 6:01 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Mike Qiu, shangw
'pe_no' hasn't been defined, it should be an typo error,
it should be 'frozen_pe_no'.
Also '__func__' has missed in IODA_EEH_DBG(),
For safety reasons, use pr_info() directly, instead
of use IODA_EEH_DBG()
Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/eeh-ioda.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index 0cd1c4a..8bc19c8 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -36,13 +36,6 @@
#include "powernv.h"
#include "pci.h"
-/* Debugging option */
-#ifdef IODA_EEH_DBG_ON
-#define IODA_EEH_DBG(args...) pr_info(args)
-#else
-#define IODA_EEH_DBG(args...)
-#endif
-
static char *hub_diag = NULL;
static int ioda_eeh_nb_init = 0;
@@ -823,17 +816,17 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
/* If OPAL API returns error, we needn't proceed */
if (rc != OPAL_SUCCESS) {
- IODA_EEH_DBG("%s: Invalid return value on "
- "PHB#%x (0x%lx) from opal_pci_next_error",
- __func__, hose->global_number, rc);
+ pr_info("%s: Invalid return value on "
+ "PHB#%x (0x%lx) from opal_pci_next_error",
+ __func__, hose->global_number, rc);
continue;
}
/* If the PHB doesn't have error, stop processing */
if (err_type == OPAL_EEH_NO_ERROR ||
severity == OPAL_EEH_SEV_NO_ERROR) {
- IODA_EEH_DBG("%s: No error found on PHB#%x\n",
- __func__, hose->global_number);
+ pr_info("%s: No error found on PHB#%x\n",
+ __func__, hose->global_number);
continue;
}
@@ -842,8 +835,9 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
* highest priority reported upon multiple errors on the
* specific PHB.
*/
- IODA_EEH_DBG("%s: Error (%d, %d, %d) on PHB#%x\n",
- err_type, severity, pe_no, hose->global_number);
+ pr_info("%s: Error (%d, %d, %d) on PHB#%x\n",
+ __func__, err_type, severity,
+ frozen_pe_no, hose->global_number);
switch (err_type) {
case OPAL_EEH_IOC_ERROR:
if (severity == OPAL_EEH_SEV_IOC_DEAD) {
--
1.8.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] powerpc/eeh: powerpc/eeh: Fix undefined variable
2013-08-07 6:01 [PATCH v2] powerpc/eeh: powerpc/eeh: Fix undefined variable Mike Qiu
@ 2013-08-09 7:57 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2013-08-09 7:57 UTC (permalink / raw)
To: Mike Qiu; +Cc: linuxppc-dev, shangw
On Wed, 2013-08-07 at 02:01 -0400, Mike Qiu wrote:
> 'pe_no' hasn't been defined, it should be an typo error,
> it should be 'frozen_pe_no'.
For some reason I can't find v3 of this in my mailbox, but it's
on patchwork so I tried applying it and it breaks the build
because %d doesn't work for a u64. Have you even tested it ?
Ben.
> Also '__func__' has missed iz IODA_EEH_DBG(),
>
> For safety reasons, use pr_info() directly, instead
> of use IODA_EEH_DBG()
>
> Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
> ---
> arch/powerpc/platforms/powernv/eeh-ioda.c | 22 ++++++++--------------
> 1 file changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
> index 0cd1c4a..8bc19c8 100644
> --- a/arch/powerpc/platforms/powernv/eeh-ioda.c
> +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
> @@ -36,13 +36,6 @@
> #include "powernv.h"
> #include "pci.h"
>
> -/* Debugging option */
> -#ifdef IODA_EEH_DBG_ON
> -#define IODA_EEH_DBG(args...) pr_info(args)
> -#else
> -#define IODA_EEH_DBG(args...)
> -#endif
> -
> static char *hub_diag = NULL;
> static int ioda_eeh_nb_init = 0;
>
> @@ -823,17 +816,17 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
>
> /* If OPAL API returns error, we needn't proceed */
> if (rc != OPAL_SUCCESS) {
> - IODA_EEH_DBG("%s: Invalid return value on "
> - "PHB#%x (0x%lx) from opal_pci_next_error",
> - __func__, hose->global_number, rc);
> + pr_info("%s: Invalid return value on "
> + "PHB#%x (0x%lx) from opal_pci_next_error",
> + __func__, hose->global_number, rc);
> continue;
> }
>
> /* If the PHB doesn't have error, stop processing */
> if (err_type == OPAL_EEH_NO_ERROR ||
> severity == OPAL_EEH_SEV_NO_ERROR) {
> - IODA_EEH_DBG("%s: No error found on PHB#%x\n",
> - __func__, hose->global_number);
> + pr_info("%s: No error found on PHB#%x\n",
> + __func__, hose->global_number);
> continue;
> }
>
> @@ -842,8 +835,9 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
> * highest priority reported upon multiple errors on the
> * specific PHB.
> */
> - IODA_EEH_DBG("%s: Error (%d, %d, %d) on PHB#%x\n",
> - err_type, severity, pe_no, hose->global_number);
> + pr_info("%s: Error (%d, %d, %d) on PHB#%x\n",
> + __func__, err_type, severity,
> + frozen_pe_no, hose->global_number);
> switch (err_type) {
> case OPAL_EEH_IOC_ERROR:
> if (severity == OPAL_EEH_SEV_IOC_DEAD) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-09 7:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07 6:01 [PATCH v2] powerpc/eeh: powerpc/eeh: Fix undefined variable Mike Qiu
2013-08-09 7:57 ` Benjamin Herrenschmidt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.