Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/tx Some KNF.



details:   https://anonhg.NetBSD.org/src/rev/9ab7cf751512
branches:  trunk
changeset: 763295:9ab7cf751512
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Mar 16 14:39:26 2011 +0000

description:
Some KNF.

diffstat:

 sys/arch/hpcmips/tx/tx39clock.c |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (86 lines):

diff -r 5deeefd1e5e6 -r 9ab7cf751512 sys/arch/hpcmips/tx/tx39clock.c
--- a/sys/arch/hpcmips/tx/tx39clock.c   Wed Mar 16 14:28:39 2011 +0000
+++ b/sys/arch/hpcmips/tx/tx39clock.c   Wed Mar 16 14:39:26 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tx39clock.c,v 1.23 2008/04/28 20:23:21 martin Exp $ */
+/*     $NetBSD: tx39clock.c,v 1.24 2011/03/16 14:39:26 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tx39clock.c,v 1.23 2008/04/28 20:23:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tx39clock.c,v 1.24 2011/03/16 14:39:26 tsutsui Exp $");
 
 #include "opt_tx39clock_debug.h"
 
@@ -59,7 +59,7 @@
 #define ISSETPRINT(r, m)                                               \
        dbg_bitmask_print(r, TX39_CLOCK_EN ## m ## CLK, #m)
 
-void   tx39clock_init(struct device *);
+void   tx39clock_init(device_t);
 
 struct platform_clock tx39_clock = {
 #define CLOCK_RATE     100
@@ -67,8 +67,8 @@
 };
 
 struct txtime {
-       u_int32_t t_hi;
-       u_int32_t t_lo;
+       uint32_t t_hi;
+       uint32_t t_lo;
 };
 
 struct tx39clock_softc {
@@ -103,7 +103,7 @@
 tx39clock_match(struct device *parent, struct cfdata *cf, void *aux)
 {
 
-       return (ATTACH_FIRST);
+       return ATTACH_FIRST;
 }
 
 void
@@ -244,7 +244,7 @@
         * always be consistent.  This is much faster than the routine which
         * has to get both values, improving the quality.
         */
-       return (tx_conf_read(tc, TX39_TIMERRTCLO_REG));
+       return tx_conf_read(tc, TX39_TIMERRTCLO_REG);
 }
 
 void
@@ -288,7 +288,7 @@
        sc->sc_alarm = TX39_MSEC2RTC(msec);
        tx39clock_alarm_refill(tc);
 
-       return (0);
+       return 0;
 }
 
 void
@@ -296,15 +296,15 @@
 {
        struct tx39clock_softc *sc = tc->tc_clockt;
        struct txtime t;        
-       u_int64_t mytime;
+       uint64_t mytime;
        
        __tx39timer_rtcget(&t);
 
-       mytime = ((u_int64_t)t.t_hi << 32) | (u_int64_t)t.t_lo;
-       mytime += (u_int64_t)sc->sc_alarm;
+       mytime = ((uint64_t)t.t_hi << 32) | (uint64_t)t.t_lo;
+       mytime += (uint64_t)sc->sc_alarm;
 
-       t.t_hi = (u_int32_t)((mytime >> 32) & TX39_TIMERALARMHI_MASK);
-       t.t_lo = (u_int32_t)(mytime & 0xffffffff);
+       t.t_hi = (uint32_t)((mytime >> 32) & TX39_TIMERALARMHI_MASK);
+       t.t_lo = (uint32_t)(mytime & 0xffffffff);
 
        tx_conf_write(tc, TX39_TIMERALARMHI_REG, t.t_hi);
        tx_conf_write(tc, TX39_TIMERALARMLO_REG, t.t_lo);



Home | Main Index | Thread Index | Old Index