Source-Changes-HG archive

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

[src/trunk]: src/sys Remove `volatile' qualifier from argument types of



details:   https://anonhg.NetBSD.org/src/rev/ee2446207e62
branches:  trunk
changeset: 749907:ee2446207e62
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Dec 12 14:44:08 2009 +0000

description:
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()

diffstat:

 sys/arch/amiga/dev/drbbc.c           |  12 ++++++------
 sys/arch/arm/ep93xx/eprtc.c          |  14 ++++++--------
 sys/arch/arm/xscale/pxa2x0_rtc.c     |  12 ++++++------
 sys/arch/dreamcast/dev/g2/g2rtc.c    |  12 ++++++------
 sys/arch/evbarm/ifpga/pl030_rtc.c    |   8 ++++----
 sys/arch/hp700/dev/pdc.c             |  12 ++++++------
 sys/arch/hpcmips/vr/rtc.c            |  12 ++++++------
 sys/arch/mac68k/mac68k/clock.c       |  12 ++++++------
 sys/arch/macppc/dev/adb.c            |   8 ++++----
 sys/arch/macppc/dev/cuda.c           |  12 ++++++------
 sys/arch/macppc/dev/pmu.c            |  12 ++++++------
 sys/arch/mips/alchemy/dev/aurtc.c    |  12 ++++++------
 sys/arch/next68k/next68k/rtc.c       |  12 ++++++------
 sys/arch/sgimips/dev/dpclock.c       |  12 +++++-------
 sys/arch/sgimips/dev/dsclock.c       |  14 ++++++--------
 sys/arch/sgimips/mace/mcclock_mace.c |  14 ++++++--------
 sys/arch/sparc/dev/rtc.c             |  12 ++++++------
 sys/arch/vax/include/clock.h         |  10 +++++-----
 sys/arch/vax/include/cpu.h           |   8 +++-----
 sys/arch/vax/vax/clock.c             |  20 ++++++++++----------
 sys/arch/vax/vax/ka820.c             |  12 ++++++------
 sys/arch/xen/xen/clock.c             |   8 ++++----
 sys/dev/dec/mcclock.c                |  12 ++++++------
 sys/dev/i2c/m41st84.c                |  12 ++++++------
 sys/dev/i2c/m41t00.c                 |  12 ++++++------
 sys/dev/i2c/max6900.c                |  12 ++++++------
 sys/dev/i2c/pcf8583.c                |  12 ++++++------
 sys/dev/i2c/r2025.c                  |  14 ++++++--------
 sys/dev/i2c/rs5c372.c                |  12 ++++++------
 sys/dev/i2c/x1226.c                  |  12 ++++++------
 sys/dev/ic/mm58167.c                 |  12 ++++++------
 31 files changed, 179 insertions(+), 191 deletions(-)

diffs (truncated from 1413 to 300 lines):

diff -r 171217b0887e -r ee2446207e62 sys/arch/amiga/dev/drbbc.c
--- a/sys/arch/amiga/dev/drbbc.c        Sat Dec 12 14:30:59 2009 +0000
+++ b/sys/arch/amiga/dev/drbbc.c        Sat Dec 12 14:44:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drbbc.c,v 1.17 2008/04/28 20:23:12 martin Exp $ */
+/*     $NetBSD: drbbc.c,v 1.18 2009/12/12 14:44:08 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drbbc.c,v 1.17 2008/04/28 20:23:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drbbc.c,v 1.18 2009/12/12 14:44:08 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -59,8 +59,8 @@
 void drbbc_attach(struct device *, struct device *, void *);
 int drbbc_match(struct device *, struct cfdata *, void *);
 
-int dracougettod(todr_chip_handle_t, volatile struct timeval *);
-int dracousettod(todr_chip_handle_t, volatile struct timeval *);
+int dracougettod(todr_chip_handle_t, struct timeval *);
+int dracousettod(todr_chip_handle_t, struct timeval *);
 
 static struct todr_chip_handle dracotodr;
 struct drbbc_softc {
@@ -163,7 +163,7 @@
 }
 
 int
-dracougettod(todr_chip_handle_t h, volatile struct timeval *tvp)
+dracougettod(todr_chip_handle_t h, struct timeval *tvp)
 {
        u_int32_t clkbuf;
        u_int32_t usecs;
@@ -194,7 +194,7 @@
 }
 
 int
-dracousettod(todr_chip_handle_t h, volatile struct timeval *tvp)
+dracousettod(todr_chip_handle_t h, struct timeval *tvp)
 {
        return (ENXIO);
 }
diff -r 171217b0887e -r ee2446207e62 sys/arch/arm/ep93xx/eprtc.c
--- a/sys/arch/arm/ep93xx/eprtc.c       Sat Dec 12 14:30:59 2009 +0000
+++ b/sys/arch/arm/ep93xx/eprtc.c       Sat Dec 12 14:44:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eprtc.c,v 1.2 2006/09/04 23:45:30 gdamore Exp $        */
+/*     $NetBSD: eprtc.c,v 1.3 2009/12/12 14:44:08 tsutsui Exp $        */
 
 /*
  * Copyright (c) 2005 HAMAJIMA Katsuomi. All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: eprtc.c,v 1.2 2006/09/04 23:45:30 gdamore Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eprtc.c,v 1.3 2009/12/12 14:44:08 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -51,10 +51,8 @@
 CFATTACH_DECL(eprtc, sizeof(struct eprtc_softc),
              eprtc_match, eprtc_attach, NULL, NULL);
 
-static int eprtc_gettime(struct todr_chip_handle *,
-                           volatile struct timeval *);
-static int eprtc_settime(struct todr_chip_handle *,
-                           volatile struct timeval *);
+static int eprtc_gettime(struct todr_chip_handle *, struct timeval *);
+static int eprtc_settime(struct todr_chip_handle *, struct timeval *);
 
 static int
 eprtc_match(struct device *parent, struct cfdata *match, void *aux)
@@ -85,7 +83,7 @@
 }
 
 static int
-eprtc_gettime(struct todr_chip_handle *ch, volatile struct timeval *tv)
+eprtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
 {
        struct eprtc_softc *sc = ch->cookie;;
 
@@ -95,7 +93,7 @@
 }
 
 static int
-eprtc_settime(struct todr_chip_handle *ch, volatile struct timeval *tv)
+eprtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
 {
        struct eprtc_softc *sc = ch->cookie;;
 
diff -r 171217b0887e -r ee2446207e62 sys/arch/arm/xscale/pxa2x0_rtc.c
--- a/sys/arch/arm/xscale/pxa2x0_rtc.c  Sat Dec 12 14:30:59 2009 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_rtc.c  Sat Dec 12 14:44:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pxa2x0_rtc.c,v 1.2 2009/08/09 06:12:34 kiyohara Exp $  */
+/*     $NetBSD: pxa2x0_rtc.c,v 1.3 2009/12/12 14:44:08 tsutsui Exp $   */
 
 /*
  * Copyright (c) 2007 NONAKA Kimihiro <nonaka%netbsd.org@localhost>
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pxa2x0_rtc.c,v 1.2 2009/08/09 06:12:34 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pxa2x0_rtc.c,v 1.3 2009/12/12 14:44:08 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -61,8 +61,8 @@
     pxartc_match, pxartc_attach, NULL, NULL);
 
 /* todr(9) interface */
-static int pxartc_todr_gettime(todr_chip_handle_t, volatile struct timeval *);
-static int pxartc_todr_settime(todr_chip_handle_t, volatile struct timeval *);
+static int pxartc_todr_gettime(todr_chip_handle_t, struct timeval *);
+static int pxartc_todr_settime(todr_chip_handle_t, struct timeval *);
 
 static int pxartc_wristwatch_read(struct pxartc_softc *,struct clock_ymdhms *);
 static int pxartc_wristwatch_write(struct pxartc_softc *,struct clock_ymdhms *);
@@ -111,7 +111,7 @@
 }
 
 static int
-pxartc_todr_gettime(todr_chip_handle_t ch, volatile struct timeval *tv)
+pxartc_todr_gettime(todr_chip_handle_t ch, struct timeval *tv)
 {
        struct pxartc_softc *sc = ch->cookie;
        struct clock_ymdhms dt;
@@ -141,7 +141,7 @@
 }
 
 static int
-pxartc_todr_settime(todr_chip_handle_t ch, volatile struct timeval *tv)
+pxartc_todr_settime(todr_chip_handle_t ch, struct timeval *tv)
 {
        struct pxartc_softc *sc = ch->cookie;
        struct clock_ymdhms dt;
diff -r 171217b0887e -r ee2446207e62 sys/arch/dreamcast/dev/g2/g2rtc.c
--- a/sys/arch/dreamcast/dev/g2/g2rtc.c Sat Dec 12 14:30:59 2009 +0000
+++ b/sys/arch/dreamcast/dev/g2/g2rtc.c Sat Dec 12 14:44:08 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: g2rtc.c,v 1.3 2008/04/28 20:23:16 martin Exp $ */
+/* $NetBSD: g2rtc.c,v 1.4 2009/12/12 14:44:09 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: g2rtc.c,v 1.3 2008/04/28 20:23:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: g2rtc.c,v 1.4 2009/12/12 14:44:09 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -61,8 +61,8 @@
 
 
 /* todr(9) methods */
-static int g2rtc_todr_gettime(todr_chip_handle_t, volatile struct timeval *);
-static int g2rtc_todr_settime(todr_chip_handle_t, volatile struct timeval *);
+static int g2rtc_todr_gettime(todr_chip_handle_t, struct timeval *);
+static int g2rtc_todr_settime(todr_chip_handle_t, struct timeval *);
 
 static struct todr_chip_handle g2rtc_todr_handle = {
        .cookie       = NULL,   /* set on attach */
@@ -121,7 +121,7 @@
  * Return 0 on success; an error number otherwise.
  */
 static int
-g2rtc_todr_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
+g2rtc_todr_gettime(todr_chip_handle_t handle, struct timeval *tv)
 {
        struct g2rtc_softc *sc = handle->cookie;
        uint32_t new, old;
@@ -151,7 +151,7 @@
  * Return 0 on success; an error number otherwise.
  */
 static int
-g2rtc_todr_settime(todr_chip_handle_t handle, volatile struct timeval *tv)
+g2rtc_todr_settime(todr_chip_handle_t handle, struct timeval *tv)
 {
        struct g2rtc_softc *sc = handle->cookie;
        uint32_t secs;
diff -r 171217b0887e -r ee2446207e62 sys/arch/evbarm/ifpga/pl030_rtc.c
--- a/sys/arch/evbarm/ifpga/pl030_rtc.c Sat Dec 12 14:30:59 2009 +0000
+++ b/sys/arch/evbarm/ifpga/pl030_rtc.c Sat Dec 12 14:44:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pl030_rtc.c,v 1.9 2009/07/21 16:04:16 dyoung Exp $ */
+/*     $NetBSD: pl030_rtc.c,v 1.10 2009/12/12 14:44:09 tsutsui Exp $ */
 
 /*
  * Copyright (c) 2001 ARM Ltd
@@ -32,7 +32,7 @@
 /* Include header files */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pl030_rtc.c,v 1.9 2009/07/21 16:04:16 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pl030_rtc.c,v 1.10 2009/12/12 14:44:09 tsutsui Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -64,7 +64,7 @@
     plrtc_probe, plrtc_attach, NULL, NULL);
 
 static int
-plrtc_gettime(todr_chip_handle_t todr, volatile struct timeval *tv)
+plrtc_gettime(todr_chip_handle_t todr, struct timeval *tv)
 {
        struct plrtc_softc *sc;
 
@@ -75,7 +75,7 @@
 }
 
 static int
-plrtc_settime(todr_chip_handle_t todr, volatile struct timeval *tv)
+plrtc_settime(todr_chip_handle_t todr, struct timeval *tv)
 {
        struct plrtc_softc *sc;
 
diff -r 171217b0887e -r ee2446207e62 sys/arch/hp700/dev/pdc.c
--- a/sys/arch/hp700/dev/pdc.c  Sat Dec 12 14:30:59 2009 +0000
+++ b/sys/arch/hp700/dev/pdc.c  Sat Dec 12 14:44:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pdc.c,v 1.33 2009/11/21 15:36:33 rmind Exp $   */
+/*     $NetBSD: pdc.c,v 1.34 2009/12/12 14:44:10 tsutsui Exp $ */
 
 /*     $OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $ */
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.33 2009/11/21 15:36:33 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.34 2009/12/12 14:44:10 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -94,8 +94,8 @@
 
 static struct cnm_state pdc_cnm_state;
 
-static int pdcgettod(todr_chip_handle_t, volatile struct timeval *);
-static int pdcsettod(todr_chip_handle_t, volatile struct timeval *);
+static int pdcgettod(todr_chip_handle_t, struct timeval *);
+static int pdcsettod(todr_chip_handle_t, struct timeval *);
 
 static struct pdc_tod tod PDC_ALIGNMENT;
 
@@ -450,7 +450,7 @@
 }
 
 static int
-pdcgettod(todr_chip_handle_t tch, volatile struct timeval *tvp)
+pdcgettod(todr_chip_handle_t tch, struct timeval *tvp)
 {
        int error;
 
@@ -465,7 +465,7 @@
 }
 
 static int
-pdcsettod(todr_chip_handle_t tch, volatile struct timeval *tvp)
+pdcsettod(todr_chip_handle_t tch, struct timeval *tvp)
 {
        int error;
 
diff -r 171217b0887e -r ee2446207e62 sys/arch/hpcmips/vr/rtc.c
--- a/sys/arch/hpcmips/vr/rtc.c Sat Dec 12 14:30:59 2009 +0000
+++ b/sys/arch/hpcmips/vr/rtc.c Sat Dec 12 14:44:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtc.c,v 1.25 2008/01/04 22:13:57 ad Exp $      */
+/*     $NetBSD: rtc.c,v 1.26 2009/12/12 14:44:08 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999 Shin Takemura. All rights reserved.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.25 2008/01/04 22:13:57 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.26 2009/12/12 14:44:08 tsutsui Exp $");
 
 #include "opt_vr41xx.h"
 
@@ -88,8 +88,8 @@
 };
 
 void   vrrtc_init(struct device *);
-int    vrrtc_get(todr_chip_handle_t, volatile struct timeval *);
-int    vrrtc_set(todr_chip_handle_t, volatile struct timeval *);
+int    vrrtc_get(todr_chip_handle_t, struct timeval *);
+int    vrrtc_set(todr_chip_handle_t, struct timeval *);
 uint32_t vrrtc_get_timecount(struct timecounter *);



Home | Main Index | Thread Index | Old Index