public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: Leif Lindholm <leif@nuviainc.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Laszlo Ersek <lersek@redhat.com>, Bob Feng <bob.c.feng@intel.com>
Subject: Re: [PATCH 1/1] EmbeddedPkg: fix gcc build errors in AndroidBootImgLib
Date: Tue, 21 Jul 2020 13:18:02 +0000	[thread overview]
Message-ID: <DB7PR08MB311326A217DA3E9DE4F5AE898B780@DB7PR08MB3113.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20200721125056.32195-1-leif@nuviainc.com>

Hello Leif,
I actually submitted this modification on the build flags because of the error that you fixed. I submitted a similar modification here https://edk2.groups.io/g/devel/message/61832 . I should have waited before modifying the flags, my apologizes.
I tried building edk2 top-level packages and this should be the only impact.

Regards,
Pierre

-----Original Message-----
From: Leif Lindholm <leif@nuviainc.com>
Sent: 21 July 2020 13:51
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; Laszlo Ersek <lersek@redhat.com>; Bob Feng <bob.c.feng@intel.com>
Subject: [PATCH 1/1] EmbeddedPkg: fix gcc build errors in AndroidBootImgLib

Commit dbd546a32d5a
("BaseTools: Add gcc flag to warn on void* pointer arithmetic") does its work and triggers build errors in this library.
Update the affected code to build correctly again.

Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Bob Feng<bob.c.feng@intel.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---

Pierre - can you please ensure to CC Arm maintainers when proposing changes to Arm build flags? (And build test all the top-level edk2 packages *cough*.)

Bob - can you please ensure Arm maintainers have commented on changes to global build flags?
(Would it be possible to break up tools_def.template into separate arch-specific include files so we could have GetMaintainer.py be more helpful for this?)

Laszlo - you're not formally an EmbeddedPkg reviewer, but Ard is out for another couple of weeks. But since the Linaro CI is currently broken and the fix is trivial, could you have a look please?

 EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
index e1036954ee58..15b5bf451330 100644
--- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
+++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
@@ -97,7 +97,7 @@ AndroidBootImgGetKernelInfo (
   ASSERT (IS_VALID_ANDROID_PAGE_SIZE (Header->PageSize));

   *KernelSize = Header->KernelSize;
-  *Kernel = BootImg + Header->PageSize;
+  *Kernel = (VOID *)((UINTN)BootImg + Header->PageSize);
   return EFI_SUCCESS;
 }

@@ -341,7 +341,7 @@ AndroidBootImgUpdateFdt (

   Status = AndroidBootImgSetProperty64 (UpdatedFdtBase, ChosenNode,
                                         "linux,initrd-end",
-                                        (UINTN)(RamdiskData + RamdiskSize));
+                                        ((UINTN)RamdiskData +
+ RamdiskSize));
   if (EFI_ERROR (Status)) {
     goto Fdt_Exit;
   }
--
2.20.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

  reply	other threads:[~2020-07-21 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 12:50 [PATCH 1/1] EmbeddedPkg: fix gcc build errors in AndroidBootImgLib Leif Lindholm
2020-07-21 13:18 ` PierreGondois [this message]
2020-07-22 15:24   ` Leif Lindholm
2020-07-21 14:26 ` Bob Feng
2020-07-22 20:34 ` Laszlo Ersek
2020-07-23 10:57   ` Leif Lindholm
2020-07-23 12:08   ` Leif Lindholm

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=DB7PR08MB311326A217DA3E9DE4F5AE898B780@DB7PR08MB3113.eurprd08.prod.outlook.com \
    --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