diff mbox

[edk2,40/47] SecurityPkg/AuthVariableLib: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-41-lersek@redhat.com
State Accepted
Commit 3318f89344a35539dac0fe7090fc44faf172dc15
Headers show

Commit Message

Laszlo Ersek Oct. 26, 2016, 7:04 p.m. UTC
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

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

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Laszlo Ersek Oct. 27, 2016, 9:07 a.m. UTC | #1
Star, Chao,

On 10/26/16 21:04, Laszlo Ersek wrote:
> Cc: Chao Zhang <chao.b.zhang@intel.com>

> Cc: Star Zeng <star.zeng@intel.com>

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

> ---

>  SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> index c4fbb649f1fd..792a1232aed9 100644

> --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> @@ -421,7 +421,7 @@ AuthVariableLibInitialize (

>    AuthVarLibContextOut->StructVersion = AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_VERSION;

>    AuthVarLibContextOut->StructSize = sizeof (AUTH_VAR_LIB_CONTEXT_OUT);

>    AuthVarLibContextOut->AuthVarEntry = mAuthVarEntry;

> -  AuthVarLibContextOut->AuthVarEntryCount = sizeof (mAuthVarEntry) / sizeof (mAuthVarEntry[0]);

> +  AuthVarLibContextOut->AuthVarEntryCount = ARRAY_SIZE (mAuthVarEntry);

>    mAuthVarAddressPointer[0] = (VOID **) &mPubKeyStore;

>    mAuthVarAddressPointer[1] = (VOID **) &mCertDbStore;

>    mAuthVarAddressPointer[2] = (VOID **) &mHashCtx;

> @@ -433,7 +433,7 @@ AuthVariableLibInitialize (

>    mAuthVarAddressPointer[8] = (VOID **) &(mAuthVarLibContextIn->CheckRemainingSpaceForConsistency),

>    mAuthVarAddressPointer[9] = (VOID **) &(mAuthVarLibContextIn->AtRuntime),

>    AuthVarLibContextOut->AddressPointer = mAuthVarAddressPointer;

> -  AuthVarLibContextOut->AddressPointerCount = sizeof (mAuthVarAddressPointer) / sizeof (mAuthVarAddressPointer[0]);

> +  AuthVarLibContextOut->AddressPointerCount = ARRAY_SIZE (mAuthVarAddressPointer);

>  

>    return Status;

>  }

> 


can one of you guys please review this patch?

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Zeng, Star Oct. 27, 2016, 9:09 a.m. UTC | #2
Oh, it is Reviewed-by: Star Zeng <star.zeng@intel.com>. :)

Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek

Sent: Thursday, October 27, 2016 5:08 PM
To: Zeng, Star <star.zeng@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>
Cc: edk2-devel-01 <edk2-devel@ml01.01.org>
Subject: Re: [edk2] [PATCH 40/47] SecurityPkg/AuthVariableLib: rebase to ARRAY_SIZE()

Star, Chao,

On 10/26/16 21:04, Laszlo Ersek wrote:
> Cc: Chao Zhang <chao.b.zhang@intel.com>

> Cc: Star Zeng <star.zeng@intel.com>

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

> ---

>  SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c 

> b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> index c4fbb649f1fd..792a1232aed9 100644

> --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> @@ -421,7 +421,7 @@ AuthVariableLibInitialize (

>    AuthVarLibContextOut->StructVersion = AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_VERSION;

>    AuthVarLibContextOut->StructSize = sizeof (AUTH_VAR_LIB_CONTEXT_OUT);

>    AuthVarLibContextOut->AuthVarEntry = mAuthVarEntry;

> -  AuthVarLibContextOut->AuthVarEntryCount = sizeof (mAuthVarEntry) / 

> sizeof (mAuthVarEntry[0]);

> +  AuthVarLibContextOut->AuthVarEntryCount = ARRAY_SIZE 

> + (mAuthVarEntry);

>    mAuthVarAddressPointer[0] = (VOID **) &mPubKeyStore;

>    mAuthVarAddressPointer[1] = (VOID **) &mCertDbStore;

>    mAuthVarAddressPointer[2] = (VOID **) &mHashCtx; @@ -433,7 +433,7 

> @@ AuthVariableLibInitialize (

>    mAuthVarAddressPointer[8] = (VOID **) &(mAuthVarLibContextIn->CheckRemainingSpaceForConsistency),

>    mAuthVarAddressPointer[9] = (VOID **) &(mAuthVarLibContextIn->AtRuntime),

>    AuthVarLibContextOut->AddressPointer = mAuthVarAddressPointer;

> -  AuthVarLibContextOut->AddressPointerCount = sizeof 

> (mAuthVarAddressPointer) / sizeof (mAuthVarAddressPointer[0]);

> +  AuthVarLibContextOut->AddressPointerCount = ARRAY_SIZE 

> + (mAuthVarAddressPointer);

>  

>    return Status;

>  }

> 


can one of you guys please review this patch?

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Laszlo Ersek Oct. 27, 2016, 9:12 a.m. UTC | #3
On 10/27/16 11:09, Zeng, Star wrote:
> Oh, it is Reviewed-by: Star Zeng <star.zeng@intel.com>. :)


Great, thanks!
Laszlo

> Thanks,

> Star

> -----Original Message-----

> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek

> Sent: Thursday, October 27, 2016 5:08 PM

> To: Zeng, Star <star.zeng@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>

> Cc: edk2-devel-01 <edk2-devel@ml01.01.org>

> Subject: Re: [edk2] [PATCH 40/47] SecurityPkg/AuthVariableLib: rebase to ARRAY_SIZE()

> 

> Star, Chao,

> 

> On 10/26/16 21:04, Laszlo Ersek wrote:

>> Cc: Chao Zhang <chao.b.zhang@intel.com>

>> Cc: Star Zeng <star.zeng@intel.com>

>> Contributed-under: TianoCore Contribution Agreement 1.0

>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

>> ---

>>  SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c | 4 ++--

>>  1 file changed, 2 insertions(+), 2 deletions(-)

>>

>> diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c 

>> b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

>> index c4fbb649f1fd..792a1232aed9 100644

>> --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

>> +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

>> @@ -421,7 +421,7 @@ AuthVariableLibInitialize (

>>    AuthVarLibContextOut->StructVersion = AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_VERSION;

>>    AuthVarLibContextOut->StructSize = sizeof (AUTH_VAR_LIB_CONTEXT_OUT);

>>    AuthVarLibContextOut->AuthVarEntry = mAuthVarEntry;

>> -  AuthVarLibContextOut->AuthVarEntryCount = sizeof (mAuthVarEntry) / 

>> sizeof (mAuthVarEntry[0]);

>> +  AuthVarLibContextOut->AuthVarEntryCount = ARRAY_SIZE 

>> + (mAuthVarEntry);

>>    mAuthVarAddressPointer[0] = (VOID **) &mPubKeyStore;

>>    mAuthVarAddressPointer[1] = (VOID **) &mCertDbStore;

>>    mAuthVarAddressPointer[2] = (VOID **) &mHashCtx; @@ -433,7 +433,7 

>> @@ AuthVariableLibInitialize (

>>    mAuthVarAddressPointer[8] = (VOID **) &(mAuthVarLibContextIn->CheckRemainingSpaceForConsistency),

>>    mAuthVarAddressPointer[9] = (VOID **) &(mAuthVarLibContextIn->AtRuntime),

>>    AuthVarLibContextOut->AddressPointer = mAuthVarAddressPointer;

>> -  AuthVarLibContextOut->AddressPointerCount = sizeof 

>> (mAuthVarAddressPointer) / sizeof (mAuthVarAddressPointer[0]);

>> +  AuthVarLibContextOut->AddressPointerCount = ARRAY_SIZE 

>> + (mAuthVarAddressPointer);

>>  

>>    return Status;

>>  }

>>

> 

> can one of you guys please review this patch?

> 

> Thanks!

> Laszlo

> _______________________________________________

> edk2-devel mailing list

> edk2-devel@lists.01.org

> https://lists.01.org/mailman/listinfo/edk2-devel

> _______________________________________________

> edk2-devel mailing list

> edk2-devel@lists.01.org

> https://lists.01.org/mailman/listinfo/edk2-devel

> 


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Zhang, Chao B Oct. 28, 2016, 8:36 a.m. UTC | #4
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>






Thanks & Best regards
Chao Zhang

From: Laszlo Ersek [mailto:lersek@redhat.com]

Sent: Thursday, October 27, 2016 5:08 PM
To: Zeng, Star; Zhang, Chao B
Cc: edk2-devel-01
Subject: Re: [edk2] [PATCH 40/47] SecurityPkg/AuthVariableLib: rebase to ARRAY_SIZE()

Star, Chao,

On 10/26/16 21:04, Laszlo Ersek wrote:
> Cc: Chao Zhang <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>

> Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>>

> ---

>  SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

>

> diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> index c4fbb649f1fd..792a1232aed9 100644

> --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

> @@ -421,7 +421,7 @@ AuthVariableLibInitialize (

>    AuthVarLibContextOut->StructVersion = AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_VERSION;

>    AuthVarLibContextOut->StructSize = sizeof (AUTH_VAR_LIB_CONTEXT_OUT);

>    AuthVarLibContextOut->AuthVarEntry = mAuthVarEntry;

> -  AuthVarLibContextOut->AuthVarEntryCount = sizeof (mAuthVarEntry) / sizeof (mAuthVarEntry[0]);

> +  AuthVarLibContextOut->AuthVarEntryCount = ARRAY_SIZE (mAuthVarEntry);

>    mAuthVarAddressPointer[0] = (VOID **) &mPubKeyStore;

>    mAuthVarAddressPointer[1] = (VOID **) &mCertDbStore;

>    mAuthVarAddressPointer[2] = (VOID **) &mHashCtx;

> @@ -433,7 +433,7 @@ AuthVariableLibInitialize (

>    mAuthVarAddressPointer[8] = (VOID **) &(mAuthVarLibContextIn->CheckRemainingSpaceForConsistency),

>    mAuthVarAddressPointer[9] = (VOID **) &(mAuthVarLibContextIn->AtRuntime),

>    AuthVarLibContextOut->AddressPointer = mAuthVarAddressPointer;

> -  AuthVarLibContextOut->AddressPointerCount = sizeof (mAuthVarAddressPointer) / sizeof (mAuthVarAddressPointer[0]);

> +  AuthVarLibContextOut->AddressPointerCount = ARRAY_SIZE (mAuthVarAddressPointer);

>

>    return Status;

>  }

>


can one of you guys please review this patch?

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Laszlo Ersek Oct. 28, 2016, 10:20 a.m. UTC | #5
On 10/28/16 10:36, Zhang, Chao B wrote:
> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>


Thank you. I committed the series yesterday, with Star's and Jordan's
R-bs for this patch. I hope that's okay.

Thanks!
Laszlo

> From: Laszlo Ersek [mailto:lersek@redhat.com]

> Sent: Thursday, October 27, 2016 5:08 PM

> To: Zeng, Star; Zhang, Chao B

> Cc: edk2-devel-01

> Subject: Re: [edk2] [PATCH 40/47] SecurityPkg/AuthVariableLib: rebase to ARRAY_SIZE()

> 

> Star, Chao,

> 

> On 10/26/16 21:04, Laszlo Ersek wrote:

>> Cc: Chao Zhang <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>

>> Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>

>> Contributed-under: TianoCore Contribution Agreement 1.0

>> Signed-off-by: Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>>

>> ---

>>  SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c | 4 ++--

>>  1 file changed, 2 insertions(+), 2 deletions(-)

>>

>> diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

>> index c4fbb649f1fd..792a1232aed9 100644

>> --- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

>> +++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c

>> @@ -421,7 +421,7 @@ AuthVariableLibInitialize (

>>    AuthVarLibContextOut->StructVersion = AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_VERSION;

>>    AuthVarLibContextOut->StructSize = sizeof (AUTH_VAR_LIB_CONTEXT_OUT);

>>    AuthVarLibContextOut->AuthVarEntry = mAuthVarEntry;

>> -  AuthVarLibContextOut->AuthVarEntryCount = sizeof (mAuthVarEntry) / sizeof (mAuthVarEntry[0]);

>> +  AuthVarLibContextOut->AuthVarEntryCount = ARRAY_SIZE (mAuthVarEntry);

>>    mAuthVarAddressPointer[0] = (VOID **) &mPubKeyStore;

>>    mAuthVarAddressPointer[1] = (VOID **) &mCertDbStore;

>>    mAuthVarAddressPointer[2] = (VOID **) &mHashCtx;

>> @@ -433,7 +433,7 @@ AuthVariableLibInitialize (

>>    mAuthVarAddressPointer[8] = (VOID **) &(mAuthVarLibContextIn->CheckRemainingSpaceForConsistency),

>>    mAuthVarAddressPointer[9] = (VOID **) &(mAuthVarLibContextIn->AtRuntime),

>>    AuthVarLibContextOut->AddressPointer = mAuthVarAddressPointer;

>> -  AuthVarLibContextOut->AddressPointerCount = sizeof (mAuthVarAddressPointer) / sizeof (mAuthVarAddressPointer[0]);

>> +  AuthVarLibContextOut->AddressPointerCount = ARRAY_SIZE (mAuthVarAddressPointer);

>>

>>    return Status;

>>  }

>>

> 

> can one of you guys please review this patch?

> 

> Thanks!

> Laszlo

> _______________________________________________

> edk2-devel mailing list

> edk2-devel@lists.01.org

> https://lists.01.org/mailman/listinfo/edk2-devel

> 


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
index c4fbb649f1fd..792a1232aed9 100644
--- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
+++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
@@ -421,7 +421,7 @@  AuthVariableLibInitialize (
   AuthVarLibContextOut->StructVersion = AUTH_VAR_LIB_CONTEXT_OUT_STRUCT_VERSION;
   AuthVarLibContextOut->StructSize = sizeof (AUTH_VAR_LIB_CONTEXT_OUT);
   AuthVarLibContextOut->AuthVarEntry = mAuthVarEntry;
-  AuthVarLibContextOut->AuthVarEntryCount = sizeof (mAuthVarEntry) / sizeof (mAuthVarEntry[0]);
+  AuthVarLibContextOut->AuthVarEntryCount = ARRAY_SIZE (mAuthVarEntry);
   mAuthVarAddressPointer[0] = (VOID **) &mPubKeyStore;
   mAuthVarAddressPointer[1] = (VOID **) &mCertDbStore;
   mAuthVarAddressPointer[2] = (VOID **) &mHashCtx;
@@ -433,7 +433,7 @@  AuthVariableLibInitialize (
   mAuthVarAddressPointer[8] = (VOID **) &(mAuthVarLibContextIn->CheckRemainingSpaceForConsistency),
   mAuthVarAddressPointer[9] = (VOID **) &(mAuthVarLibContextIn->AtRuntime),
   AuthVarLibContextOut->AddressPointer = mAuthVarAddressPointer;
-  AuthVarLibContextOut->AddressPointerCount = sizeof (mAuthVarAddressPointer) / sizeof (mAuthVarAddressPointer[0]);
+  AuthVarLibContextOut->AddressPointerCount = ARRAY_SIZE (mAuthVarAddressPointer);
 
   return Status;
 }