* [PATCH edk2-platforms] Silicon/SynQuacerI2CDxe: add missing __FUNCTION__ argument to %a specifier
@ 2017-12-04 13:33 Ard Biesheuvel
2017-12-04 14:48 ` Leif Lindholm
0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2017-12-04 13:33 UTC (permalink / raw)
To: edk2-devel
Cc: leif.lindholm, masami.hiramatsu, masahisa.kojima, daniel.thompson,
Ard Biesheuvel
The I2C driver prints a warning under DEBUG when a I2C transaction times
out. This will occur on the rev 0.1 DeveloperBox boards due to a board
level error in the I2C routing (unless the MCU has been lifted off the
bus).
Currently, this will trigger a crash due to a missing __FUNCTION__
argument to a %a specifier in a DEBUG string, because instead, the code
will attempt to dereference a EFI_STATUS variable as a char pointer.
So add the missing __FUNCTION__ argument.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
index fb404b17f93c..c3703dfb6c33 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
@@ -330,7 +330,7 @@ SynQuacerI2cStartRequest (
Status = WaitForInterrupt (I2c);
if (EFI_ERROR (Status)) {
BOOTTIME_DEBUG ((DEBUG_WARN, "%a: Timeout waiting for interrupt - %r\n",
- Status));
+ __FUNCTION__, Status));
break;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH edk2-platforms] Silicon/SynQuacerI2CDxe: add missing __FUNCTION__ argument to %a specifier
2017-12-04 13:33 [PATCH edk2-platforms] Silicon/SynQuacerI2CDxe: add missing __FUNCTION__ argument to %a specifier Ard Biesheuvel
@ 2017-12-04 14:48 ` Leif Lindholm
2017-12-04 14:55 ` Ard Biesheuvel
0 siblings, 1 reply; 3+ messages in thread
From: Leif Lindholm @ 2017-12-04 14:48 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: edk2-devel, masami.hiramatsu, masahisa.kojima, daniel.thompson
On Mon, Dec 04, 2017 at 01:33:08PM +0000, Ard Biesheuvel wrote:
> The I2C driver prints a warning under DEBUG when a I2C transaction times
> out. This will occur on the rev 0.1 DeveloperBox boards due to a board
> level error in the I2C routing (unless the MCU has been lifted off the
> bus).
>
> Currently, this will trigger a crash due to a missing __FUNCTION__
> argument to a %a specifier in a DEBUG string, because instead, the code
> will attempt to dereference a EFI_STATUS variable as a char pointer.
>
> So add the missing __FUNCTION__ argument.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
> Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
> index fb404b17f93c..c3703dfb6c33 100644
> --- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
> +++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
> @@ -330,7 +330,7 @@ SynQuacerI2cStartRequest (
> Status = WaitForInterrupt (I2c);
> if (EFI_ERROR (Status)) {
> BOOTTIME_DEBUG ((DEBUG_WARN, "%a: Timeout waiting for interrupt - %r\n",
> - Status));
> + __FUNCTION__, Status));
> break;
> }
>
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH edk2-platforms] Silicon/SynQuacerI2CDxe: add missing __FUNCTION__ argument to %a specifier
2017-12-04 14:48 ` Leif Lindholm
@ 2017-12-04 14:55 ` Ard Biesheuvel
0 siblings, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2017-12-04 14:55 UTC (permalink / raw)
To: Leif Lindholm
Cc: edk2-devel@lists.01.org, Masami Hiramatsu, Masahisa Kojima,
Daniel Thompson
On 4 December 2017 at 14:48, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Mon, Dec 04, 2017 at 01:33:08PM +0000, Ard Biesheuvel wrote:
>> The I2C driver prints a warning under DEBUG when a I2C transaction times
>> out. This will occur on the rev 0.1 DeveloperBox boards due to a board
>> level error in the I2C routing (unless the MCU has been lifted off the
>> bus).
>>
>> Currently, this will trigger a crash due to a missing __FUNCTION__
>> argument to a %a specifier in a DEBUG string, because instead, the code
>> will attempt to dereference a EFI_STATUS variable as a char pointer.
>>
>> So add the missing __FUNCTION__ argument.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
>
Thanks. Pushed as 7511d626b318ae068d7773159eedf3c9fc4c7a5a
>> ---
>> Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
>> index fb404b17f93c..c3703dfb6c33 100644
>> --- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
>> +++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
>> @@ -330,7 +330,7 @@ SynQuacerI2cStartRequest (
>> Status = WaitForInterrupt (I2c);
>> if (EFI_ERROR (Status)) {
>> BOOTTIME_DEBUG ((DEBUG_WARN, "%a: Timeout waiting for interrupt - %r\n",
>> - Status));
>> + __FUNCTION__, Status));
>> break;
>> }
>>
>> --
>> 2.11.0
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-04 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04 13:33 [PATCH edk2-platforms] Silicon/SynQuacerI2CDxe: add missing __FUNCTION__ argument to %a specifier Ard Biesheuvel
2017-12-04 14:48 ` Leif Lindholm
2017-12-04 14:55 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox