From 08eaffd830fffcf003ed7b229fff7ed0f7e86205 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 9 May 2013 20:13:43 +0000 Subject: [PATCH] MFp4 CH=227440: Convert the structures to C99 style initialisation, which makes it a lot easier to check that all of them are set and to generate a derived template from them. Sponsored by: DARPA, AFRL MFC after: 2 weeks --- sys/mips/mips/bus_space_fdt.c | 134 +++++++++++++++--------------- sys/mips/mips/bus_space_generic.c | 134 +++++++++++++++--------------- 2 files changed, 134 insertions(+), 134 deletions(-) diff --git a/sys/mips/mips/bus_space_fdt.c b/sys/mips/mips/bus_space_fdt.c index 38efea1f2b67..ec960cd3fe8e 100644 --- a/sys/mips/mips/bus_space_fdt.c +++ b/sys/mips/mips/bus_space_fdt.c @@ -94,109 +94,109 @@ static int fdt_bs_map(void *, bus_addr_t, bus_size_t, int, static struct bus_space fdt_space = { /* cookie */ - (void *) 0, + .bs_cookie = (void *) 0, /* mapping/unmapping */ - fdt_bs_map, - generic_bs_unmap, - generic_bs_subregion, + .bs_map = fdt_bs_map, + .bs_unmap = generic_bs_unmap, + .bs_subregion = generic_bs_subregion, /* allocation/deallocation */ - generic_bs_alloc, - generic_bs_free, + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, /* barrier */ - generic_bs_barrier, + .bs_barrier = generic_bs_barrier, /* read (single) */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - generic_bs_r_8, + .bs_r_1 = generic_bs_r_1, + .bs_r_2 = generic_bs_r_2, + .bs_r_4 = generic_bs_r_4, + .bs_r_8 = generic_bs_r_8, /* read multiple */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - generic_bs_rm_8, + .bs_rm_1 = generic_bs_rm_1, + .bs_rm_2 = generic_bs_rm_2, + .bs_rm_4 = generic_bs_rm_4, + .bs_rm_8 = generic_bs_rm_8, /* read region */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - generic_bs_rr_8, + .bs_rr_1 = generic_bs_rr_1, + .bs_rr_2 = generic_bs_rr_2, + .bs_rr_4 = generic_bs_rr_4, + .bs_rr_8 = generic_bs_rr_8, /* write (single) */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - generic_bs_w_8, + .bs_w_1 = generic_bs_w_1, + .bs_w_2 = generic_bs_w_2, + .bs_w_4 = generic_bs_w_4, + .bs_w_8 = generic_bs_w_8, /* write multiple */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - generic_bs_wm_8, + .bs_wm_1 = generic_bs_wm_1, + .bs_wm_2 = generic_bs_wm_2, + .bs_wm_4 = generic_bs_wm_4, + .bs_wm_8 = generic_bs_wm_8, /* write region */ - generic_bs_wr_1, - generic_bs_wr_2, - generic_bs_wr_4, - generic_bs_wr_8, + .bs_wr_1 = generic_bs_wr_1, + .bs_wr_2 = generic_bs_wr_2, + .bs_wr_4 = generic_bs_wr_4, + .bs_wr_8 = generic_bs_wr_8, /* set multiple */ - generic_bs_sm_1, - generic_bs_sm_2, - generic_bs_sm_4, - generic_bs_sm_8, + .bs_sm_1 = generic_bs_sm_1, + .bs_sm_2 = generic_bs_sm_2, + .bs_sm_4 = generic_bs_sm_4, + .bs_sm_8 = generic_bs_sm_8, /* set region */ - generic_bs_sr_1, - generic_bs_sr_2, - generic_bs_sr_4, - generic_bs_sr_8, + .bs_sr_1 = generic_bs_sr_1, + .bs_sr_2 = generic_bs_sr_2, + .bs_sr_4 = generic_bs_sr_4, + .bs_sr_8 = generic_bs_sr_8, /* copy */ - generic_bs_c_1, - generic_bs_c_2, - generic_bs_c_4, - generic_bs_c_8, + .bs_c_1 = generic_bs_c_1, + .bs_c_2 = generic_bs_c_2, + .bs_c_4 = generic_bs_c_4, + .bs_c_8 = generic_bs_c_8, /* read (single) stream */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - generic_bs_r_8, + .bs_r_1_s = generic_bs_r_1, + .bs_r_2_s = generic_bs_r_2, + .bs_r_4_s = generic_bs_r_4, + .bs_r_8_s = generic_bs_r_8, /* read multiple stream */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - generic_bs_rm_8, + .bs_rm_1_s = generic_bs_rm_1, + .bs_rm_2_s = generic_bs_rm_2, + .bs_rm_4_s = generic_bs_rm_4, + .bs_rm_8_s = generic_bs_rm_8, /* read region stream */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - generic_bs_rr_8, + .bs_rr_1_s = generic_bs_rr_1, + .bs_rr_2_s = generic_bs_rr_2, + .bs_rr_4_s = generic_bs_rr_4, + .bs_rr_8_s = generic_bs_rr_8, /* write (single) stream */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - generic_bs_w_8, + .bs_w_1_s = generic_bs_w_1, + .bs_w_2_s = generic_bs_w_2, + .bs_w_4_s = generic_bs_w_4, + .bs_w_8_s = generic_bs_w_8, /* write multiple stream */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - generic_bs_wm_8, + .bs_wm_1_s = generic_bs_wm_1, + .bs_wm_2_s = generic_bs_wm_2, + .bs_wm_4_s = generic_bs_wm_4, + .bs_wm_8_s = generic_bs_wm_8, /* write region stream */ - generic_bs_wr_1, - generic_bs_wr_2, - generic_bs_wr_4, - generic_bs_wr_8, + .bs_wr_1_s = generic_bs_wr_1, + .bs_wr_2_s = generic_bs_wr_2, + .bs_wr_4_s = generic_bs_wr_4, + .bs_wr_8_s = generic_bs_wr_8, }; /* generic bus_space tag */ diff --git a/sys/mips/mips/bus_space_generic.c b/sys/mips/mips/bus_space_generic.c index 53a2d0175280..f7169b44c25c 100644 --- a/sys/mips/mips/bus_space_generic.c +++ b/sys/mips/mips/bus_space_generic.c @@ -91,109 +91,109 @@ __FBSDID("$FreeBSD$"); static struct bus_space generic_space = { /* cookie */ - (void *) 0, + .bs_cookie = (void *) 0, /* mapping/unmapping */ - generic_bs_map, - generic_bs_unmap, - generic_bs_subregion, + .bs_map = generic_bs_map, + .bs_unmap = generic_bs_unmap, + .bs_subregion = generic_bs_subregion, /* allocation/deallocation */ - generic_bs_alloc, - generic_bs_free, + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, /* barrier */ - generic_bs_barrier, + .bs_barrier = generic_bs_barrier, /* read (single) */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - generic_bs_r_8, + .bs_r_1 = generic_bs_r_1, + .bs_r_2 = generic_bs_r_2, + .bs_r_4 = generic_bs_r_4, + .bs_r_8 = generic_bs_r_8, /* read multiple */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - generic_bs_rm_8, + .bs_rm_1 = generic_bs_rm_1, + .bs_rm_2 = generic_bs_rm_2, + .bs_rm_4 = generic_bs_rm_4, + .bs_rm_8 = generic_bs_rm_8, /* read region */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - generic_bs_rr_8, + .bs_rr_1 = generic_bs_rr_1, + .bs_rr_2 = generic_bs_rr_2, + .bs_rr_4 = generic_bs_rr_4, + .bs_rr_8 = generic_bs_rr_8, /* write (single) */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - generic_bs_w_8, + .bs_w_1 = generic_bs_w_1, + .bs_w_2 = generic_bs_w_2, + .bs_w_4 = generic_bs_w_4, + .bs_w_8 = generic_bs_w_8, /* write multiple */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - generic_bs_wm_8, + .bs_wm_1 = generic_bs_wm_1, + .bs_wm_2 = generic_bs_wm_2, + .bs_wm_4 = generic_bs_wm_4, + .bs_wm_8 = generic_bs_wm_8, /* write region */ - generic_bs_wr_1, - generic_bs_wr_2, - generic_bs_wr_4, - generic_bs_wr_8, + .bs_wr_1 = generic_bs_wr_1, + .bs_wr_2 = generic_bs_wr_2, + .bs_wr_4 = generic_bs_wr_4, + .bs_wr_8 = generic_bs_wr_8, /* set multiple */ - generic_bs_sm_1, - generic_bs_sm_2, - generic_bs_sm_4, - generic_bs_sm_8, + .bs_sm_1 = generic_bs_sm_1, + .bs_sm_2 = generic_bs_sm_2, + .bs_sm_4 = generic_bs_sm_4, + .bs_sm_8 = generic_bs_sm_8, /* set region */ - generic_bs_sr_1, - generic_bs_sr_2, - generic_bs_sr_4, - generic_bs_sr_8, + .bs_sr_1 = generic_bs_sr_1, + .bs_sr_2 = generic_bs_sr_2, + .bs_sr_4 = generic_bs_sr_4, + .bs_sr_8 = generic_bs_sr_8, /* copy */ - generic_bs_c_1, - generic_bs_c_2, - generic_bs_c_4, - generic_bs_c_8, + .bs_c_1 = generic_bs_c_1, + .bs_c_2 = generic_bs_c_2, + .bs_c_4 = generic_bs_c_4, + .bs_c_8 = generic_bs_c_8, /* read (single) stream */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - generic_bs_r_8, + .bs_r_1_s = generic_bs_r_1, + .bs_r_2_s = generic_bs_r_2, + .bs_r_4_s = generic_bs_r_4, + .bs_r_8_s = generic_bs_r_8, /* read multiple stream */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - generic_bs_rm_8, + .bs_rm_1_s = generic_bs_rm_1, + .bs_rm_2_s = generic_bs_rm_2, + .bs_rm_4_s = generic_bs_rm_4, + .bs_rm_8_s = generic_bs_rm_8, /* read region stream */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - generic_bs_rr_8, + .bs_rr_1_s = generic_bs_rr_1, + .bs_rr_2_s = generic_bs_rr_2, + .bs_rr_4_s = generic_bs_rr_4, + .bs_rr_8_s = generic_bs_rr_8, /* write (single) stream */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - generic_bs_w_8, + .bs_w_1_s = generic_bs_w_1, + .bs_w_2_s = generic_bs_w_2, + .bs_w_4_s = generic_bs_w_4, + .bs_w_8_s = generic_bs_w_8, /* write multiple stream */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - generic_bs_wm_8, + .bs_wm_1_s = generic_bs_wm_1, + .bs_wm_2_s = generic_bs_wm_2, + .bs_wm_4_s = generic_bs_wm_4, + .bs_wm_8_s = generic_bs_wm_8, /* write region stream */ - generic_bs_wr_1, - generic_bs_wr_2, - generic_bs_wr_4, - generic_bs_wr_8, + .bs_wr_1_s = generic_bs_wr_1, + .bs_wr_2_s = generic_bs_wr_2, + .bs_wr_4_s = generic_bs_wr_4, + .bs_wr_8_s = generic_bs_wr_8, }; /* Ultra-gross kludge */