public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] EmbeddedPkg: AndroidBootApp: fix clang compilation
@ 2017-12-06 20:31 Leif Lindholm
  2017-12-06 20:36 ` Ard Biesheuvel
  0 siblings, 1 reply; 3+ messages in thread
From: Leif Lindholm @ 2017-12-06 20:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: ard.biesheuvel, Jun Nie

Address an incorrect function prototype (using ; instead of ,)
in AndroidBootImg.h.

Also restructure code slightly to avoid a "may be used uninitialized"
warning.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 EmbeddedPkg/Include/Protocol/AndroidBootImg.h             | 4 ++--
 EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c | 9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/EmbeddedPkg/Include/Protocol/AndroidBootImg.h b/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
index 1c458d0255..cd3c42e858 100644
--- a/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
+++ b/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
@@ -33,8 +33,8 @@ EFI_STATUS
 typedef
 EFI_STATUS
 (EFIAPI *ANDROID_BOOTIMG_UPDATE_DTB) (
-  IN  EFI_PHYSICAL_ADDRESS    OrigDtbBase;
-  OUT EFI_PHYSICAL_ADDRESS   *NewDtbBase;
+  IN  EFI_PHYSICAL_ADDRESS    OrigDtbBase,
+  OUT EFI_PHYSICAL_ADDRESS   *NewDtbBase
   );
 
 struct _ANDROID_BOOTIMG_PROTOCOL {
diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
index 09c4d924f1..2e50cedf6a 100644
--- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
+++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
@@ -357,12 +357,13 @@ AndroidBootImgUpdateFdt (
     if (EFI_ERROR (Status)) {
       goto Fdt_Exit;
     }
+
+    Status = gBS->InstallConfigurationTable (
+                    &gFdtTableGuid,
+                    (VOID *)(UINTN)NewFdtBase
+                    );
   }
 
-  Status = gBS->InstallConfigurationTable (
-                  &gFdtTableGuid,
-                  (VOID *)(UINTN)NewFdtBase
-                  );
   if (!EFI_ERROR (Status)) {
     return EFI_SUCCESS;
   }
-- 
2.11.0



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

* Re: [PATCH] EmbeddedPkg: AndroidBootApp: fix clang compilation
  2017-12-06 20:31 [PATCH] EmbeddedPkg: AndroidBootApp: fix clang compilation Leif Lindholm
@ 2017-12-06 20:36 ` Ard Biesheuvel
  2017-12-06 21:41   ` Leif Lindholm
  0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2017-12-06 20:36 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: edk2-devel@lists.01.org, Jun Nie

On 6 December 2017 at 20:31, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> Address an incorrect function prototype (using ; instead of ,)
> in AndroidBootImg.h.
>
> Also restructure code slightly to avoid a "may be used uninitialized"
> warning.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  EmbeddedPkg/Include/Protocol/AndroidBootImg.h             | 4 ++--
>  EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c | 9 +++++----
>  2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/EmbeddedPkg/Include/Protocol/AndroidBootImg.h b/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
> index 1c458d0255..cd3c42e858 100644
> --- a/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
> +++ b/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
> @@ -33,8 +33,8 @@ EFI_STATUS
>  typedef
>  EFI_STATUS
>  (EFIAPI *ANDROID_BOOTIMG_UPDATE_DTB) (
> -  IN  EFI_PHYSICAL_ADDRESS    OrigDtbBase;
> -  OUT EFI_PHYSICAL_ADDRESS   *NewDtbBase;
> +  IN  EFI_PHYSICAL_ADDRESS    OrigDtbBase,
> +  OUT EFI_PHYSICAL_ADDRESS   *NewDtbBase
>    );
>
>  struct _ANDROID_BOOTIMG_PROTOCOL {
> diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> index 09c4d924f1..2e50cedf6a 100644
> --- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> +++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> @@ -357,12 +357,13 @@ AndroidBootImgUpdateFdt (
>      if (EFI_ERROR (Status)) {
>        goto Fdt_Exit;
>      }
> +
> +    Status = gBS->InstallConfigurationTable (
> +                    &gFdtTableGuid,
> +                    (VOID *)(UINTN)NewFdtBase
> +                    );
>    }
>
> -  Status = gBS->InstallConfigurationTable (
> -                  &gFdtTableGuid,
> -                  (VOID *)(UINTN)NewFdtBase
> -                  );
>    if (!EFI_ERROR (Status)) {
>      return EFI_SUCCESS;
>    }
> --
> 2.11.0
>


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

* Re: [PATCH] EmbeddedPkg: AndroidBootApp: fix clang compilation
  2017-12-06 20:36 ` Ard Biesheuvel
@ 2017-12-06 21:41   ` Leif Lindholm
  0 siblings, 0 replies; 3+ messages in thread
From: Leif Lindholm @ 2017-12-06 21:41 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel@lists.01.org, Jun Nie

On Wed, Dec 06, 2017 at 08:36:48PM +0000, Ard Biesheuvel wrote:
> On 6 December 2017 at 20:31, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > Address an incorrect function prototype (using ; instead of ,)
> > in AndroidBootImg.h.
> >
> > Also restructure code slightly to avoid a "may be used uninitialized"
> > warning.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> 
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Thanks!
Pushed as ac811846f2.

> > ---
> >  EmbeddedPkg/Include/Protocol/AndroidBootImg.h             | 4 ++--
> >  EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c | 9 +++++----
> >  2 files changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/EmbeddedPkg/Include/Protocol/AndroidBootImg.h b/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
> > index 1c458d0255..cd3c42e858 100644
> > --- a/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
> > +++ b/EmbeddedPkg/Include/Protocol/AndroidBootImg.h
> > @@ -33,8 +33,8 @@ EFI_STATUS
> >  typedef
> >  EFI_STATUS
> >  (EFIAPI *ANDROID_BOOTIMG_UPDATE_DTB) (
> > -  IN  EFI_PHYSICAL_ADDRESS    OrigDtbBase;
> > -  OUT EFI_PHYSICAL_ADDRESS   *NewDtbBase;
> > +  IN  EFI_PHYSICAL_ADDRESS    OrigDtbBase,
> > +  OUT EFI_PHYSICAL_ADDRESS   *NewDtbBase
> >    );
> >
> >  struct _ANDROID_BOOTIMG_PROTOCOL {
> > diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> > index 09c4d924f1..2e50cedf6a 100644
> > --- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> > +++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> > @@ -357,12 +357,13 @@ AndroidBootImgUpdateFdt (
> >      if (EFI_ERROR (Status)) {
> >        goto Fdt_Exit;
> >      }
> > +
> > +    Status = gBS->InstallConfigurationTable (
> > +                    &gFdtTableGuid,
> > +                    (VOID *)(UINTN)NewFdtBase
> > +                    );
> >    }
> >
> > -  Status = gBS->InstallConfigurationTable (
> > -                  &gFdtTableGuid,
> > -                  (VOID *)(UINTN)NewFdtBase
> > -                  );
> >    if (!EFI_ERROR (Status)) {
> >      return EFI_SUCCESS;
> >    }
> > --
> > 2.11.0
> >


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

end of thread, other threads:[~2017-12-06 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 20:31 [PATCH] EmbeddedPkg: AndroidBootApp: fix clang compilation Leif Lindholm
2017-12-06 20:36 ` Ard Biesheuvel
2017-12-06 21:41   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox