public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bi, Dandan" <dandan.bi@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"Ni, Ruiyu" <ruiyu.ni@intel.com>
Subject: Re: [patch 2/2] MdeModulePkg/NonDiscoverablePciDevice: Make variable definition follow rule
Date: Fri, 16 Dec 2016 01:23:12 +0000	[thread overview]
Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3B86391D@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <CAKv+Gu-j6TQkZbDOuoD_9XzAT4XG1sY3hJnceTybEzTwkbq3Ug@mail.gmail.com>

Hi Ard,

The rule we are talking about here is :
For variable name,  it should be 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters  4 Global variable name should start with a 'g'...etc.
The EDK II C Coding Standards Specification establishes a set of  coding rules, you can refer to it.
We also have codes scan tool  Ecc.exe in edk2-BaseTools-win32 to check the coding style issues.
You can run below commands to run ECC scan: 
ecc -c config.ini -e exception.xml -t directory you want to scan  -r reportresult.csv
such as: ecc -c config.ini -e exception.xml  -t  edk2\MdeModulePkg\Bus\Pci\NonDiscoverablePciDeviceDxe  -r NonDiscoverablePciDeviceDxe.csv
Then you will find some coding style issues list in the NonDiscoverablePciDeviceDxe.csv.


Thanks,
Dandan

-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] 
Sent: Thursday, December 15, 2016 7:41 PM
To: Bi, Dandan <dandan.bi@intel.com>
Cc: edk2-devel@lists.01.org; Ni, Ruiyu <ruiyu.ni@intel.com>
Subject: Re: [patch 2/2] MdeModulePkg/NonDiscoverablePciDevice: Make variable definition follow rule

On 15 December 2016 at 07:11, Dandan Bi <dandan.bi@intel.com> wrote:
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>

I have no objections to this patch, but which rule are we talking about here?

> ---
>  .../Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c  | 2 +-
>  .../Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c   | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git 
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD
> eviceDxe.c 
> b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD
> eviceDxe.c
> index a868ea2..921225b 100644
> --- 
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD
> eviceDxe.c
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> +++ PciDeviceDxe.c
> @@ -19,11 +19,11 @@
>  //
>  // We only support the following device types  //  STATIC  CONST 
> EFI_GUID * CONST -SupportedNonDiscoverableDevices [] = {
> +SupportedNonDiscoverableDevices[] = {
>    &gEdkiiNonDiscoverableAhciDeviceGuid,
>    &gEdkiiNonDiscoverableEhciDeviceGuid,
>    &gEdkiiNonDiscoverableNvmeDeviceGuid,
>    &gEdkiiNonDiscoverableOhciDeviceGuid,
>    &gEdkiiNonDiscoverableSdhciDeviceGuid,
> diff --git 
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD
> eviceIo.c 
> b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD
> eviceIo.c
> index 59b6076..a54313f 100644
> --- 
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD
> eviceIo.c
> +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> +++ PciDeviceIo.c
> @@ -913,11 +913,12 @@ PciIoGetBarAttributes (
>    OUT UINT64                         *Supports OPTIONAL,
>    OUT VOID                           **Resources OPTIONAL
>    )
>  {
>    NON_DISCOVERABLE_PCI_DEVICE       *Dev;
> -  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptor, *BarDesc;
> +  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptor;  
> + EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *BarDesc;
>    EFI_ACPI_END_TAG_DESCRIPTOR       *End;
>    EFI_STATUS                        Status;
>
>    if (Supports == NULL && Resources == NULL) {
>      return EFI_INVALID_PARAMETER;
> --
> 1.9.5.msysgit.1
>

  reply	other threads:[~2016-12-16  1:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15  7:11 [patch 1/2] MdeModulePkg/NonDiscoverablePciDeviceDxe: Add comments for functions Dandan Bi
2016-12-15  7:11 ` [patch 2/2] MdeModulePkg/NonDiscoverablePciDevice: Make variable definition follow rule Dandan Bi
2016-12-15 11:41   ` Ard Biesheuvel
2016-12-16  1:23     ` Bi, Dandan [this message]
2016-12-15  7:45 ` [patch 1/2] MdeModulePkg/NonDiscoverablePciDeviceDxe: Add comments for functions Ard Biesheuvel
2016-12-15  8:31   ` Bi, Dandan
2016-12-15  8:32     ` Ard Biesheuvel

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=3C0D5C461C9E904E8F62152F6274C0BB3B86391D@shsmsx102.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