[PATCH 1/1] pci: correct function name in message

Simon Glass sjg at chromium.org
Fri Jul 28 03:52:05 CEST 2023


On Thu, 27 Jul 2023 at 10:50, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> If an error message contains a function name, it should match the name of
> the function throwing the message.
>
> Fixes: 7739d93d8288 ("pci: Match region flags using a mask")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  drivers/pci/pci-uclass.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Can you revert some of that change? It needs to go back to returning
an error code, not a phys_addr_ t, so the caller can detect the error.

>
> diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
> index 632c1a63cf..7f3d6ddf91 100644
> --- a/drivers/pci/pci-uclass.c
> +++ b/drivers/pci/pci-uclass.c
> @@ -1446,7 +1446,7 @@ phys_addr_t dm_pci_bus_to_phys(struct udevice *dev, pci_addr_t bus_addr,
>                 return res->phys_start + offset;
>         }
>
> -       puts("pci_hose_bus_to_phys: invalid physical address\n");
> +       puts("dm_pci_bus_to_phys: invalid physical address\n");
>         return 0;
>  }
>
> @@ -1486,7 +1486,7 @@ pci_addr_t dm_pci_phys_to_bus(struct udevice *dev, phys_addr_t phys_addr,
>                 return res->bus_start + offset;
>         }
>
> -       puts("pci_hose_phys_to_bus: invalid physical address\n");
> +       puts("dm_pci_phys_to_bus: invalid physical address\n");
>         return 0;
>  }
>
> --
> 2.40.1
>

Regards,
Simon


More information about the U-Boot mailing list