diff mbox series

ppc/pnv/pci: Clean up error messages

Message ID 20230619233636.57452-1-joel@jms.id.au (mailing list archive)
State New, archived
Headers show
Series ppc/pnv/pci: Clean up error messages | expand

Commit Message

Joel Stanley June 19, 2023, 11:36 p.m. UTC
The phb error macros add a newline for you, so remove the second one to
avoid double whitespace.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 hw/pci-host/pnv_phb4.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Philippe Mathieu-Daudé June 20, 2023, 5:58 a.m. UTC | #1
On 20/6/23 01:36, Joel Stanley wrote:
> The phb error macros add a newline for you, so remove the second one to
> avoid double whitespace.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>   hw/pci-host/pnv_phb4.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Cédric Le Goater June 20, 2023, 6 a.m. UTC | #2
On 6/20/23 01:36, Joel Stanley wrote:
> The phb error macros add a newline for you, so remove the second one to
> avoid double whitespace.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>   hw/pci-host/pnv_phb4.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
> index 542f9e293221..6232cbeee161 100644
> --- a/hw/pci-host/pnv_phb4.c
> +++ b/hw/pci-host/pnv_phb4.c
> @@ -133,13 +133,13 @@ static void pnv_phb4_rc_config_write(PnvPHB4 *phb, unsigned off,
>       PCIDevice *pdev;
>   
>       if (size != 4) {
> -        phb_error(phb, "rc_config_write invalid size %d\n", size);
> +        phb_error(phb, "rc_config_write invalid size %d", size);
>           return;
>       }
>   
>       pdev = pci_find_device(pci->bus, 0, 0);
>       if (!pdev) {
> -        phb_error(phb, "rc_config_write device not found\n");
> +        phb_error(phb, "rc_config_write device not found");
>           return;
>       }
>   
> @@ -155,13 +155,13 @@ static uint64_t pnv_phb4_rc_config_read(PnvPHB4 *phb, unsigned off,
>       uint64_t val;
>   
>       if (size != 4) {
> -        phb_error(phb, "rc_config_read invalid size %d\n", size);
> +        phb_error(phb, "rc_config_read invalid size %d", size);
>           return ~0ull;
>       }
>   
>       pdev = pci_find_device(pci->bus, 0, 0);
>       if (!pdev) {
> -        phb_error(phb, "rc_config_read device not found\n");
> +        phb_error(phb, "rc_config_read device not found");
>           return ~0ull;
>       }
>   
> @@ -1039,19 +1039,19 @@ static void pnv_pec_stk_nest_xscom_write(void *opaque, hwaddr addr,
>           if (phb->nest_regs[PEC_NEST_STK_BAR_EN] &
>               (PEC_NEST_STK_BAR_EN_MMIO0 |
>                PEC_NEST_STK_BAR_EN_MMIO1)) {
> -            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
> +            phb_pec_error(pec, "Changing enabled BAR unsupported");
>           }
>           phb->nest_regs[reg] = val & 0xffffffffff000000ull;
>           break;
>       case PEC_NEST_STK_PHB_REGS_BAR:
>           if (phb->nest_regs[PEC_NEST_STK_BAR_EN] & PEC_NEST_STK_BAR_EN_PHB) {
> -            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
> +            phb_pec_error(pec, "Changing enabled BAR unsupported");
>           }
>           phb->nest_regs[reg] = val & 0xffffffffffc00000ull;
>           break;
>       case PEC_NEST_STK_INT_BAR:
>           if (phb->nest_regs[PEC_NEST_STK_BAR_EN] & PEC_NEST_STK_BAR_EN_INT) {
> -            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
> +            phb_pec_error(pec, "Changing enabled BAR unsupported");
>           }
>           phb->nest_regs[reg] = val & 0xfffffff000000000ull;
>           break;
Cédric Le Goater June 23, 2023, 9:28 a.m. UTC | #3
On 6/20/23 01:36, Joel Stanley wrote:
> The phb error macros add a newline for you, so remove the second one to
> avoid double whitespace.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>


Applied to ppc-next.

Thanks,

C.



> ---
>   hw/pci-host/pnv_phb4.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
> index 542f9e293221..6232cbeee161 100644
> --- a/hw/pci-host/pnv_phb4.c
> +++ b/hw/pci-host/pnv_phb4.c
> @@ -133,13 +133,13 @@ static void pnv_phb4_rc_config_write(PnvPHB4 *phb, unsigned off,
>       PCIDevice *pdev;
>   
>       if (size != 4) {
> -        phb_error(phb, "rc_config_write invalid size %d\n", size);
> +        phb_error(phb, "rc_config_write invalid size %d", size);
>           return;
>       }
>   
>       pdev = pci_find_device(pci->bus, 0, 0);
>       if (!pdev) {
> -        phb_error(phb, "rc_config_write device not found\n");
> +        phb_error(phb, "rc_config_write device not found");
>           return;
>       }
>   
> @@ -155,13 +155,13 @@ static uint64_t pnv_phb4_rc_config_read(PnvPHB4 *phb, unsigned off,
>       uint64_t val;
>   
>       if (size != 4) {
> -        phb_error(phb, "rc_config_read invalid size %d\n", size);
> +        phb_error(phb, "rc_config_read invalid size %d", size);
>           return ~0ull;
>       }
>   
>       pdev = pci_find_device(pci->bus, 0, 0);
>       if (!pdev) {
> -        phb_error(phb, "rc_config_read device not found\n");
> +        phb_error(phb, "rc_config_read device not found");
>           return ~0ull;
>       }
>   
> @@ -1039,19 +1039,19 @@ static void pnv_pec_stk_nest_xscom_write(void *opaque, hwaddr addr,
>           if (phb->nest_regs[PEC_NEST_STK_BAR_EN] &
>               (PEC_NEST_STK_BAR_EN_MMIO0 |
>                PEC_NEST_STK_BAR_EN_MMIO1)) {
> -            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
> +            phb_pec_error(pec, "Changing enabled BAR unsupported");
>           }
>           phb->nest_regs[reg] = val & 0xffffffffff000000ull;
>           break;
>       case PEC_NEST_STK_PHB_REGS_BAR:
>           if (phb->nest_regs[PEC_NEST_STK_BAR_EN] & PEC_NEST_STK_BAR_EN_PHB) {
> -            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
> +            phb_pec_error(pec, "Changing enabled BAR unsupported");
>           }
>           phb->nest_regs[reg] = val & 0xffffffffffc00000ull;
>           break;
>       case PEC_NEST_STK_INT_BAR:
>           if (phb->nest_regs[PEC_NEST_STK_BAR_EN] & PEC_NEST_STK_BAR_EN_INT) {
> -            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
> +            phb_pec_error(pec, "Changing enabled BAR unsupported");
>           }
>           phb->nest_regs[reg] = val & 0xfffffff000000000ull;
>           break;
diff mbox series

Patch

diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
index 542f9e293221..6232cbeee161 100644
--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -133,13 +133,13 @@  static void pnv_phb4_rc_config_write(PnvPHB4 *phb, unsigned off,
     PCIDevice *pdev;
 
     if (size != 4) {
-        phb_error(phb, "rc_config_write invalid size %d\n", size);
+        phb_error(phb, "rc_config_write invalid size %d", size);
         return;
     }
 
     pdev = pci_find_device(pci->bus, 0, 0);
     if (!pdev) {
-        phb_error(phb, "rc_config_write device not found\n");
+        phb_error(phb, "rc_config_write device not found");
         return;
     }
 
@@ -155,13 +155,13 @@  static uint64_t pnv_phb4_rc_config_read(PnvPHB4 *phb, unsigned off,
     uint64_t val;
 
     if (size != 4) {
-        phb_error(phb, "rc_config_read invalid size %d\n", size);
+        phb_error(phb, "rc_config_read invalid size %d", size);
         return ~0ull;
     }
 
     pdev = pci_find_device(pci->bus, 0, 0);
     if (!pdev) {
-        phb_error(phb, "rc_config_read device not found\n");
+        phb_error(phb, "rc_config_read device not found");
         return ~0ull;
     }
 
@@ -1039,19 +1039,19 @@  static void pnv_pec_stk_nest_xscom_write(void *opaque, hwaddr addr,
         if (phb->nest_regs[PEC_NEST_STK_BAR_EN] &
             (PEC_NEST_STK_BAR_EN_MMIO0 |
              PEC_NEST_STK_BAR_EN_MMIO1)) {
-            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
+            phb_pec_error(pec, "Changing enabled BAR unsupported");
         }
         phb->nest_regs[reg] = val & 0xffffffffff000000ull;
         break;
     case PEC_NEST_STK_PHB_REGS_BAR:
         if (phb->nest_regs[PEC_NEST_STK_BAR_EN] & PEC_NEST_STK_BAR_EN_PHB) {
-            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
+            phb_pec_error(pec, "Changing enabled BAR unsupported");
         }
         phb->nest_regs[reg] = val & 0xffffffffffc00000ull;
         break;
     case PEC_NEST_STK_INT_BAR:
         if (phb->nest_regs[PEC_NEST_STK_BAR_EN] & PEC_NEST_STK_BAR_EN_INT) {
-            phb_pec_error(pec, "Changing enabled BAR unsupported\n");
+            phb_pec_error(pec, "Changing enabled BAR unsupported");
         }
         phb->nest_regs[reg] = val & 0xfffffff000000000ull;
         break;