From: Sami Mujawar <Sami.Mujawar@arm.com>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Evan Lloyd <Evan.Lloyd@arm.com>,
Matteo Carlini <Matteo.Carlini@arm.com>,
Stephanie Hughes-Fitt <Stephanie.Hughes-Fitt@arm.com>,
nd <nd@arm.com>
Subject: Re: [staging/dynamictables PATCH v1 4/5] DynamicTablesPkg: Fix macro to prevent side effect
Date: Thu, 28 Jun 2018 17:10:48 +0000 [thread overview]
Message-ID: <DB6PR0802MB2375CDDED297429AD475F85C844F0@DB6PR0802MB2375.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20180628165054.6jnnna3zwlvlkejn@bivouac.eciton.net>
Hi Leif,
I agree it will be good to update the code to use ALIGN_VALUE(x,4).
I can see 2 options to fix this:
- Resubmit a v2 patchset with this change.
OR
- I can submit a separate patch (on top of the current patchset) for this change.
Can you let me know which one is preferred, please?
Regards,
Sami Mujawar
-----Original Message-----
From: Leif Lindholm <leif.lindholm@linaro.org>
Sent: 28 June 2018 05:51 PM
To: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: edk2-devel@lists.01.org; Evan Lloyd <Evan.Lloyd@arm.com>; Matteo Carlini <Matteo.Carlini@arm.com>; Stephanie Hughes-Fitt <Stephanie.Hughes-Fitt@arm.com>; nd <nd@arm.com>
Subject: Re: [staging/dynamictables PATCH v1 4/5] DynamicTablesPkg: Fix macro to prevent side effect
On Wed, Jun 27, 2018 at 05:47:45PM +0100, Sami Mujawar wrote:
> The ALIGN32 macro had undesired side effects when used with binary
> operators and was generating compilation errors.
>
> Added brackets to fix this issue.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> ---
>
> Notes:
> v1:
> - Fix macro side effect [SAMI]
>
> DynamicTablesPkg/Include/Library/TableHelperLib.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/DynamicTablesPkg/Include/Library/TableHelperLib.h
> b/DynamicTablesPkg/Include/Library/TableHelperLib.h
> index
> b358223434af76820d34c29c67325919a2283aa7..3eac28a158e9621f6f33a5b53896
> 4a16e6b69112 100644
> --- a/DynamicTablesPkg/Include/Library/TableHelperLib.h
> +++ b/DynamicTablesPkg/Include/Library/TableHelperLib.h
> @@ -17,7 +17,7 @@
>
> /** A helper macro to align a value to the 32-bit word boundary */
> -#define ALIGN32(x) ((x) + (sizeof (UINT32) - 1)) & ~(sizeof (UINT32)
> - 1)
> +#define ALIGN32(x) (((x) + (sizeof (UINT32) - 1)) & ~(sizeof (UINT32)
> +- 1))
Not as such a comment on this patch, but this problem could also be resolved by dropping this local macro in favour of the Base.h ALIGN_VALUE(x, 4) ... or just redefining it to use that.
/
Leif
>
> /** The GetCgfMgrInfo function gets the CM_STD_OBJ_CONFIGURATION_MANAGER_INFO
> object from the Configuration Manager.
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>
>
next prev parent reply other threads:[~2018-06-28 17:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 16:47 [staging/dynamictables PATCH v1 0/5] Fix issues reported by ecc tool Sami Mujawar
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 1/5] DynamicTablesPkg: Add module info to file header Sami Mujawar
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 2/5] DynamicTablesPkg: Fix function documentation Sami Mujawar
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 3/5] DynamicTablesPkg: Fix variable naming issue Sami Mujawar
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 4/5] DynamicTablesPkg: Fix macro to prevent side effect Sami Mujawar
2018-06-28 16:50 ` Leif Lindholm
2018-06-28 17:10 ` Sami Mujawar [this message]
2018-06-29 9:41 ` Leif Lindholm
2018-06-27 16:47 ` [staging/dynamictables PATCH v1 5/5] DynamicTablesPkg: Fix variable declaration Sami Mujawar
2018-06-27 16:57 ` [staging/dynamictables PATCH v1 0/5] Fix issues reported by ecc tool Evan Lloyd
2018-07-02 14:00 ` 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=DB6PR0802MB2375CDDED297429AD475F85C844F0@DB6PR0802MB2375.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