diff mbox

hw/pci/ppc4xx_pci.c: Remove unused pci4xx_cfgaddr_read/write/ops

Message ID 1410723527-17902-1-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell Sept. 14, 2014, 7:38 p.m. UTC
The MemoryRegionOps struct pci4xx_cfgaddr_ops and the read and
write functions it references are all unused; remove them.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
This is rather applying a blunt instrument to the code -- maybe
the ops should be used for something instead? (cf the comment about
splitting memory regions in ppc4xx_pcihost_initfn()...)

 hw/ppc/ppc4xx_pci.c | 24 ------------------------
 1 file changed, 24 deletions(-)

Comments

Peter Maydell Sept. 30, 2014, 11:31 a.m. UTC | #1
Ping!

thanks
-- PMM

On 14 September 2014 20:38, Peter Maydell <peter.maydell@linaro.org> wrote:
> The MemoryRegionOps struct pci4xx_cfgaddr_ops and the read and
> write functions it references are all unused; remove them.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> This is rather applying a blunt instrument to the code -- maybe
> the ops should be used for something instead? (cf the comment about
> splitting memory regions in ppc4xx_pcihost_initfn()...)
>
>  hw/ppc/ppc4xx_pci.c | 24 ------------------------
>  1 file changed, 24 deletions(-)
>
> diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
> index 55a3cab..0bb3cdb 100644
> --- a/hw/ppc/ppc4xx_pci.c
> +++ b/hw/ppc/ppc4xx_pci.c
> @@ -92,30 +92,6 @@ typedef struct PPC4xxPCIState PPC4xxPCIState;
>
>  #define PCI_ALL_SIZE        (PCI_REG_BASE + PCI_REG_SIZE)
>
> -static uint64_t pci4xx_cfgaddr_read(void *opaque, hwaddr addr,
> -                                    unsigned size)
> -{
> -    PPC4xxPCIState *ppc4xx_pci = opaque;
> -    PCIHostState *phb = PCI_HOST_BRIDGE(ppc4xx_pci);
> -
> -    return phb->config_reg;
> -}
> -
> -static void pci4xx_cfgaddr_write(void *opaque, hwaddr addr,
> -                                  uint64_t value, unsigned size)
> -{
> -    PPC4xxPCIState *ppc4xx_pci = opaque;
> -    PCIHostState *phb = PCI_HOST_BRIDGE(ppc4xx_pci);
> -
> -    phb->config_reg = value & ~0x3;
> -}
> -
> -static const MemoryRegionOps pci4xx_cfgaddr_ops = {
> -    .read = pci4xx_cfgaddr_read,
> -    .write = pci4xx_cfgaddr_write,
> -    .endianness = DEVICE_LITTLE_ENDIAN,
> -};
> -
>  static void ppc4xx_pci_reg_write4(void *opaque, hwaddr offset,
>                                    uint64_t value, unsigned size)
>  {
> --
> 2.0.0
Alexander Graf Oct. 1, 2014, 2:54 p.m. UTC | #2
On 14.09.14 21:38, Peter Maydell wrote:
> The MemoryRegionOps struct pci4xx_cfgaddr_ops and the read and
> write functions it references are all unused; remove them.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Thanks, applied to ppc-next.


Alex
diff mbox

Patch

diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
index 55a3cab..0bb3cdb 100644
--- a/hw/ppc/ppc4xx_pci.c
+++ b/hw/ppc/ppc4xx_pci.c
@@ -92,30 +92,6 @@  typedef struct PPC4xxPCIState PPC4xxPCIState;
 
 #define PCI_ALL_SIZE        (PCI_REG_BASE + PCI_REG_SIZE)
 
-static uint64_t pci4xx_cfgaddr_read(void *opaque, hwaddr addr,
-                                    unsigned size)
-{
-    PPC4xxPCIState *ppc4xx_pci = opaque;
-    PCIHostState *phb = PCI_HOST_BRIDGE(ppc4xx_pci);
-
-    return phb->config_reg;
-}
-
-static void pci4xx_cfgaddr_write(void *opaque, hwaddr addr,
-                                  uint64_t value, unsigned size)
-{
-    PPC4xxPCIState *ppc4xx_pci = opaque;
-    PCIHostState *phb = PCI_HOST_BRIDGE(ppc4xx_pci);
-
-    phb->config_reg = value & ~0x3;
-}
-
-static const MemoryRegionOps pci4xx_cfgaddr_ops = {
-    .read = pci4xx_cfgaddr_read,
-    .write = pci4xx_cfgaddr_write,
-    .endianness = DEVICE_LITTLE_ENDIAN,
-};
-
 static void ppc4xx_pci_reg_write4(void *opaque, hwaddr offset,
                                   uint64_t value, unsigned size)
 {