Module Name:    src
Committed By:   msaitoh
Date:           Thu Aug 17 05:27:48 UTC 2017

Modified Files:
        src/sys/dev/i2c: lm_i2c.c
        src/sys/dev/ic: nslm7x.c nslm7xvar.h
        src/sys/dev/isa: lm_isa_common.c

Log Message:
 Use uint8_t instead of int. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/lm_i2c.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/ic/nslm7x.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/nslm7xvar.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/isa/lm_isa_common.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/dev/i2c/lm_i2c.c
diff -u src/sys/dev/i2c/lm_i2c.c:1.2 src/sys/dev/i2c/lm_i2c.c:1.3
--- src/sys/dev/i2c/lm_i2c.c:1.2	Mon Oct 13 11:16:00 2008
+++ src/sys/dev/i2c/lm_i2c.c	Thu Aug 17 05:27:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: lm_i2c.c,v 1.2 2008/10/13 11:16:00 pgoyette Exp $	*/
+/*	$NetBSD: lm_i2c.c,v 1.3 2017/08/17 05:27:48 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lm_i2c.c,v 1.2 2008/10/13 11:16:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lm_i2c.c,v 1.3 2017/08/17 05:27:48 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -49,7 +49,7 @@ void 	lm_i2c_attach(device_t, device_t, 
 int 	lm_i2c_detach(device_t, int);
 
 uint8_t lm_i2c_readreg(struct lm_softc *, int);
-void 	lm_i2c_writereg(struct lm_softc *, int, int);
+void 	lm_i2c_writereg(struct lm_softc *, int, uint8_t);
 
 struct lm_i2c_softc {
 	struct lm_softc sc_lmsc;
@@ -127,7 +127,7 @@ lm_i2c_readreg(struct lm_softc *lmsc, in
 
 
 void
-lm_i2c_writereg(struct lm_softc *lmsc, int reg, int val)
+lm_i2c_writereg(struct lm_softc *lmsc, int reg, uint8_t val)
 {
 	struct lm_i2c_softc *sc = (struct lm_i2c_softc *)lmsc;
 	uint8_t cmd, data;

Index: src/sys/dev/ic/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.68 src/sys/dev/ic/nslm7x.c:1.69
--- src/sys/dev/ic/nslm7x.c:1.68	Wed Aug  9 04:45:38 2017
+++ src/sys/dev/ic/nslm7x.c	Thu Aug 17 05:27:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: nslm7x.c,v 1.68 2017/08/09 04:45:38 msaitoh Exp $ */
+/*	$NetBSD: nslm7x.c,v 1.69 2017/08/17 05:27:48 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.68 2017/08/09 04:45:38 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.69 2017/08/17 05:27:48 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -79,7 +79,7 @@ static void wb_temp_diode_type(struct lm
 
 static void lm_refresh(void *);
 
-static void lm_generic_banksel(struct lm_softc *, int);
+static void lm_generic_banksel(struct lm_softc *, uint8_t);
 static void lm_setup_sensors(struct lm_softc *, const struct lm_sensor *);
 static void lm_refresh_sensor_data(struct lm_softc *);
 static void lm_refresh_volt(struct lm_softc *, int);
@@ -2004,7 +2004,7 @@ static const struct lm_sensor nct6779d_s
 };
 
 static void
-lm_generic_banksel(struct lm_softc *lmsc, int bank)
+lm_generic_banksel(struct lm_softc *lmsc, uint8_t bank)
 {
 	(*lmsc->lm_writereg)(lmsc, WB_BANKSEL, bank);
 }
@@ -2105,7 +2105,7 @@ static int
 lm_match(struct lm_softc *sc)
 {
 	const char *model = NULL;
-	int chipid;
+	uint8_t chipid;
 
 	/* See if we have an LM78/LM78J/LM79 or LM81 */
 	chipid = (*sc->lm_readreg)(sc, LMD_CHIPID) & LM_ID_MASK;
@@ -2154,7 +2154,7 @@ def_match(struct lm_softc *sc)
 static void
 wb_temp_diode_type(struct lm_softc *sc, int diode_type)
 {
-	int regval, banksel;
+	uint8_t regval, banksel;
 
 	banksel = (*sc->lm_readreg)(sc, WB_BANKSEL);
 	switch (diode_type) {
@@ -2204,7 +2204,9 @@ wb_match(struct lm_softc *sc)
 {
 	const char *model = NULL;
 	const char *vendor = "Winbond";
-	int banksel, vendid, cf_flags;
+	uint16_t vendid;
+	uint8_t banksel;
+	int cf_flags;
 
 	aprint_naive("\n");
 	aprint_normal("\n");
@@ -2452,7 +2454,8 @@ lm_refresh_fanrpm(struct lm_softc *sc, i
 static void
 wb_refresh_sensor_data(struct lm_softc *sc)
 {
-	int banksel, bank, i;
+	uint8_t banksel, bank;
+	int i;
 
 	/*
 	 * Properly save and restore bank selection register.
@@ -2635,7 +2638,8 @@ wb_nct67xx_id2str(uint8_t id)
 static void
 wb_w83792d_refresh_fanrpm(struct lm_softc *sc, int n)
 {
-	int reg, shift, data, divisor = 1;
+	int shift, data, divisor = 1;
+	uint8_t reg;
 
 	shift = 0;
 

Index: src/sys/dev/ic/nslm7xvar.h
diff -u src/sys/dev/ic/nslm7xvar.h:1.31 src/sys/dev/ic/nslm7xvar.h:1.32
--- src/sys/dev/ic/nslm7xvar.h:1.31	Wed Aug  9 04:45:38 2017
+++ src/sys/dev/ic/nslm7xvar.h	Thu Aug 17 05:27:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: nslm7xvar.h,v 1.31 2017/08/09 04:45:38 msaitoh Exp $ */
+/*	$NetBSD: nslm7xvar.h,v 1.32 2017/08/17 05:27:48 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -165,7 +165,7 @@ struct lm_softc {
 	void (*refresh_sensor_data)(struct lm_softc *);
 
 	uint8_t (*lm_readreg)(struct lm_softc *, int);
-	void (*lm_writereg)(struct lm_softc *, int, int);
+	void (*lm_writereg)(struct lm_softc *, int, uint8_t);
 
 	const struct lm_sensor *lm_sensors;
 	uint8_t	chipid;

Index: src/sys/dev/isa/lm_isa_common.c
diff -u src/sys/dev/isa/lm_isa_common.c:1.4 src/sys/dev/isa/lm_isa_common.c:1.5
--- src/sys/dev/isa/lm_isa_common.c:1.4	Wed Jun  1 02:37:47 2016
+++ src/sys/dev/isa/lm_isa_common.c	Thu Aug 17 05:27:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: lm_isa_common.c,v 1.4 2016/06/01 02:37:47 pgoyette Exp $ */
+/*	$NetBSD: lm_isa_common.c,v 1.5 2017/08/17 05:27:48 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lm_isa_common.c,v 1.4 2016/06/01 02:37:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lm_isa_common.c,v 1.5 2017/08/17 05:27:48 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -51,7 +51,7 @@ void 	lm_isa_attach(device_t, device_t, 
 int 	lm_isa_detach(device_t, int);
 
 static uint8_t 	lm_isa_readreg(struct lm_softc *, int);
-static void 	lm_isa_writereg(struct lm_softc *, int, int);
+static void 	lm_isa_writereg(struct lm_softc *, int, uint8_t);
 
 struct lm_isa_softc {
 	struct lm_softc lmsc;
@@ -147,7 +147,7 @@ lm_isa_readreg(struct lm_softc *lmsc, in
 }
 
 static void
-lm_isa_writereg(struct lm_softc *lmsc, int reg, int val)
+lm_isa_writereg(struct lm_softc *lmsc, int reg, uint8_t val)
 {
 	struct lm_isa_softc *sc = (struct lm_isa_softc *)lmsc;
 

Reply via email to