public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, masami.hiramatsu@linaro.org,
	masahisa.kojima@Linaro.org, daniel.thompson@linaro.org,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH edk2-platforms] Silicon/SynQuacerI2CDxe: add missing __FUNCTION__ argument to %a specifier
Date: Mon,  4 Dec 2017 13:33:08 +0000	[thread overview]
Message-ID: <20171204133308.32012-1-ard.biesheuvel@linaro.org> (raw)

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



             reply	other threads:[~2017-12-04 13:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 13:33 Ard Biesheuvel [this message]
2017-12-04 14:48 ` [PATCH edk2-platforms] Silicon/SynQuacerI2CDxe: add missing __FUNCTION__ argument to %a specifier Leif Lindholm
2017-12-04 14:55   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171204133308.32012-1-ard.biesheuvel@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox