public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io, mjsbeaton@gmail.com
Cc: ardb@google.com, lersek@redhat.com, mcb30@ipxe.org,
	 mikhailkrichanov@gmail.com
Subject: Re: [edk2-devel] [PATCH V4 2/2] ArmPkg: Remove manual exclusion of debug vars when MDEPKG_NDEBUG is not defined
Date: Thu, 14 Dec 2023 08:40:15 +0100	[thread overview]
Message-ID: <CAMj1kXEO=y9_99AVuQwMt0m09DGLHWQ1_hUJAjttT9v8=92fng@mail.gmail.com> (raw)
In-Reply-To: <20231214072743.6432-2-mjsbeaton@gmail.com>

On Thu, 14 Dec 2023 at 08:28, Mike Beaton <mjsbeaton@gmail.com> wrote:
>
> From: Mike Beaton <mjsbeaton@gmail.com>
>
> This is no longer required since the revised DEBUG macro automatically
> compiles away unused var accesses when MDEPKG_NDEBUG is defined;
> keeping these lines is incompatible with the updated DEBUG macro, as
> there has to be a variable, access to which to discard.
>
> Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>

I take it this will trigger a build warning if it is not merged at the
same time as the other change? How about GCC?

> ---
>  .../DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c     | 4 ----
>  .../AArch64/DefaultExceptionHandler.c                         | 3 ---
>  2 files changed, 7 deletions(-)
>
> diff --git a/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c b/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
> index 432112354f..dc49e8eba7 100644
> --- a/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
> +++ b/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
> @@ -71,9 +71,7 @@ PeCoffLoaderRelocateImageExtraAction (
>    IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext
>    )
>  {
> - #if !defined (MDEPKG_NDEBUG)
>    CHAR8  Temp[512];
> - #endif
>
>    if (ImageContext->PdbPointer) {
>   #ifdef __CC_ARM
> @@ -106,9 +104,7 @@ PeCoffLoaderUnloadImageExtraAction (
>    IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext
>    )
>  {
> - #if !defined (MDEPKG_NDEBUG)
>    CHAR8  Temp[512];
> - #endif
>
>    if (ImageContext->PdbPointer) {
>   #ifdef __CC_ARM
> diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c
> index a39896d576..1d3ea61311 100644
> --- a/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c
> +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c
> @@ -157,7 +157,6 @@ DescribeExceptionSyndrome (
>    DEBUG ((DEBUG_ERROR, "\n %a \n", Message));
>  }
>
> -#ifndef MDEPKG_NDEBUG
>  STATIC
>  CONST CHAR8 *
>  BaseName (
> @@ -177,8 +176,6 @@ BaseName (
>    return Str;
>  }
>
> -#endif
> -
>  /**
>    This is the default action to take on an unexpected exception
>
> --
> 2.39.2
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112504): https://edk2.groups.io/g/devel/message/112504
Mute This Topic: https://groups.io/mt/103166254/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  parent reply	other threads:[~2023-12-14  7:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14  7:27 [edk2-devel] [PATCH V4 1/2] DebugLib: Update DEBUG macro used when MDEPKG_NDEBUG is defined Mike Beaton
2023-12-14  7:27 ` [edk2-devel] [PATCH V4 2/2] ArmPkg: Remove manual exclusion of debug vars when MDEPKG_NDEBUG is not defined Mike Beaton
2023-12-14  7:33   ` Mike Beaton
2023-12-14  7:40   ` Ard Biesheuvel [this message]
2023-12-14  8:59     ` Ard Biesheuvel
2023-12-15 11:56       ` Mike Beaton
2023-12-19  9:06         ` 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='CAMj1kXEO=y9_99AVuQwMt0m09DGLHWQ1_hUJAjttT9v8=92fng@mail.gmail.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