diff mbox

[U-Boot,v2,1/8] drivers/pci: Fix for debug builds without CONFIG_PCI_ENUM_ONLY

Message ID 20151221232449.653FC61223@mail.nwl.cc
State Superseded
Delegated to: Prafulla Wadaskar
Headers show

Commit Message

Phil Sutter Dec. 21, 2015, 11:25 p.m. UTC
The debug printing references bar_res, which exists only if
CONFIG_PCI_ENUM_ONLY is not defined. Therefore move it into the ifdef'd
area.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 drivers/pci/pci_auto_old.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Roese Dec. 22, 2015, 8:06 a.m. UTC | #1
(adding Simon and Bin to Cc)

On 22.12.2015 00:25, Phil Sutter wrote:
> The debug printing references bar_res, which exists only if
> CONFIG_PCI_ENUM_ONLY is not defined. Therefore move it into the ifdef'd
> area.
>
> Signed-off-by: Phil Sutter <phil@nwl.cc>
> ---
>   drivers/pci/pci_auto_old.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci_auto_old.c b/drivers/pci/pci_auto_old.c
> index 932eab8..8f17779 100644
> --- a/drivers/pci/pci_auto_old.c
> +++ b/drivers/pci/pci_auto_old.c
> @@ -98,11 +98,11 @@ void pciauto_setup_device(struct pci_controller *hose,
>   				bar_res = prefetch;
>   			else
>   				bar_res = mem;
> -#endif
>
>   			debug("PCI Autoconfig: BAR %d, %s, size=0x%llx, ",
>   			      bar_nr, bar_res == prefetch ? "Prf" : "Mem",
>   			      (unsigned long long)bar_size);
> +#endif
>   		}
>
>   #ifndef CONFIG_PCI_ENUM_ONLY
>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
diff mbox

Patch

diff --git a/drivers/pci/pci_auto_old.c b/drivers/pci/pci_auto_old.c
index 932eab8..8f17779 100644
--- a/drivers/pci/pci_auto_old.c
+++ b/drivers/pci/pci_auto_old.c
@@ -98,11 +98,11 @@  void pciauto_setup_device(struct pci_controller *hose,
 				bar_res = prefetch;
 			else
 				bar_res = mem;
-#endif
 
 			debug("PCI Autoconfig: BAR %d, %s, size=0x%llx, ",
 			      bar_nr, bar_res == prefetch ? "Prf" : "Mem",
 			      (unsigned long long)bar_size);
+#endif
 		}
 
 #ifndef CONFIG_PCI_ENUM_ONLY