Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2013 20:13:43 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250420 - head/sys/mips/mips
Message-ID:  <201305092013.r49KDhE0022496@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Thu May  9 20:13:43 2013
New Revision: 250420
URL: http://svnweb.freebsd.org/changeset/base/250420

Log:
  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

Modified:
  head/sys/mips/mips/bus_space_fdt.c
  head/sys/mips/mips/bus_space_generic.c

Modified: head/sys/mips/mips/bus_space_fdt.c
==============================================================================
--- head/sys/mips/mips/bus_space_fdt.c	Thu May  9 19:37:00 2013	(r250419)
+++ head/sys/mips/mips/bus_space_fdt.c	Thu May  9 20:13:43 2013	(r250420)
@@ -94,109 +94,109 @@ static int	fdt_bs_map(void *, bus_addr_t
 
 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 */

Modified: head/sys/mips/mips/bus_space_generic.c
==============================================================================
--- head/sys/mips/mips/bus_space_generic.c	Thu May  9 19:37:00 2013	(r250419)
+++ head/sys/mips/mips/bus_space_generic.c	Thu May  9 20:13:43 2013	(r250420)
@@ -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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305092013.r49KDhE0022496>