qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()


From: Cornelia Huck
Subject: Re: [Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()
Date: Tue, 18 Apr 2017 12:42:15 +0200

On Mon, 17 Apr 2017 18:59:14 -0300
Eduardo Habkost <address@hidden> wrote:

> Every single caller of of pci_register_bus() saves the return value in
> phb->bus. Do that inside pci_register_bus() to avoid code duplication
> and make it harder to break.
> 
> Most (but not all) conversions done using the following Coccinelle script:
> 
>   @@
>   identifier b;
>   expression phb;
>   @@
>   -b = pci_register_bus(phb, ARGS);
>   +phb->bus = pci_register_bus(phb, ARGS);
>    ...
>   -phb->bus = b;
> 
>   @@
>   expression phb;
>   expression list ARGS;
>   @@
>   -phb->bus = pci_register_bus(phb, ARGS);
>   +pci_register_bus(phb, ARGS);
> 
> Cc: Richard Henderson <address@hidden>
> Cc: Aurelien Jarno <address@hidden>
> Cc: Yongbok Kim <address@hidden>
> Cc: Alexander Graf <address@hidden>
> Cc: Scott Wood <address@hidden>
> Cc: Paul Burton <address@hidden>
> Cc: "Michael S. Tsirkin" <address@hidden>
> Cc: Marcel Apfelbaum <address@hidden>
> Cc: David Gibson <address@hidden>
> Cc: Cornelia Huck <address@hidden>
> Cc: Christian Borntraeger <address@hidden>
> Cc: address@hidden
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
>  include/hw/pci/pci.h      | 12 ++++++------
>  hw/alpha/typhoon.c        | 10 +++++-----
>  hw/mips/gt64xxx_pci.c     |  9 +++------
>  hw/pci-host/apb.c         |  7 ++-----
>  hw/pci-host/bonito.c      |  7 +++----
>  hw/pci-host/gpex.c        |  5 ++---
>  hw/pci-host/grackle.c     |  9 ++-------
>  hw/pci-host/ppce500.c     |  8 ++++----
>  hw/pci-host/uninorth.c    | 18 ++++++------------
>  hw/pci-host/xilinx-pcie.c |  6 +++---
>  hw/pci/pci.c              | 14 +++++++-------
>  hw/ppc/ppc4xx_pci.c       |  8 ++++----
>  hw/ppc/spapr_pci.c        | 10 +++++-----
>  hw/s390x/s390-pci-bus.c   | 10 +++++-----
>  hw/sh4/sh_pci.c           |  9 +++------
>  15 files changed, 60 insertions(+), 82 deletions(-)

s390 parts:

Acked-by: Cornelia Huck <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]