public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
@ 2018-02-07  1:30 Dandan Bi
  2018-02-07  1:44 ` Zeng, Star
  2018-02-07  3:29 ` Ni, Ruiyu
  0 siblings, 2 replies; 5+ messages in thread
From: Dandan Bi @ 2018-02-07  1:30 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Ruiyu Ni

Initialize local variable to suppress warning C4703:
potentially uninitialized local pointer variable.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index c48e3bb..13221b9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -242,10 +242,12 @@ PciBusDriverBindingStart (
 {
   EFI_STATUS                      Status;
   EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
 
+  PciRootBridgeIo = NULL;
+
   //
   // Check RemainingDevicePath validation
   //
   if (RemainingDevicePath != NULL) {
     //
-- 
1.9.5.msysgit.1



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

* Re: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
  2018-02-07  1:30 [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure Dandan Bi
@ 2018-02-07  1:44 ` Zeng, Star
  2018-02-07  1:58   ` Bi, Dandan
       [not found]   ` <2d354a20-80eb-f0e4-25dc-3f19f9828c88@redhat.com>
  2018-02-07  3:29 ` Ni, Ruiyu
  1 sibling, 2 replies; 5+ messages in thread
From: Zeng, Star @ 2018-02-07  1:44 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org
  Cc: Ni, Ruiyu, Laszlo Ersek (lersek@redhat.com), Zeng, Star

Reviewed-by: Star Zeng <star.zeng@intel.com>

Cc Laszlo.

You can add similar comment like 1ea53108f6c1010a00a828d1d59ea28934025415 as recommended by https://bugzilla.tianocore.org/show_bug.cgi?id=607.

Thanks,
Star
-----Original Message-----
From: Bi, Dandan 
Sent: Wednesday, February 7, 2018 9:31 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
Subject: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure

Initialize local variable to suppress warning C4703:
potentially uninitialized local pointer variable.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index c48e3bb..13221b9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -242,10 +242,12 @@ PciBusDriverBindingStart (  {
   EFI_STATUS                      Status;
   EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
 
+  PciRootBridgeIo = NULL;
+
   //
   // Check RemainingDevicePath validation
   //
   if (RemainingDevicePath != NULL) {
     //
--
1.9.5.msysgit.1



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

* Re: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
  2018-02-07  1:44 ` Zeng, Star
@ 2018-02-07  1:58   ` Bi, Dandan
       [not found]   ` <2d354a20-80eb-f0e4-25dc-3f19f9828c88@redhat.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Bi, Dandan @ 2018-02-07  1:58 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org
  Cc: Ni, Ruiyu, Laszlo Ersek (lersek@redhat.com)

Thank you star. I will add comment before commit the patch. 


Regards,
Dandan
-----Original Message-----
From: Zeng, Star 
Sent: Wednesday, February 7, 2018 9:45 AM
To: Bi, Dandan <dandan.bi@intel.com>; edk2-devel@lists.01.org
Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>; Zeng, Star <star.zeng@intel.com>
Subject: RE: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure

Reviewed-by: Star Zeng <star.zeng@intel.com>

Cc Laszlo.

You can add similar comment like 1ea53108f6c1010a00a828d1d59ea28934025415 as recommended by https://bugzilla.tianocore.org/show_bug.cgi?id=607.

Thanks,
Star
-----Original Message-----
From: Bi, Dandan 
Sent: Wednesday, February 7, 2018 9:31 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
Subject: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure

Initialize local variable to suppress warning C4703:
potentially uninitialized local pointer variable.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index c48e3bb..13221b9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -242,10 +242,12 @@ PciBusDriverBindingStart (  {
   EFI_STATUS                      Status;
   EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
 
+  PciRootBridgeIo = NULL;
+
   //
   // Check RemainingDevicePath validation
   //
   if (RemainingDevicePath != NULL) {
     //
--
1.9.5.msysgit.1



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

* Re: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
  2018-02-07  1:30 [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure Dandan Bi
  2018-02-07  1:44 ` Zeng, Star
@ 2018-02-07  3:29 ` Ni, Ruiyu
  1 sibling, 0 replies; 5+ messages in thread
From: Ni, Ruiyu @ 2018-02-07  3:29 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Star Zeng

On 2/7/2018 9:30 AM, Dandan Bi wrote:
> Initialize local variable to suppress warning C4703:
> potentially uninitialized local pointer variable.
> 
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>   MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> index c48e3bb..13221b9 100644
> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> @@ -242,10 +242,12 @@ PciBusDriverBindingStart (
>   {
>     EFI_STATUS                      Status;
>     EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
>     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
>   
> +  PciRootBridgeIo = NULL;
> +
>     //
>     // Check RemainingDevicePath validation
>     //
>     if (RemainingDevicePath != NULL) {
>       //
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thank you very much!!

-- 
Thanks,
Ray


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

* Re: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
       [not found]   ` <2d354a20-80eb-f0e4-25dc-3f19f9828c88@redhat.com>
@ 2018-02-07  8:25     ` Bi, Dandan
  0 siblings, 0 replies; 5+ messages in thread
From: Bi, Dandan @ 2018-02-07  8:25 UTC (permalink / raw)
  To: Laszlo Ersek, Zeng, Star, edk2-devel@lists.01.org; +Cc: Ni, Ruiyu

Hi Laszlo,

Thanks for your comments. I will update the commit message. 


Regards,
Dandan

-----Original Message-----
From: Laszlo Ersek [mailto:lersek@redhat.com] 
Sent: Wednesday, February 7, 2018 4:17 PM
To: Zeng, Star <star.zeng@intel.com>; Bi, Dandan <dandan.bi@intel.com>; edk2-devel@lists.01.org
Cc: Ni, Ruiyu <ruiyu.ni@intel.com>
Subject: Re: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure

On 02/07/18 02:44, Zeng, Star wrote:
> Reviewed-by: Star Zeng <star.zeng@intel.com>
> 
> Cc Laszlo.

Thanks!

> You can add similar comment like 1ea53108f6c1010a00a828d1d59ea28934025415 as recommended by https://bugzilla.tianocore.org/show_bug.cgi?id=607.

Yes, that would be nice.

The patch looks correct. Dandan, can you please add the following to the commit message too:

----
Both reads (dereferences) of "PciRootBridgeIo" in
PciBusDriverBindingStart() are only reached if "gFullEnumeration" is TRUE on entry *and* we successfully open the EfiPciRootBridgeIoProtocol interface.
----

With that:

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

Thanks!
Laszlo


> Thanks,
> Star
> -----Original Message-----
> From: Bi, Dandan
> Sent: Wednesday, February 7, 2018 9:31 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
> 
> Initialize local variable to suppress warning C4703:
> potentially uninitialized local pointer variable.
> 
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c 
> b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> index c48e3bb..13221b9 100644
> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> @@ -242,10 +242,12 @@ PciBusDriverBindingStart (  {
>    EFI_STATUS                      Status;
>    EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
>    EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
>  
> +  PciRootBridgeIo = NULL;
> +
>    //
>    // Check RemainingDevicePath validation
>    //
>    if (RemainingDevicePath != NULL) {
>      //
> --
> 1.9.5.msysgit.1
> 


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

end of thread, other threads:[~2018-02-07  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-07  1:30 [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure Dandan Bi
2018-02-07  1:44 ` Zeng, Star
2018-02-07  1:58   ` Bi, Dandan
     [not found]   ` <2d354a20-80eb-f0e4-25dc-3f19f9828c88@redhat.com>
2018-02-07  8:25     ` Bi, Dandan
2018-02-07  3:29 ` Ni, Ruiyu

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