Module Name:    src
Committed By:   tsutsui
Date:           Wed Mar 16 14:39:26 UTC 2011

Modified Files:
        src/sys/arch/hpcmips/tx: tx39clock.c

Log Message:
Some KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/tx/tx39clock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hpcmips/tx/tx39clock.c
diff -u src/sys/arch/hpcmips/tx/tx39clock.c:1.23 src/sys/arch/hpcmips/tx/tx39clock.c:1.24
--- src/sys/arch/hpcmips/tx/tx39clock.c:1.23	Mon Apr 28 20:23:21 2008
+++ src/sys/arch/hpcmips/tx/tx39clock.c	Wed Mar 16 14:39:26 2011
@@ -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);

Reply via email to