Source-Changes-HG archive

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

[src/trunk]: src/sys For struct timecounter, use C99 initializers.



details:   https://anonhg.NetBSD.org/src/rev/e4a893a9be44
branches:  trunk
changeset: 933728:e4a893a9be44
user:      rin <rin%NetBSD.org@localhost>
date:      Fri May 29 12:30:38 2020 +0000

description:
For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.

diffstat:

 sys/arch/arm/at91/at91tctmr.c              |  17 +++++-------
 sys/arch/arm/ep93xx/epclk.c                |  17 +++++-------
 sys/arch/arm/imx/imxclock.c                |  16 ++++-------
 sys/arch/arm/iomd/iomd_clock.c             |  15 +++++------
 sys/arch/arm/ixp12x0/ixp12x0_clk.c         |  16 ++++-------
 sys/arch/arm/marvell/mvsoctmr.c            |  16 ++++-------
 sys/arch/arm/mpcore/mpcore_clock.c         |  16 ++++-------
 sys/arch/arm/omap/omap_mputmr.c            |  16 ++++-------
 sys/arch/arm/s3c2xx0/s3c24x0_clk.c         |  16 ++++-------
 sys/arch/arm/s3c2xx0/s3c2800_clk.c         |  16 ++++-------
 sys/arch/arm/xscale/becc_timer.c           |  17 +++++-------
 sys/arch/arm/xscale/ixp425_timer.c         |  17 +++++-------
 sys/arch/atari/dev/clock.c                 |  17 +++++-------
 sys/arch/evbarm/ifpga/ifpga_clock.c        |  17 +++++-------
 sys/arch/evbarm/iq80310/iq80310_timer.c    |  17 +++++-------
 sys/arch/evbmips/ingenic/clock.c           |  15 +++++------
 sys/arch/evbmips/loongson/loongson_clock.c |  18 +++++--------
 sys/arch/hp300/hp300/clock.c               |  15 +++++------
 sys/arch/ia64/ia64/clock.c                 |  12 +++-----
 sys/arch/mips/mips/mips3_clock.c           |  14 ++++------
 sys/arch/powerpc/booke/e500_timer.c        |  16 ++++-------
 sys/arch/powerpc/ibm4xx/clock.c            |  16 ++++-------
 sys/arch/sgimips/dev/int.c                 |  16 ++++-------
 sys/arch/sparc64/sparc64/clock.c           |  40 ++++++++++-------------------
 sys/arch/usermode/dev/clock.c              |  17 +++++-------
 sys/arch/vax/vax/clock.c                   |  30 +++++++++-------------
 sys/arch/x86/isa/clock.c                   |  17 +++++-------
 sys/arch/x86/x86/lapic.c                   |  19 ++++++--------
 sys/dev/acpi/acpi_timer.c                  |  17 +++++-------
 sys/dev/pci/voyager/pwmclock.c             |  16 ++++-------
 30 files changed, 209 insertions(+), 315 deletions(-)

diffs (truncated from 1169 to 300 lines):

diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/at91/at91tctmr.c
--- a/sys/arch/arm/at91/at91tctmr.c     Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/at91/at91tctmr.c     Fri May 29 12:30:38 2020 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: at91tctmr.c,v 1.7 2012/11/12 18:00:36 skrll Exp $*/
+/*$NetBSD: at91tctmr.c,v 1.8 2020/05/29 12:30:38 rin Exp $*/
 
 /*
  * AT91 Timer Counter (TC) based clock functions
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91tctmr.c,v 1.7 2012/11/12 18:00:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91tctmr.c,v 1.8 2020/05/29 12:30:38 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -157,14 +157,11 @@
 static u_int at91tctmr_get_timecount(struct timecounter *);
 
 static struct timecounter at91tctmr_timecounter = {
-       at91tctmr_get_timecount,/* get_timecount */
-       0,                      /* no poll_pps */
-       0xffffffff,             /* counter_mask */
-       COUNTS_PER_SEC,         /* frequency */
-       "at91tctmr",            /* name */
-       100,                    /* quality */
-       NULL,                   /* prev */
-       NULL,                   /* next */
+       .tc_get_timecount = at91tctmr_get_timecount,
+       .tc_counter_mask = 0xffffffff,
+       .tc_frequency = COUNTS_PER_SEC,
+       .tc_name = "at91tctmr",
+       .tc_quality = 100,
 };
 #endif
 
diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/ep93xx/epclk.c
--- a/sys/arch/arm/ep93xx/epclk.c       Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/ep93xx/epclk.c       Fri May 29 12:30:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: epclk.c,v 1.21 2014/03/06 19:46:27 maxv Exp $  */
+/*     $NetBSD: epclk.c,v 1.22 2020/05/29 12:30:38 rin Exp $   */
 
 /*
  * Copyright (c) 2004 Jesse Off
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epclk.c,v 1.21 2014/03/06 19:46:27 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epclk.c,v 1.22 2020/05/29 12:30:38 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -85,14 +85,11 @@
 };
 
 static struct timecounter epclk_timecounter = {
-       epclk_get_timecount,    /* get_timecount */
-       0,                      /* no poll_pps */
-       ~0u,                    /* counter_mask */
-       TIMER_FREQ,             /* frequency */
-       "epclk",                /* name */
-       100,                    /* quality */
-       NULL,                   /* prev */
-       NULL,                   /* next */
+       .tc_get_timecount = epclk_get_timecount,
+       .tc_counter_mask = ~0u,
+       .tc_frequency = TIMER_FREQ,
+       .tc_name = "epclk",
+       .tc_quality = 100,
 };
 
 static struct epclk_softc *epclk_sc = NULL;
diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/imx/imxclock.c
--- a/sys/arch/arm/imx/imxclock.c       Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/imx/imxclock.c       Fri May 29 12:30:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imxclock.c,v 1.8 2019/07/24 12:35:26 hkenken Exp $ */
+/*     $NetBSD: imxclock.c,v 1.9 2020/05/29 12:30:38 rin Exp $ */
 /*
  * Copyright (c) 2009, 2010  Genetec corp.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec corp.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxclock.c,v 1.8 2019/07/24 12:35:26 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxclock.c,v 1.9 2020/05/29 12:30:38 rin Exp $");
 
 #include "opt_imx.h"
 
@@ -59,14 +59,10 @@
 static int imxclock_intr(void *);
 
 static struct timecounter imx_epit_timecounter = {
-       imx_epit_get_timecount, /* get_timecount */
-       0,                      /* no poll_pps */
-       0xffffffff,             /* counter_mask */
-       0,                      /* frequency */
-       "epit",                 /* name */
-       100,                    /* quality */
-       NULL,                   /* prev */
-       NULL,                   /* next */
+       .tc_get_timecount = imx_epit_get_timecount,
+       .tc_counter_mask = 0xffffffff,
+       .tc_name = "epit",
+       .tc_quality = 100,
 };
 
 static volatile uint32_t imxclock_base;
diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/iomd/iomd_clock.c
--- a/sys/arch/arm/iomd/iomd_clock.c    Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/iomd/iomd_clock.c    Fri May 29 12:30:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iomd_clock.c,v 1.29 2012/05/18 21:09:50 skrll Exp $    */
+/*     $NetBSD: iomd_clock.c,v 1.30 2020/05/29 12:30:38 rin Exp $      */
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -47,7 +47,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: iomd_clock.c,v 1.29 2012/05/18 21:09:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iomd_clock.c,v 1.30 2020/05/29 12:30:38 rin Exp $");
 
 #include <sys/systm.h>
 #include <sys/types.h>
@@ -94,12 +94,11 @@
 static kmutex_t tmr_lock;
 
 static struct timecounter iomd_timecounter = {
-       iomd_timecounter0_get,
-       0, /* No poll_pps */
-       ~0, /* 32bit accuracy */
-       TIMER_FREQUENCY,
-       "iomd_timer0",
-       100 
+       .tc_get_timecount = iomd_timecounter0_get,
+       .tc_counter_mask = ~0,
+       .tc_frequency = TIMER_FREQUENCY,
+       .tc_name = "iomd_timer0",
+       .tc_quality = 100,
 };
 
 int clockhandler(void *);
diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/ixp12x0/ixp12x0_clk.c
--- a/sys/arch/arm/ixp12x0/ixp12x0_clk.c        Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0_clk.c        Fri May 29 12:30:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ixp12x0_clk.c,v 1.17 2012/11/12 18:00:37 skrll Exp $   */
+/*     $NetBSD: ixp12x0_clk.c,v 1.18 2020/05/29 12:30:39 rin Exp $     */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixp12x0_clk.c,v 1.17 2012/11/12 18:00:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp12x0_clk.c,v 1.18 2020/05/29 12:30:39 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -123,14 +123,10 @@
 static struct ixpclk_softc *ixpclk_sc = NULL;
 
 static struct timecounter ixpclk_timecounter = {
-       ixpclk_get_timecount,   /* get_timecount */
-       0,                      /* no poll_pps */
-       0xffffffff,             /* counter_mask */
-       0,                      /* frequency */
-       "ixpclk",               /* name */
-       100,                    /* quality */
-       NULL,                   /* prev */
-       NULL,                   /* next */
+       .tc_get_timecount = ixpclk_get_timecount,
+       .tc_counter_mask = 0xffffffff,
+       .tc_name = "ixpclk",
+       .tc_quality = 100,
 };
 
 static volatile uint32_t ixpclk_base;
diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/marvell/mvsoctmr.c
--- a/sys/arch/arm/marvell/mvsoctmr.c   Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/marvell/mvsoctmr.c   Fri May 29 12:30:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvsoctmr.c,v 1.14 2017/01/07 15:14:20 kiyohara Exp $   */
+/*     $NetBSD: mvsoctmr.c,v 1.15 2020/05/29 12:30:39 rin Exp $        */
 /*
  * Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsoctmr.c,v 1.14 2017/01/07 15:14:20 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsoctmr.c,v 1.15 2020/05/29 12:30:39 rin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mvsoc.h"
@@ -100,14 +100,10 @@
 
 static struct mvsoctmr_softc *mvsoctmr_sc;
 static struct timecounter mvsoctmr_timecounter = {
-       mvsoctmr_get_timecount, /* get_timecount */
-       0,                      /* no poll_pps */
-       ~0u,                    /* counter_mask */
-       0,                      /* frequency  (set by cpu_initclocks()) */
-       "mvsoctmr",             /* name */
-       100,                    /* quality */
-       NULL,                   /* prev */
-       NULL,                   /* next */
+       .tc_get_timecount = mvsoctmr_get_timecount,
+       .tc_counter_mask = ~0u,
+       .tc_name = "mvsoctmr",
+       .tc_quality = 100,
 };
 
 CFATTACH_DECL_NEW(mvsoctmr, sizeof(struct mvsoctmr_softc),
diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/mpcore/mpcore_clock.c
--- a/sys/arch/arm/mpcore/mpcore_clock.c        Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/mpcore/mpcore_clock.c        Fri May 29 12:30:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpcore_clock.c,v 1.2 2011/07/01 20:30:21 dyoung Exp $ */
+/*     $NetBSD: mpcore_clock.c,v 1.3 2020/05/29 12:30:39 rin Exp $ */
 /*
  * Copyright (c) 2009, 2010, 2011  Genetec corp.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec corp.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpcore_clock.c,v 1.2 2011/07/01 20:30:21 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpcore_clock.c,v 1.3 2020/05/29 12:30:39 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -60,14 +60,10 @@
 static int mpcoreclk_intr(void *);
 
 static struct timecounter mpcore_timecounter = {
-       mpcore_get_timecount,   /* get_timecount */
-       0,                      /* no poll_pps */
-       0xffffffff,             /* counter_mask */
-       0,                      /* frequency */
-       "cpuclock",             /* name */
-       100,                    /* quality */
-       NULL,                   /* prev */
-       NULL,                   /* next */
+       .tc_get_timecount = mpcore_get_timecount,
+       .tc_counter_mask = 0xffffffff,
+       .tc_name = "cpuclock",
+       .tc_quality = 100,
 };
 
 struct mpcoreclk_softc {
diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/omap/omap_mputmr.c
--- a/sys/arch/arm/omap/omap_mputmr.c   Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/omap/omap_mputmr.c   Fri May 29 12:30:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap_mputmr.c,v 1.6 2011/07/01 20:30:21 dyoung Exp $   */
+/*     $NetBSD: omap_mputmr.c,v 1.7 2020/05/29 12:30:39 rin Exp $      */
 
 /*
  * Based on i80321_timer.c and arch/arm/sa11x0/sa11x0_ost.c
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap_mputmr.c,v 1.6 2011/07/01 20:30:21 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap_mputmr.c,v 1.7 2020/05/29 12:30:39 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -313,14 +313,10 @@
 }
 
 static struct timecounter mpu_timecounter = {
-       mpu_get_timecount,
-       NULL,
-       0xffffffff,
-       0,
-       "mpu",
-       100,
-       NULL,
-       NULL,
+       .tc_get_timecount = mpu_get_timecount,
+       .tc_counter_mask = 0xffffffff,
+       .tc_name = "mpu",
+       .tc_quality = 100,
 };
 
 void
diff -r 2dbbd49d7d09 -r e4a893a9be44 sys/arch/arm/s3c2xx0/s3c24x0_clk.c
--- a/sys/arch/arm/s3c2xx0/s3c24x0_clk.c        Fri May 29 12:15:30 2020 +0000
+++ b/sys/arch/arm/s3c2xx0/s3c24x0_clk.c        Fri May 29 12:30:38 2020 +0000



Home | Main Index | Thread Index | Old Index