All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/eeh: Fix undefined variable
@ 2013-08-07  2:24 Mike Qiu
  2013-08-07  2:34 ` Gavin Shan
  2013-08-07  5:11 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Qiu @ 2013-08-07  2:24 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__' should be added to IODA_EEH_DBG(),

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/eeh-ioda.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index 0cd1c4a..a49bee7 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -843,7 +843,8 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
 		 * specific PHB.
 		 */
 		IODA_EEH_DBG("%s: Error (%d, %d, %d) on PHB#%x\n",
-			err_type, severity, pe_no, hose->global_number);
+			__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] 5+ messages in thread

* Re: [PATCH] powerpc/eeh: Fix undefined variable
  2013-08-07  2:24 [PATCH] powerpc/eeh: Fix undefined variable Mike Qiu
@ 2013-08-07  2:34 ` Gavin Shan
  2013-08-07  5:11 ` Michael Ellerman
  1 sibling, 0 replies; 5+ messages in thread
From: Gavin Shan @ 2013-08-07  2:34 UTC (permalink / raw)
  To: Mike Qiu; +Cc: linuxppc-dev, shangw

On Tue, Aug 06, 2013 at 10:24:46PM -0400, Mike Qiu wrote:
>'pe_no' hasn't been defined, it should be an typo error,
>it should be 'frozen_pe_no'.
>
>Also '__func__' should be added to IODA_EEH_DBG(),
>
>Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>

Acked-by: Gavin Shan <shangw@linux.vnet.ibm.com>

>---
> arch/powerpc/platforms/powernv/eeh-ioda.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
>index 0cd1c4a..a49bee7 100644
>--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
>+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
>@@ -843,7 +843,8 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
> 		 * specific PHB.
> 		 */
> 		IODA_EEH_DBG("%s: Error (%d, %d, %d) on PHB#%x\n",
>-			err_type, severity, pe_no, hose->global_number);
>+			__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) {

Thanks,
Gavin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/eeh: Fix undefined variable
  2013-08-07  2:24 [PATCH] powerpc/eeh: Fix undefined variable Mike Qiu
  2013-08-07  2:34 ` Gavin Shan
@ 2013-08-07  5:11 ` Michael Ellerman
  2013-08-07  5:25   ` Gavin Shan
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2013-08-07  5:11 UTC (permalink / raw)
  To: Mike Qiu; +Cc: linuxppc-dev, shangw

On Tue, Aug 06, 2013 at 10:24:46PM -0400, Mike Qiu wrote:
> 'pe_no' hasn't been defined, it should be an typo error,
> it should be 'frozen_pe_no'.
> 
> Also '__func__' should be added to IODA_EEH_DBG(),
> 
> Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
> ---
>  arch/powerpc/platforms/powernv/eeh-ioda.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
> index 0cd1c4a..a49bee7 100644
> --- a/arch/powerpc/platforms/powernv/eeh-ioda.c
> +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
> @@ -843,7 +843,8 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
>  		 * specific PHB.
>  		 */
>  		IODA_EEH_DBG("%s: Error (%d, %d, %d) on PHB#%x\n",
> -			err_type, severity, pe_no, hose->global_number);
> +			__func__, err_type, severity,
> +			frozen_pe_no, hose->global_number);

Why is it using a custom macro? If you use pr_devel() or similar you
avoid these bugs, because the argument list is always expanded.

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/eeh: Fix undefined variable
  2013-08-07  5:11 ` Michael Ellerman
@ 2013-08-07  5:25   ` Gavin Shan
  2013-08-07  5:37     ` Mike Qiu
  0 siblings, 1 reply; 5+ messages in thread
From: Gavin Shan @ 2013-08-07  5:25 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Mike Qiu, shangw

On Wed, Aug 07, 2013 at 03:11:24PM +1000, Michael Ellerman wrote:
>On Tue, Aug 06, 2013 at 10:24:46PM -0400, Mike Qiu wrote:
>> 'pe_no' hasn't been defined, it should be an typo error,
>> it should be 'frozen_pe_no'.
>> 
>> Also '__func__' should be added to IODA_EEH_DBG(),
>> 
>> Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
>> ---
>>  arch/powerpc/platforms/powernv/eeh-ioda.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
>> index 0cd1c4a..a49bee7 100644
>> --- a/arch/powerpc/platforms/powernv/eeh-ioda.c
>> +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
>> @@ -843,7 +843,8 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
>>  		 * specific PHB.
>>  		 */
>>  		IODA_EEH_DBG("%s: Error (%d, %d, %d) on PHB#%x\n",
>> -			err_type, severity, pe_no, hose->global_number);
>> +			__func__, err_type, severity,
>> +			frozen_pe_no, hose->global_number);
>
>Why is it using a custom macro? If you use pr_devel() or similar you
>avoid these bugs, because the argument list is always expanded.
>

The custom macro at least can save some CPU cycles, but that's not
safe as you mentioned. It's resonable to use pr_devel() here.

Mike, could you help to replace IODA_EEH_DBG() with pr_devel() as
Michael suggested?

Thanks,
Gavin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/eeh: Fix undefined variable
  2013-08-07  5:25   ` Gavin Shan
@ 2013-08-07  5:37     ` Mike Qiu
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Qiu @ 2013-08-07  5:37 UTC (permalink / raw)
  To: linuxppc-dev

于 2013/8/7 13:25, Gavin Shan 写道:
> On Wed, Aug 07, 2013 at 03:11:24PM +1000, Michael Ellerman wrote:
>> On Tue, Aug 06, 2013 at 10:24:46PM -0400, Mike Qiu wrote:
>>> 'pe_no' hasn't been defined, it should be an typo error,
>>> it should be 'frozen_pe_no'.
>>>
>>> Also '__func__' should be added to IODA_EEH_DBG(),
>>>
>>> Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
>>> ---
>>>   arch/powerpc/platforms/powernv/eeh-ioda.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
>>> index 0cd1c4a..a49bee7 100644
>>> --- a/arch/powerpc/platforms/powernv/eeh-ioda.c
>>> +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
>>> @@ -843,7 +843,8 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
>>>   		 * specific PHB.
>>>   		 */
>>>   		IODA_EEH_DBG("%s: Error (%d, %d, %d) on PHB#%x\n",
>>> -			err_type, severity, pe_no, hose->global_number);
>>> +			__func__, err_type, severity,
>>> +			frozen_pe_no, hose->global_number);
>> Why is it using a custom macro? If you use pr_devel() or similar you
>> avoid these bugs, because the argument list is always expanded.
>>
> The custom macro at least can save some CPU cycles, but that's not
> safe as you mentioned. It's resonable to use pr_devel() here.
>
> Mike, could you help to replace IODA_EEH_DBG() with pr_devel() as
> Michael suggested?
OK, I will change the patch in V2

Thanks
Mike
>
> Thanks,
> Gavin
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-07  5:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07  2:24 [PATCH] powerpc/eeh: Fix undefined variable Mike Qiu
2013-08-07  2:34 ` Gavin Shan
2013-08-07  5:11 ` Michael Ellerman
2013-08-07  5:25   ` Gavin Shan
2013-08-07  5:37     ` Mike Qiu

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.