Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Use uint8_t instead of int. No functional change.
details: https://anonhg.NetBSD.org/src/rev/5c60a3599a90
branches: trunk
changeset: 355852:5c60a3599a90
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Aug 17 05:27:48 2017 +0000
description:
Use uint8_t instead of int. No functional change.
diffstat:
sys/dev/i2c/lm_i2c.c | 8 ++++----
sys/dev/ic/nslm7x.c | 22 +++++++++++++---------
sys/dev/ic/nslm7xvar.h | 4 ++--
sys/dev/isa/lm_isa_common.c | 8 ++++----
4 files changed, 23 insertions(+), 19 deletions(-)
diffs (175 lines):
diff -r 0d1318790b5c -r 5c60a3599a90 sys/dev/i2c/lm_i2c.c
--- a/sys/dev/i2c/lm_i2c.c Thu Aug 17 04:33:22 2017 +0000
+++ b/sys/dev/i2c/lm_i2c.c Thu Aug 17 05:27:48 2017 +0000
@@ -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 @@
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 @@
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;
diff -r 0d1318790b5c -r 5c60a3599a90 sys/dev/ic/nslm7x.c
--- a/sys/dev/ic/nslm7x.c Thu Aug 17 04:33:22 2017 +0000
+++ b/sys/dev/ic/nslm7x.c Thu Aug 17 05:27:48 2017 +0000
@@ -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 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 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 @@
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 @@
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 @@
{
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 @@
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 @@
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;
diff -r 0d1318790b5c -r 5c60a3599a90 sys/dev/ic/nslm7xvar.h
--- a/sys/dev/ic/nslm7xvar.h Thu Aug 17 04:33:22 2017 +0000
+++ b/sys/dev/ic/nslm7xvar.h Thu Aug 17 05:27:48 2017 +0000
@@ -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 @@
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;
diff -r 0d1318790b5c -r 5c60a3599a90 sys/dev/isa/lm_isa_common.c
--- a/sys/dev/isa/lm_isa_common.c Thu Aug 17 04:33:22 2017 +0000
+++ b/sys/dev/isa/lm_isa_common.c Thu Aug 17 05:27:48 2017 +0000
@@ -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 @@
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 @@
}
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;
Home |
Main Index |
Thread Index |
Old Index