Commit d60efc6b authored by Blue Swirl's avatar Blue Swirl

Make CPURead/WriteFunc structure 'const'

Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent fa31af0e
......@@ -36,8 +36,8 @@ void *qemu_get_ram_ptr(ram_addr_t addr);
/* This should not be used by devices. */
ram_addr_t qemu_ram_addr_from_host(void *ptr);
int cpu_register_io_memory(CPUReadMemoryFunc **mem_read,
CPUWriteMemoryFunc **mem_write,
int cpu_register_io_memory(CPUReadMemoryFunc * const *mem_read,
CPUWriteMemoryFunc * const *mem_write,
void *opaque);
void cpu_unregister_io_memory(int table_address);
......
......@@ -205,8 +205,8 @@ static int tb_phys_invalidate_count;
#define SUBPAGE_IDX(addr) ((addr) & ~TARGET_PAGE_MASK)
typedef struct subpage_t {
target_phys_addr_t base;
CPUReadMemoryFunc **mem_read[TARGET_PAGE_SIZE][4];
CPUWriteMemoryFunc **mem_write[TARGET_PAGE_SIZE][4];
CPUReadMemoryFunc * const *mem_read[TARGET_PAGE_SIZE][4];
CPUWriteMemoryFunc * const *mem_write[TARGET_PAGE_SIZE][4];
void *opaque[TARGET_PAGE_SIZE][2][4];
ram_addr_t region_offset[TARGET_PAGE_SIZE][2][4];
} subpage_t;
......@@ -2550,13 +2550,13 @@ static void unassigned_mem_writel(void *opaque, target_phys_addr_t addr, uint32_
#endif
}
static CPUReadMemoryFunc *unassigned_mem_read[3] = {
static CPUReadMemoryFunc * const unassigned_mem_read[3] = {
unassigned_mem_readb,
unassigned_mem_readw,
unassigned_mem_readl,
};
static CPUWriteMemoryFunc *unassigned_mem_write[3] = {
static CPUWriteMemoryFunc * const unassigned_mem_write[3] = {
unassigned_mem_writeb,
unassigned_mem_writew,
unassigned_mem_writel,
......@@ -2622,13 +2622,13 @@ static void notdirty_mem_writel(void *opaque, target_phys_addr_t ram_addr,
tlb_set_dirty(cpu_single_env, cpu_single_env->mem_io_vaddr);
}
static CPUReadMemoryFunc *error_mem_read[3] = {
static CPUReadMemoryFunc * const error_mem_read[3] = {
NULL, /* never used */
NULL, /* never used */
NULL, /* never used */
};
static CPUWriteMemoryFunc *notdirty_mem_write[3] = {
static CPUWriteMemoryFunc * const notdirty_mem_write[3] = {
notdirty_mem_writeb,
notdirty_mem_writew,
notdirty_mem_writel,
......@@ -2721,13 +2721,13 @@ static void watch_mem_writel(void *opaque, target_phys_addr_t addr,
stl_phys(addr, val);
}
static CPUReadMemoryFunc *watch_mem_read[3] = {
static CPUReadMemoryFunc * const watch_mem_read[3] = {
watch_mem_readb,
watch_mem_readw,
watch_mem_readl,
};
static CPUWriteMemoryFunc *watch_mem_write[3] = {
static CPUWriteMemoryFunc * const watch_mem_write[3] = {
watch_mem_writeb,
watch_mem_writew,
watch_mem_writel,
......@@ -2819,13 +2819,13 @@ static void subpage_writel (void *opaque,
subpage_writelen(opaque, addr, value, 2);
}
static CPUReadMemoryFunc *subpage_read[] = {
static CPUReadMemoryFunc * const subpage_read[] = {
&subpage_readb,
&subpage_readw,
&subpage_readl,
};
static CPUWriteMemoryFunc *subpage_write[] = {
static CPUWriteMemoryFunc * const subpage_write[] = {
&subpage_writeb,
&subpage_writew,
&subpage_writel,
......@@ -2906,8 +2906,8 @@ static int get_free_io_mem_idx(void)
value can be used with cpu_register_physical_memory(). (-1) is
returned if error. */
static int cpu_register_io_memory_fixed(int io_index,
CPUReadMemoryFunc **mem_read,
CPUWriteMemoryFunc **mem_write,
CPUReadMemoryFunc * const *mem_read,
CPUWriteMemoryFunc * const *mem_write,
void *opaque)
{
int i, subwidth = 0;
......@@ -2932,8 +2932,8 @@ static int cpu_register_io_memory_fixed(int io_index,
return (io_index << IO_MEM_SHIFT) | subwidth;
}
int cpu_register_io_memory(CPUReadMemoryFunc **mem_read,
CPUWriteMemoryFunc **mem_write,
int cpu_register_io_memory(CPUReadMemoryFunc * const *mem_read,
CPUWriteMemoryFunc * const *mem_write,
void *opaque)
{
return cpu_register_io_memory_fixed(0, mem_read, mem_write, opaque);
......
......@@ -75,13 +75,13 @@ static uint32_t pci_apb_config_readl (void *opaque,
return val;
}
static CPUWriteMemoryFunc *pci_apb_config_write[] = {
static CPUWriteMemoryFunc * const pci_apb_config_write[] = {
&pci_apb_config_writel,
&pci_apb_config_writel,
&pci_apb_config_writel,
};
static CPUReadMemoryFunc *pci_apb_config_read[] = {
static CPUReadMemoryFunc * const pci_apb_config_read[] = {
&pci_apb_config_readl,
&pci_apb_config_readl,
&pci_apb_config_readl,
......@@ -124,25 +124,25 @@ static uint32_t apb_config_readl (void *opaque,
return val;
}
static CPUWriteMemoryFunc *apb_config_write[] = {
static CPUWriteMemoryFunc * const apb_config_write[] = {
&apb_config_writel,
&apb_config_writel,
&apb_config_writel,
};
static CPUReadMemoryFunc *apb_config_read[] = {
static CPUReadMemoryFunc * const apb_config_read[] = {
&apb_config_readl,
&apb_config_readl,
&apb_config_readl,
};
static CPUWriteMemoryFunc *pci_apb_write[] = {
static CPUWriteMemoryFunc * const pci_apb_write[] = {
&pci_host_data_writeb,
&pci_host_data_writew,
&pci_host_data_writel,
};
static CPUReadMemoryFunc *pci_apb_read[] = {
static CPUReadMemoryFunc * const pci_apb_read[] = {
&pci_host_data_readb,
&pci_host_data_readw,
&pci_host_data_readl,
......@@ -190,13 +190,13 @@ static uint32_t pci_apb_ioreadl (void *opaque, target_phys_addr_t addr)
return val;
}
static CPUWriteMemoryFunc *pci_apb_iowrite[] = {
static CPUWriteMemoryFunc * const pci_apb_iowrite[] = {
&pci_apb_iowriteb,
&pci_apb_iowritew,
&pci_apb_iowritel,
};
static CPUReadMemoryFunc *pci_apb_ioread[] = {
static CPUReadMemoryFunc * const pci_apb_ioread[] = {
&pci_apb_ioreadb,
&pci_apb_ioreadw,
&pci_apb_ioreadl,
......
......@@ -957,13 +957,13 @@ static void apic_reset(void *opaque)
cpu_synchronize_state(s->cpu_env, 1);
}
static CPUReadMemoryFunc *apic_mem_read[3] = {
static CPUReadMemoryFunc * const apic_mem_read[3] = {
apic_mem_readb,
apic_mem_readw,
apic_mem_readl,
};
static CPUWriteMemoryFunc *apic_mem_write[3] = {
static CPUWriteMemoryFunc * const apic_mem_write[3] = {
apic_mem_writeb,
apic_mem_writew,
apic_mem_writel,
......
......@@ -558,13 +558,13 @@ static void gic_dist_writel(void *opaque, target_phys_addr_t offset,
gic_dist_writew(opaque, offset + 2, value >> 16);
}
static CPUReadMemoryFunc *gic_dist_readfn[] = {
static CPUReadMemoryFunc * const gic_dist_readfn[] = {
gic_dist_readb,
gic_dist_readw,
gic_dist_readl
};
static CPUWriteMemoryFunc *gic_dist_writefn[] = {
static CPUWriteMemoryFunc * const gic_dist_writefn[] = {
gic_dist_writeb,
gic_dist_writew,
gic_dist_writel
......
......@@ -177,13 +177,13 @@ static void arm_sysctl_write(void *opaque, target_phys_addr_t offset,
}
}
static CPUReadMemoryFunc *arm_sysctl_readfn[] = {
static CPUReadMemoryFunc * const arm_sysctl_readfn[] = {
arm_sysctl_read,
arm_sysctl_read,
arm_sysctl_read
};
static CPUWriteMemoryFunc *arm_sysctl_writefn[] = {
static CPUWriteMemoryFunc * const arm_sysctl_writefn[] = {
arm_sysctl_write,
arm_sysctl_write,
arm_sysctl_write
......
......@@ -223,13 +223,13 @@ static void sp804_write(void *opaque, target_phys_addr_t offset,
}
}
static CPUReadMemoryFunc *sp804_readfn[] = {
static CPUReadMemoryFunc * const sp804_readfn[] = {
sp804_read,
sp804_read,
sp804_read
};
static CPUWriteMemoryFunc *sp804_writefn[] = {
static CPUWriteMemoryFunc * const sp804_writefn[] = {
sp804_write,
sp804_write,
sp804_write
......@@ -311,13 +311,13 @@ static void icp_pit_write(void *opaque, target_phys_addr_t offset,
}
static CPUReadMemoryFunc *icp_pit_readfn[] = {
static CPUReadMemoryFunc * const icp_pit_readfn[] = {
icp_pit_read,
icp_pit_read,
icp_pit_read
};
static CPUWriteMemoryFunc *icp_pit_writefn[] = {
static CPUWriteMemoryFunc * const icp_pit_writefn[] = {
icp_pit_write,
icp_pit_write,
icp_pit_write
......
......@@ -105,13 +105,13 @@ static void bitband_writel(void *opaque, target_phys_addr_t offset,
cpu_physical_memory_write(addr, (uint8_t *)&v, 4);
}
static CPUReadMemoryFunc *bitband_readfn[] = {
static CPUReadMemoryFunc * const bitband_readfn[] = {
bitband_readb,
bitband_readw,
bitband_readl
};
static CPUWriteMemoryFunc *bitband_writefn[] = {
static CPUWriteMemoryFunc * const bitband_writefn[] = {
bitband_writeb,
bitband_writew,
bitband_writel
......
......@@ -69,13 +69,13 @@ nand_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
s->rdy = rdy;
}
static CPUReadMemoryFunc *nand_read[] = {
static CPUReadMemoryFunc * const nand_read[] = {
&nand_readl,
&nand_readl,
&nand_readl,
};
static CPUWriteMemoryFunc *nand_write[] = {
static CPUWriteMemoryFunc * const nand_write[] = {
&nand_writel,
&nand_writel,
&nand_writel,
......@@ -226,12 +226,12 @@ static void gpio_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
}
}
static CPUReadMemoryFunc *gpio_read[] = {
static CPUReadMemoryFunc * const gpio_read[] = {
NULL, NULL,
&gpio_readl,
};
static CPUWriteMemoryFunc *gpio_write[] = {
static CPUWriteMemoryFunc * const gpio_write[] = {
NULL, NULL,
&gpio_writel,
};
......
......@@ -2156,13 +2156,13 @@ static void cirrus_vga_mem_writel(void *opaque, target_phys_addr_t addr, uint32_
#endif
}
static CPUReadMemoryFunc *cirrus_vga_mem_read[3] = {
static CPUReadMemoryFunc * const cirrus_vga_mem_read[3] = {
cirrus_vga_mem_readb,
cirrus_vga_mem_readw,
cirrus_vga_mem_readl,
};
static CPUWriteMemoryFunc *cirrus_vga_mem_write[3] = {
static CPUWriteMemoryFunc * const cirrus_vga_mem_write[3] = {
cirrus_vga_mem_writeb,
cirrus_vga_mem_writew,
cirrus_vga_mem_writel,
......@@ -2472,13 +2472,13 @@ static void cirrus_linear_writel(void *opaque, target_phys_addr_t addr,
}
static CPUReadMemoryFunc *cirrus_linear_read[3] = {
static CPUReadMemoryFunc * const cirrus_linear_read[3] = {
cirrus_linear_readb,
cirrus_linear_readw,
cirrus_linear_readl,
};
static CPUWriteMemoryFunc *cirrus_linear_write[3] = {
static CPUWriteMemoryFunc * const cirrus_linear_write[3] = {
cirrus_linear_writeb,
cirrus_linear_writew,
cirrus_linear_writel,
......@@ -2573,13 +2573,13 @@ static void cirrus_linear_bitblt_writel(void *opaque, target_phys_addr_t addr,
}
static CPUReadMemoryFunc *cirrus_linear_bitblt_read[3] = {
static CPUReadMemoryFunc * const cirrus_linear_bitblt_read[3] = {
cirrus_linear_bitblt_readb,
cirrus_linear_bitblt_readw,
cirrus_linear_bitblt_readl,
};
static CPUWriteMemoryFunc *cirrus_linear_bitblt_write[3] = {
static CPUWriteMemoryFunc * const cirrus_linear_bitblt_write[3] = {
cirrus_linear_bitblt_writeb,
cirrus_linear_bitblt_writew,
cirrus_linear_bitblt_writel,
......@@ -3003,13 +3003,13 @@ static void cirrus_mmio_writel(void *opaque, target_phys_addr_t addr,
}
static CPUReadMemoryFunc *cirrus_mmio_read[3] = {
static CPUReadMemoryFunc * const cirrus_mmio_read[3] = {
cirrus_mmio_readb,
cirrus_mmio_readw,
cirrus_mmio_readl,
};
static CPUWriteMemoryFunc *cirrus_mmio_write[3] = {
static CPUWriteMemoryFunc * const cirrus_mmio_write[3] = {
cirrus_mmio_writeb,
cirrus_mmio_writew,
cirrus_mmio_writel,
......
......@@ -129,13 +129,13 @@ static void cs_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
}
}
static CPUReadMemoryFunc *cs_mem_read[3] = {
static CPUReadMemoryFunc * const cs_mem_read[3] = {
cs_mem_readl,
cs_mem_readl,
cs_mem_readl,
};
static CPUWriteMemoryFunc *cs_mem_write[3] = {
static CPUWriteMemoryFunc * const cs_mem_write[3] = {
cs_mem_writel,
cs_mem_writel,
cs_mem_writel,
......
......@@ -630,13 +630,13 @@ static uint32_t cuda_readl (void *opaque, target_phys_addr_t addr)
return 0;
}
static CPUWriteMemoryFunc *cuda_write[] = {
static CPUWriteMemoryFunc * const cuda_write[] = {
&cuda_writeb,
&cuda_writew,
&cuda_writel,
};
static CPUReadMemoryFunc *cuda_read[] = {
static CPUReadMemoryFunc * const cuda_read[] = {
&cuda_readb,
&cuda_readw,
&cuda_readl,
......
......@@ -663,13 +663,13 @@ static void dp8393x_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
dp8393x_writew(opaque, addr + 2, (val >> 16) & 0xffff);
}
static CPUReadMemoryFunc *dp8393x_read[3] = {
static CPUReadMemoryFunc * const dp8393x_read[3] = {
dp8393x_readb,
dp8393x_readw,
dp8393x_readl,
};
static CPUWriteMemoryFunc *dp8393x_write[3] = {
static CPUWriteMemoryFunc * const dp8393x_write[3] = {
dp8393x_writeb,
dp8393x_writew,
dp8393x_writel,
......
......@@ -126,19 +126,19 @@ static void nvram_writel_protected (void *opaque, target_phys_addr_t addr, uint3
nvram_writeb_protected(opaque, addr + 3, (val >> 24) & 0xff);
}
static CPUReadMemoryFunc *nvram_read[] = {
static CPUReadMemoryFunc * const nvram_read[] = {
&nvram_readb,
&nvram_readw,
&nvram_readl,
};
static CPUWriteMemoryFunc *nvram_write[] = {
static CPUWriteMemoryFunc * const nvram_write[] = {
&nvram_writeb,
&nvram_writew,
&nvram_writel,
};
static CPUWriteMemoryFunc *nvram_write_protected[] = {
static CPUWriteMemoryFunc * const nvram_write_protected[] = {
&nvram_writeb_protected,
&nvram_writew_protected,
&nvram_writel_protected,
......
......@@ -1020,11 +1020,11 @@ static const uint32_t mac_reg_init[] = {
/* PCI interface */
static CPUWriteMemoryFunc *e1000_mmio_write[] = {
static CPUWriteMemoryFunc * const e1000_mmio_write[] = {
e1000_mmio_writeb, e1000_mmio_writew, e1000_mmio_writel
};
static CPUReadMemoryFunc *e1000_mmio_read[] = {
static CPUReadMemoryFunc * const e1000_mmio_read[] = {
e1000_mmio_readb, e1000_mmio_readw, e1000_mmio_readl
};
......
......@@ -221,13 +221,13 @@ static uint32_t ecc_mem_readl(void *opaque, target_phys_addr_t addr)
return ret;
}
static CPUReadMemoryFunc *ecc_mem_read[3] = {
static CPUReadMemoryFunc * const ecc_mem_read[3] = {
NULL,
NULL,
ecc_mem_readl,
};
static CPUWriteMemoryFunc *ecc_mem_write[3] = {
static CPUWriteMemoryFunc * const ecc_mem_write[3] = {
NULL,
NULL,
ecc_mem_writel,
......@@ -251,13 +251,13 @@ static uint32_t ecc_diag_mem_readb(void *opaque, target_phys_addr_t addr)
return ret;
}
static CPUReadMemoryFunc *ecc_diag_mem_read[3] = {
static CPUReadMemoryFunc * const ecc_diag_mem_read[3] = {
ecc_diag_mem_readb,
NULL,
NULL,
};
static CPUWriteMemoryFunc *ecc_diag_mem_write[3] = {
static CPUWriteMemoryFunc * const ecc_diag_mem_write[3] = {
ecc_diag_mem_writeb,
NULL,
NULL,
......
......@@ -1405,13 +1405,13 @@ static uint32_t pci_mmio_readl(void *opaque, target_phys_addr_t addr)
return eepro100_read4(s, addr);
}
static CPUWriteMemoryFunc *pci_mmio_write[] = {
static CPUWriteMemoryFunc * const pci_mmio_write[] = {
pci_mmio_writeb,
pci_mmio_writew,
pci_mmio_writel
};
static CPUReadMemoryFunc *pci_mmio_read[] = {
static CPUReadMemoryFunc * const pci_mmio_read[] = {
pci_mmio_readb,
pci_mmio_readw,
pci_mmio_readl
......
......@@ -654,13 +654,13 @@ static void serial_event(void *opaque, int event)
serial_receive_break(s);
}
static CPUReadMemoryFunc *escc_mem_read[3] = {
static CPUReadMemoryFunc * const escc_mem_read[3] = {
escc_mem_readb,
NULL,
NULL,
};
static CPUWriteMemoryFunc *escc_mem_write[3] = {
static CPUWriteMemoryFunc * const escc_mem_write[3] = {
escc_mem_writeb,
NULL,
NULL,
......
......@@ -579,13 +579,13 @@ static void esp_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
s->wregs[saddr] = val;
}
static CPUReadMemoryFunc *esp_mem_read[3] = {
static CPUReadMemoryFunc * const esp_mem_read[3] = {
esp_mem_readb,
NULL,
NULL,
};
static CPUWriteMemoryFunc *esp_mem_write[3] = {
static CPUWriteMemoryFunc * const esp_mem_write[3] = {
esp_mem_writeb,
NULL,
esp_mem_writeb,
......
......@@ -668,13 +668,13 @@ dma_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
}
}
static CPUReadMemoryFunc *dma_read[] = {
static CPUReadMemoryFunc * const dma_read[] = {
&dma_rinvalid,
&dma_rinvalid,
&dma_readl,
};
static CPUWriteMemoryFunc *dma_write[] = {
static CPUWriteMemoryFunc * const dma_write[] = {
&dma_winvalid,
&dma_winvalid,
&dma_writel,
......
......@@ -544,12 +544,12 @@ static void eth_set_link(VLANClientState *vc)
eth->phy.link = !vc->link_down;
}
static CPUReadMemoryFunc *eth_read[] = {
static CPUReadMemoryFunc * const eth_read[] = {
NULL, NULL,
&eth_readl,
};
static CPUWriteMemoryFunc *eth_write[] = {
static CPUWriteMemoryFunc * const eth_write[] = {
NULL, NULL,
&eth_writel,
};
......
......@@ -99,12 +99,12 @@ pic_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
}
}
static CPUReadMemoryFunc *pic_read[] = {
static CPUReadMemoryFunc * const pic_read[] = {
NULL, NULL,
&pic_readl,
};
static CPUWriteMemoryFunc *pic_write[] = {
static CPUWriteMemoryFunc * const pic_write[] = {
NULL, NULL,
&pic_writel,
};
......
......@@ -122,12 +122,12 @@ ser_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
ser_update_irq(s);
}
static CPUReadMemoryFunc *ser_read[] = {
static CPUReadMemoryFunc * const ser_read[] = {
NULL, NULL,
&ser_readl,
};
static CPUWriteMemoryFunc *ser_write[] = {
static CPUWriteMemoryFunc * const ser_write[] = {
NULL, NULL,
&ser_writel,
};
......
......@@ -285,12 +285,12 @@ timer_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
}
}
static CPUReadMemoryFunc *timer_read[] = {
static CPUReadMemoryFunc * const timer_read[] = {
NULL, NULL,
&timer_readl,
};
static CPUWriteMemoryFunc *timer_write[] = {
static CPUWriteMemoryFunc * const timer_write[] = {
NULL, NULL,
&timer_writel,
};
......
......@@ -603,25 +603,25 @@ static void fdctrl_write_mem (void *opaque,
fdctrl_write(opaque, (uint32_t)reg, value);
}
static CPUReadMemoryFunc *fdctrl_mem_read[3] = {
static CPUReadMemoryFunc * const fdctrl_mem_read[3] = {
fdctrl_read_mem,
fdctrl_read_mem,
fdctrl_read_mem,
};
static CPUWriteMemoryFunc *fdctrl_mem_write[3] = {
static CPUWriteMemoryFunc * const fdctrl_mem_write[3] = {
fdctrl_write_mem,
fdctrl_write_mem,
fdctrl_write_mem,
};
static CPUReadMemoryFunc *fdctrl_mem_read_strict[3] = {
static CPUReadMemoryFunc * const fdctrl_mem_read_strict[3] = {
fdctrl_read_mem,
NULL,
NULL,
};
static CPUWriteMemoryFunc *fdctrl_mem_write_strict[3] = {
static CPUWriteMemoryFunc * const fdctrl_mem_write_strict[3] = {
fdctrl_write_mem,
NULL,
NULL,
......
......@@ -133,25 +133,25 @@ static void fw_cfg_mem_writew(void *opaque, target_phys_addr_t addr,
fw_cfg_select(opaque, (uint16_t)value);
}
static CPUReadMemoryFunc *fw_cfg_ctl_mem_read[3] = {
static CPUReadMemoryFunc * const fw_cfg_ctl_mem_read[3] = {
NULL,
NULL,
NULL,
};
static CPUWriteMemoryFunc *fw_cfg_ctl_mem_write[3] = {
static CPUWriteMemoryFunc * const fw_cfg_ctl_mem_write[3] = {
NULL,
fw_cfg_mem_writew,
NULL,
};
static CPUReadMemoryFunc *fw_cfg_data_mem_read[3] = {
static CPUReadMemoryFunc * const fw_cfg_data_mem_read[3] = {
fw_cfg_mem_readb,
NULL,
NULL,
};
static CPUWriteMemoryFunc *fw_cfg_data_mem_write[3] = {
static CPUWriteMemoryFunc * const fw_cfg_data_mem_write[3] = {
fw_cfg_mem_writeb,
NULL,
NULL,
......
......@@ -522,13 +522,13 @@ static void g364fb_ctrl_writeb(void *opaque, target_phys_addr_t addr, uint32_t v
g364fb_ctrl_writel(opaque, addr & ~0x3, val);
}
static CPUReadMemoryFunc *g364fb_ctrl_read[3] = {
static CPUReadMemoryFunc * const g364fb_ctrl_read[3] = {
g364fb_ctrl_readb,
g364fb_ctrl_readw,
g364fb_ctrl_readl,
};
static CPUWriteMemoryFunc *g364fb_ctrl_write[3] = {
static CPUWriteMemoryFunc * const g364fb_ctrl_write[3] = {
g364fb_ctrl_writeb,
g364fb_ctrl_writew,
g364fb_ctrl_writel,
......
......@@ -72,25 +72,25 @@ static uint32_t pci_grackle_config_readl (void *opaque, target_phys_addr_t addr)
return val;
}
static CPUWriteMemoryFunc *pci_grackle_config_write[] = {
static CPUWriteMemoryFunc * const pci_grackle_config_write[] = {
&pci_grackle_config_writel,