summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev/hdfd.c
diff options
context:
space:
mode:
authorhe <he@NetBSD.org>2005-06-04 14:42:36 +0000
committerhe <he@NetBSD.org>2005-06-04 14:42:36 +0000
commit5cc5caddf2f0d92f0cd12da3f28f811ad6b56fb9 (patch)
treed6d0f4647d30cf77ed16aace37b767add3603c28 /sys/arch/atari/dev/hdfd.c
parent5cfd2bfc98c8df2d4000ed6fc010915cc93aecda (diff)
Adapt to compiling with -Wshadow and -Wcast-qual, by adding const
qualification in places and renaming a few local variables. Also adds a couple uses of __UNVOLATILE() to allow passing volatile variables to functions wanting e.g. caddr_t.
Diffstat (limited to 'sys/arch/atari/dev/hdfd.c')
-rw-r--r--sys/arch/atari/dev/hdfd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c
index a4bcbf94d7c..108ad69ddc8 100644
--- a/sys/arch/atari/dev/hdfd.c
+++ b/sys/arch/atari/dev/hdfd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hdfd.c,v 1.44 2004/10/28 07:07:36 yamt Exp $ */
+/* $NetBSD: hdfd.c,v 1.45 2005/06/04 14:42:36 he Exp $ */
/*-
* Copyright (c) 1996 Leo Weppelman
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.44 2004/10/28 07:07:36 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.45 2005/06/04 14:42:36 he Exp $");
#include "opt_ddb.h"
@@ -228,7 +228,7 @@ struct fd_type {
int rate; /* transfer speed code */
u_char fillbyte; /* format fill byte */
u_char interleave; /* interleave factor (formatting) */
- char *name;
+ const char *name;
};
/*
@@ -307,7 +307,7 @@ int fdcresult __P((struct fdc_softc *fdc));
int out_fdc __P((u_char x));
void fdc_ctrl_intr __P((struct clockframe));
void fdcstart __P((struct fdc_softc *fdc));
-void fdcstatus __P((struct device *dv, int n, char *s));
+void fdcstatus __P((struct device *dv, int n, const char *s));
void fdctimeout __P((void *arg));
void fdcpseudointr __P((void *arg));
int fdcintr __P((void *));
@@ -366,7 +366,8 @@ fdcprobe(parent, cfp, aux)
out:
if (fdc_matched == 0) {
- bus_space_unmap(mb_tag, (caddr_t)fdio_addr, FD_IOSIZE);
+ bus_space_unmap(mb_tag, (caddr_t)__UNVOLATILE(fdio_addr),
+ FD_IOSIZE);
mb_free_bus_space_tag(mb_tag);
}
@@ -893,7 +894,7 @@ void
fdcstatus(dv, n, s)
struct device *dv;
int n;
- char *s;
+ const char *s;
{
struct fdc_softc *fdc = (void *)dv->dv_parent;
char bits[64];