Fixes for -Wcast-qual. Add some needed const around char *'s,
__UNVOLATILE in READ/WRITE_REG and convert the rtc functions to properaly take a volatile timeval
This commit is contained in:
parent
cc5aca9af5
commit
51ed2fd82d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbmac.c,v 1.19 2004/03/19 07:11:33 cgd Exp $ */
|
||||
/* $NetBSD: sbmac.c,v 1.20 2005/06/09 17:46:19 jmc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000, 2001, 2004
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.19 2004/03/19 07:11:33 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.20 2005/06/09 17:46:19 jmc Exp $");
|
||||
|
||||
#include "bpfilter.h"
|
||||
#include "opt_inet.h"
|
||||
@ -2244,7 +2244,7 @@ sbmac_parse_xdigit(char str)
|
||||
*/
|
||||
|
||||
static int
|
||||
sbmac_parse_hwaddr(char *str, u_char *hwaddr)
|
||||
sbmac_parse_hwaddr(const char *str, u_char *hwaddr)
|
||||
{
|
||||
int digit1, digit2;
|
||||
int idx = 6;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbscn.c,v 1.12 2003/08/07 16:28:35 agc Exp $ */
|
||||
/* $NetBSD: sbscn.c,v 1.13 2005/06/09 17:46:19 jmc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000, 2001
|
||||
@ -116,7 +116,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.12 2003/08/07 16:28:35 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.13 2005/06/09 17:46:19 jmc Exp $");
|
||||
|
||||
#define SBSCN_DEBUG
|
||||
|
||||
@ -240,8 +240,8 @@ static void sbscn_attach(struct device *, struct device *, void *);
|
||||
CFATTACH_DECL(sbscn, sizeof(struct sbscn_softc),
|
||||
sbscn_match, sbscn_attach, NULL, NULL);
|
||||
|
||||
#define READ_REG(rp) (mips3_ld((uint64_t *)(rp)))
|
||||
#define WRITE_REG(rp, val) (mips3_sd((uint64_t *)(rp), (val)))
|
||||
#define READ_REG(rp) (mips3_ld((int64_t *)__UNVOLATILE(rp)))
|
||||
#define WRITE_REG(rp, val) (mips3_sd((uint64_t *)__UNVOLATILE(rp), (val)))
|
||||
|
||||
/*
|
||||
* input and output signals are actually the _inverse_ of the bits in the
|
||||
@ -421,12 +421,12 @@ sbscn_speed(long speed, long *brcp)
|
||||
}
|
||||
|
||||
#ifdef SBSCN_DEBUG
|
||||
void sbscn_status(struct sbscn_channel *, char *);
|
||||
void sbscn_status(struct sbscn_channel *, const char *);
|
||||
|
||||
int sbscn_debug = 0 /* XXXCGD */;
|
||||
|
||||
void
|
||||
sbscn_status(struct sbscn_channel *ch, char *str)
|
||||
sbscn_status(struct sbscn_channel *ch, const char *str)
|
||||
{
|
||||
struct sbscn_softc *sc = ch->ch_sc;
|
||||
struct tty *tp = ch->ch_tty;
|
||||
@ -1330,7 +1330,7 @@ sbscn_diag(arg)
|
||||
integrate void
|
||||
sbscn_rxsoft(struct sbscn_channel *ch, struct tty *tp)
|
||||
{
|
||||
int (*rint)(int c, struct tty *tp) = tp->t_linesw->l_rint;
|
||||
int (*rint)(int, struct tty *) = tp->t_linesw->l_rint;
|
||||
u_char *get, *end;
|
||||
u_int cc, scc;
|
||||
u_char sr;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtc.c,v 1.10 2005/06/04 20:14:24 he Exp $ */
|
||||
/* $NetBSD: rtc.c,v 1.11 2005/06/09 17:46:19 jmc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.10 2005/06/04 20:14:24 he Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.11 2005/06/09 17:46:19 jmc Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
@ -68,13 +68,13 @@ struct rtc_softc {
|
||||
|
||||
static int xirtc_match(struct device *, struct cfdata *, void *);
|
||||
static void xirtc_attach(struct device *, struct device *, void *);
|
||||
static int xirtc_gettime(todr_chip_handle_t, struct timeval *);
|
||||
static int xirtc_settime(todr_chip_handle_t, struct timeval *);
|
||||
static int xirtc_gettime(todr_chip_handle_t, volatile struct timeval *);
|
||||
static int xirtc_settime(todr_chip_handle_t, volatile struct timeval *);
|
||||
|
||||
static int strtc_match(struct device *, struct cfdata *, void *);
|
||||
static void strtc_attach(struct device *, struct device *, void *);
|
||||
static int strtc_gettime(todr_chip_handle_t, struct timeval *);
|
||||
static int strtc_settime(todr_chip_handle_t, struct timeval *);
|
||||
static int strtc_gettime(todr_chip_handle_t, volatile struct timeval *);
|
||||
static int strtc_settime(todr_chip_handle_t, volatile struct timeval *);
|
||||
|
||||
static int rtc_getcal(todr_chip_handle_t, int *);
|
||||
static int rtc_setcal(todr_chip_handle_t, int);
|
||||
@ -152,7 +152,7 @@ xirtc_attach(struct device *parent, struct device *self, void *aux)
|
||||
}
|
||||
|
||||
static int
|
||||
xirtc_settime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
xirtc_settime(todr_chip_handle_t handle, volatile struct timeval *tv)
|
||||
{
|
||||
struct rtc_softc *sc = handle->cookie;
|
||||
struct clock_ymdhms ymdhms;
|
||||
@ -187,7 +187,7 @@ xirtc_settime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
}
|
||||
|
||||
static int
|
||||
xirtc_gettime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
xirtc_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
|
||||
{
|
||||
struct rtc_softc *sc = handle->cookie;
|
||||
struct clock_ymdhms ymdhms;
|
||||
@ -270,7 +270,7 @@ strtc_attach(struct device *parent, struct device *self, void *aux)
|
||||
}
|
||||
|
||||
static int
|
||||
strtc_settime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
strtc_settime(todr_chip_handle_t handle, volatile struct timeval *tv)
|
||||
{
|
||||
struct rtc_softc *sc = handle->cookie;
|
||||
struct clock_ymdhms ymdhms;
|
||||
@ -298,7 +298,7 @@ strtc_settime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
}
|
||||
|
||||
static int
|
||||
strtc_gettime(todr_chip_handle_t handle, struct timeval *tv)
|
||||
strtc_gettime(todr_chip_handle_t handle, volatile struct timeval *tv)
|
||||
{
|
||||
struct rtc_softc *sc = handle->cookie;
|
||||
struct clock_ymdhms ymdhms;
|
||||
|
Loading…
Reference in New Issue
Block a user