From: "Marvin Häuser" <mhaeuser@posteo.de>
To: Rebecca Cran <rebecca@bsdio.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
Pedro Falcato <pedro.falcato@gmail.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Zhiguang Liu <zhiguang.liu@intel.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [edk2-devel] [PATCH 1/1] MdePkg/Base.h: Simply alignment expressions
Date: Mon, 15 May 2023 15:20:45 +0000 [thread overview]
Message-ID: <43C66EEC-4489-4D1D-B345-04CC7AB83670@posteo.de> (raw)
In-Reply-To: <9bc20ea6-3bb6-8b13-ea9f-790bcbed71ea@bsdio.com>
Well, I explicitly added this macro as a prerequisite to code used in our new PE library (remember this patch was initially sent in 2021). We still require it downstream, but obviously upstream is not interested in the related contributions that were to follow at the time.
Gerd picked it up because he wanted to attempt to re-try contributing the new PE library, but I haven't heard from him in weeks.
Design-wise, I agree it could be removed again. However, there first was a downstream burden when adding it (as we needed to rewrite our history to drop our downstream patch in favour of the upstream solution). Now introducing another downstream burden *again* to remove the macro that was added only a few weeks back would be a sign of poor management and planning.
Best regards,
Marvin
> On 15. May 2023, at 17:15, Rebecca Cran <rebecca@bsdio.com> wrote:
>
> On 5/15/23 08:45, Pedro Falcato wrote:
>> -#define ALIGN_VALUE_ADDEND(Value, Alignment) (((Alignment) - (Value)) & ((Alignment) - 1U))
>> +#define ALIGN_VALUE_ADDEND(Value, Alignment) ((~(Value)) & ((Alignment) - 1U))
>> /**
>> Rounds a value up to the next boundary using a specified alignment.
>> @@ -945,7 +945,7 @@ STATIC_ASSERT (ALIGNOF (__VERIFY_INT32_ENUM_SIZE) == sizeof (__VERIFY_INT32_ENUM
>> @return A value up to the next boundary.
>> **/
>> -#define ALIGN_VALUE(Value, Alignment) ((Value) + ALIGN_VALUE_ADDEND (Value, Alignment))
>> +#define ALIGN_VALUE(Value, Alignment) (((Value) + (Alignment - 1)) & ~(Alignment))
>
> Since ALIGN_VALUE_ADDEND is only used in ALIGN_VALUE, it should probably be deleted instead of updated.
>
>
> --
>
> Rebecca Cran
>
next prev parent reply other threads:[~2023-05-15 15:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 14:45 [PATCH 1/1] MdePkg/Base.h: Simply alignment expressions Pedro Falcato
2023-05-15 15:15 ` [edk2-devel] " Rebecca Cran
2023-05-15 15:20 ` Marvin Häuser [this message]
2023-05-15 15:29 ` Pedro Falcato
2023-05-15 15:33 ` Rebecca Cran
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=43C66EEC-4489-4D1D-B345-04CC7AB83670@posteo.de \
--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