[edk2] [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Add comment in mFmpDeviceLocked's declaration

Star Zeng posted 1 patch 5 years, 8 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
FmpDevicePkg/FmpDxe/FmpDxe.c | 4 ++++
1 file changed, 4 insertions(+)
[edk2] [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Add comment in mFmpDeviceLocked's declaration
Posted by Star Zeng 5 years, 8 months ago
Add comment in mFmpDeviceLocked's declaration to make it more clear.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 FmpDevicePkg/FmpDxe/FmpDxe.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c
index 94fdf5608529..37bcaf19ec6d 100644
--- a/FmpDevicePkg/FmpDxe/FmpDxe.c
+++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
@@ -89,6 +89,10 @@ UINT64  mImageId      = 0x1;
 CHAR16  *mVersionName = NULL;
 
 EFI_EVENT  mFmpDeviceLockEvent;
+//
+// Indicates whether the FMP device is locked / the lock operation is attempted or not.
+// It will be set to TRUE after calling FmpDeviceLock().
+//
 BOOLEAN    mFmpDeviceLocked = FALSE;
 
 /**
-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Add comment in mFmpDeviceLocked's declaration
Posted by Kinney, Michael D 5 years, 8 months ago
Star,

I recommend using the following comment to describe
this module global variable.

//
// Indicates if an attempt has been made to lock a 
// FLASH storage device by calling FmpDeviceLock().
// A FLASH storage device may not support being locked,
// so this variable is set to TRUE even if FmpDeviceLock()
// returns an error.
//

Thanks,

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-
> bounces@lists.01.org] On Behalf Of Star Zeng
> Sent: Friday, July 27, 2018 6:59 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>;
> Zeng, Star <star.zeng@intel.com>
> Subject: [edk2] [staging/FmpDevicePkg-master][PATCH]
> FmpDevicePkg FmpDxe: Add comment in mFmpDeviceLocked's
> declaration
> 
> Add comment in mFmpDeviceLocked's declaration to make
> it more clear.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
>  FmpDevicePkg/FmpDxe/FmpDxe.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c
> b/FmpDevicePkg/FmpDxe/FmpDxe.c
> index 94fdf5608529..37bcaf19ec6d 100644
> --- a/FmpDevicePkg/FmpDxe/FmpDxe.c
> +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
> @@ -89,6 +89,10 @@ UINT64  mImageId      = 0x1;
>  CHAR16  *mVersionName = NULL;
> 
>  EFI_EVENT  mFmpDeviceLockEvent;
> +//
> +// Indicates whether the FMP device is locked / the
> lock operation is attempted or not.
> +// It will be set to TRUE after calling
> FmpDeviceLock().
> +//
>  BOOLEAN    mFmpDeviceLocked = FALSE;
> 
>  /**
> --
> 2.7.0.windows.1
> 
> _______________________________________________
> 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
Re: [edk2] [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Add comment in mFmpDeviceLocked's declaration
Posted by Zeng, Star 5 years, 8 months ago
Agree. :)
Will send a V2 patch soon.

Thanks,
Star
-----Original Message-----
From: Kinney, Michael D 
Sent: Saturday, July 28, 2018 2:01 PM
To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Zeng, Star <star.zeng@intel.com>
Subject: RE: [edk2] [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Add comment in mFmpDeviceLocked's declaration

Star,

I recommend using the following comment to describe
this module global variable.

//
// Indicates if an attempt has been made to lock a 
// FLASH storage device by calling FmpDeviceLock().
// A FLASH storage device may not support being locked,
// so this variable is set to TRUE even if FmpDeviceLock()
// returns an error.
//

Thanks,

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-
> bounces@lists.01.org] On Behalf Of Star Zeng
> Sent: Friday, July 27, 2018 6:59 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>;
> Zeng, Star <star.zeng@intel.com>
> Subject: [edk2] [staging/FmpDevicePkg-master][PATCH]
> FmpDevicePkg FmpDxe: Add comment in mFmpDeviceLocked's
> declaration
> 
> Add comment in mFmpDeviceLocked's declaration to make
> it more clear.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
>  FmpDevicePkg/FmpDxe/FmpDxe.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c
> b/FmpDevicePkg/FmpDxe/FmpDxe.c
> index 94fdf5608529..37bcaf19ec6d 100644
> --- a/FmpDevicePkg/FmpDxe/FmpDxe.c
> +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
> @@ -89,6 +89,10 @@ UINT64  mImageId      = 0x1;
>  CHAR16  *mVersionName = NULL;
> 
>  EFI_EVENT  mFmpDeviceLockEvent;
> +//
> +// Indicates whether the FMP device is locked / the
> lock operation is attempted or not.
> +// It will be set to TRUE after calling
> FmpDeviceLock().
> +//
>  BOOLEAN    mFmpDeviceLocked = FALSE;
> 
>  /**
> --
> 2.7.0.windows.1
> 
> _______________________________________________
> 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