From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"vit9696@protonmail.com" <vit9696@protonmail.com>
Subject: Re: [edk2-devel] [PATCH v1 1/3] MdeModulePkg/ResetUtilityLib: Use STATIC_ASSERT macro
Date: Tue, 17 Sep 2019 01:00:49 +0000 [thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A093C932C79@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190816235808.16019-2-vit9696@protonmail.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Vitaly Cheptsov via Groups.Io
> Sent: Saturday, August 17, 2019 7:58 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v1 1/3] MdeModulePkg/ResetUtilityLib: Use
> STATIC_ASSERT macro
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048
>
> Use new STATIC_ASSERT macro instead of VERIFY_SIZE_OF.
>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
> ---
> MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> index 2b5af4b95a..bb151d0331 100644
> --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
> @@ -20,7 +20,10 @@ typedef struct {
> } RESET_UTILITY_GUID_SPECIFIC_RESET_DATA;
> #pragma pack()
>
> -VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
> +STATIC_ASSERT (
> + sizeof (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA) == 18,
> + "sizeof (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA) is expected to be
> 18 bytes"
> + );
Thanks for the patch,
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
>
> /**
> This is a shorthand helper function to reset with reset type and a subtype
> --
> 2.20.1 (Apple Git-117)
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#45870): https://edk2.groups.io/g/devel/message/45870
> Mute This Topic: https://groups.io/mt/32918009/1768737
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com]
> -=-=-=-=-=-=
next prev parent reply other threads:[~2019-09-17 1:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 23:58 [PATCH v1 0/3] Replace VERIFY_SIZE_OF with STATIC_ASSERT Vitaly Cheptsov
2019-08-16 23:58 ` [PATCH v1 1/3] MdeModulePkg/ResetUtilityLib: Use STATIC_ASSERT macro Vitaly Cheptsov
2019-09-17 1:00 ` Wu, Hao A [this message]
2019-09-17 1:07 ` [edk2-devel] " Gao, Zhichao
2019-08-16 23:58 ` [PATCH v1 2/3] MdePkg: " Vitaly Cheptsov
2019-08-16 23:58 ` [PATCH v1 3/3] MdePkg: Drop VERIFY_SIZE_OF in favour of STATIC_ASSERT Vitaly Cheptsov
2019-09-09 0:54 ` [edk2-devel] [PATCH v1 0/3] Replace VERIFY_SIZE_OF with STATIC_ASSERT Liming Gao
[not found] ` <15C29F073B45A5F2.17179@groups.io>
2019-09-17 1:41 ` Liming Gao
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=B80AF82E9BFB8E4FBD8C89DA810C6A093C932C79@SHSMSX104.ccr.corp.intel.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