public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch] ShellPkg/Dh: Refine variable naming style
@ 2017-09-28  2:45 Dandan Bi
  2017-09-28  5:56 ` Ni, Ruiyu
  0 siblings, 1 reply; 3+ messages in thread
From: Dandan Bi @ 2017-09-28  2:45 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Jaben Carsey

Avoid using only lower-case characters for variable name.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
index 7d06163..a7bd251 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
@@ -284,11 +284,11 @@ GetProtocolInfoString(
   EFI_STATUS                Status;
   CHAR16                    *RetVal;
   UINTN                     Size;
   CHAR16                    *Temp;
   CHAR16                    GuidStr[40];
-  VOID                      *instance;
+  VOID                      *Instance;
   CHAR16                    InstanceStr[17];
 
   ProtocolGuidArray = NULL;
   RetVal            = NULL;
   Size              = 0;
@@ -314,14 +314,14 @@ GetProtocolInfoString(
         FreePool(Temp);
       }
       StrnCatGrow(&RetVal, &Size, L"%N", 0);
 
       if(Verbose) {
-        Status = gBS->HandleProtocol (TheHandle, ProtocolGuidArray[ProtocolIndex], &instance);
+        Status = gBS->HandleProtocol (TheHandle, ProtocolGuidArray[ProtocolIndex], &Instance);
         if (!EFI_ERROR (Status)) {
           StrnCatGrow (&RetVal, &Size, L"(%H", 0);
-          UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%x", instance);
+          UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%x", Instance);
           StrnCatGrow (&RetVal, &Size, InstanceStr, 0);
           StrnCatGrow (&RetVal, &Size, L"%N)", 0);
         }
       }
 
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] ShellPkg/Dh: Refine variable naming style
  2017-09-28  2:45 [patch] ShellPkg/Dh: Refine variable naming style Dandan Bi
@ 2017-09-28  5:56 ` Ni, Ruiyu
  2017-09-28 13:41   ` Carsey, Jaben
  0 siblings, 1 reply; 3+ messages in thread
From: Ni, Ruiyu @ 2017-09-28  5:56 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Carsey, Jaben

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Bi, Dandan
> Sent: Thursday, September 28, 2017 10:45 AM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com>
> Subject: [patch] ShellPkg/Dh: Refine variable naming style
> 
> Avoid using only lower-case characters for variable name.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
> b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
> index 7d06163..a7bd251 100644
> --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
> +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
> @@ -284,11 +284,11 @@ GetProtocolInfoString(
>    EFI_STATUS                Status;
>    CHAR16                    *RetVal;
>    UINTN                     Size;
>    CHAR16                    *Temp;
>    CHAR16                    GuidStr[40];
> -  VOID                      *instance;
> +  VOID                      *Instance;
>    CHAR16                    InstanceStr[17];
> 
>    ProtocolGuidArray = NULL;
>    RetVal            = NULL;
>    Size              = 0;
> @@ -314,14 +314,14 @@ GetProtocolInfoString(
>          FreePool(Temp);
>        }
>        StrnCatGrow(&RetVal, &Size, L"%N", 0);
> 
>        if(Verbose) {
> -        Status = gBS->HandleProtocol (TheHandle,
> ProtocolGuidArray[ProtocolIndex], &instance);
> +        Status = gBS->HandleProtocol (TheHandle,
> ProtocolGuidArray[ProtocolIndex], &Instance);
>          if (!EFI_ERROR (Status)) {
>            StrnCatGrow (&RetVal, &Size, L"(%H", 0);
> -          UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%x", instance);
> +          UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%x", Instance);
>            StrnCatGrow (&RetVal, &Size, InstanceStr, 0);
>            StrnCatGrow (&RetVal, &Size, L"%N)", 0);
>          }
>        }
> 
> --
> 1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] ShellPkg/Dh: Refine variable naming style
  2017-09-28  5:56 ` Ni, Ruiyu
@ 2017-09-28 13:41   ` Carsey, Jaben
  0 siblings, 0 replies; 3+ messages in thread
From: Carsey, Jaben @ 2017-09-28 13:41 UTC (permalink / raw)
  To: Ni, Ruiyu, Bi, Dandan, edk2-devel@lists.01.org

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----Original Message-----
> From: Ni, Ruiyu
> Sent: Wednesday, September 27, 2017 10:57 PM
> To: Bi, Dandan <dandan.bi@intel.com>; edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>
> Subject: RE: [patch] ShellPkg/Dh: Refine variable naming style
> Importance: High
> 
> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> 
> Thanks/Ray
> 
> > -----Original Message-----
> > From: Bi, Dandan
> > Sent: Thursday, September 28, 2017 10:45 AM
> > To: edk2-devel@lists.01.org
> > Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben
> <jaben.carsey@intel.com>
> > Subject: [patch] ShellPkg/Dh: Refine variable naming style
> >
> > Avoid using only lower-case characters for variable name.
> >
> > Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> > Cc: Jaben Carsey <jaben.carsey@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> > ---
> >  ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
> > b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
> > index 7d06163..a7bd251 100644
> > --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
> > +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
> > @@ -284,11 +284,11 @@ GetProtocolInfoString(
> >    EFI_STATUS                Status;
> >    CHAR16                    *RetVal;
> >    UINTN                     Size;
> >    CHAR16                    *Temp;
> >    CHAR16                    GuidStr[40];
> > -  VOID                      *instance;
> > +  VOID                      *Instance;
> >    CHAR16                    InstanceStr[17];
> >
> >    ProtocolGuidArray = NULL;
> >    RetVal            = NULL;
> >    Size              = 0;
> > @@ -314,14 +314,14 @@ GetProtocolInfoString(
> >          FreePool(Temp);
> >        }
> >        StrnCatGrow(&RetVal, &Size, L"%N", 0);
> >
> >        if(Verbose) {
> > -        Status = gBS->HandleProtocol (TheHandle,
> > ProtocolGuidArray[ProtocolIndex], &instance);
> > +        Status = gBS->HandleProtocol (TheHandle,
> > ProtocolGuidArray[ProtocolIndex], &Instance);
> >          if (!EFI_ERROR (Status)) {
> >            StrnCatGrow (&RetVal, &Size, L"(%H", 0);
> > -          UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%x", instance);
> > +          UnicodeSPrint (InstanceStr, sizeof (InstanceStr), L"%x", Instance);
> >            StrnCatGrow (&RetVal, &Size, InstanceStr, 0);
> >            StrnCatGrow (&RetVal, &Size, L"%N)", 0);
> >          }
> >        }
> >
> > --
> > 1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-28 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28  2:45 [patch] ShellPkg/Dh: Refine variable naming style Dandan Bi
2017-09-28  5:56 ` Ni, Ruiyu
2017-09-28 13:41   ` Carsey, Jaben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox