Module Name: src
Committed By: mrg
Date: Fri Feb 8 08:47:35 UTC 2019
Modified Files:
src/sys/arch/acorn32/mainbus: fd.c
src/sys/arch/arc/jazz: fd.c
src/sys/arch/atari/dev: hdfd.c
src/sys/arch/sparc/dev: fd.c
src/sys/arch/sparc64/dev: fdc.c
src/sys/arch/sun3/dev: fd.c
src/sys/arch/x68k/dev: fd.c
Log Message:
make *fd*.c's fd_dev_to_type() always a static inline. some
have it as a const, and have code to copy the defaults to
modify them before using them, but that probably requires a
real test to feel confident in changing.
To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/acorn32/mainbus/fd.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arc/jazz/fd.c
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/sparc/dev/fd.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sparc64/dev/fdc.c
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/sun3/dev/fd.c
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/x68k/dev/fd.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/acorn32/mainbus/fd.c
diff -u src/sys/arch/acorn32/mainbus/fd.c:1.59 src/sys/arch/acorn32/mainbus/fd.c:1.60
--- src/sys/arch/acorn32/mainbus/fd.c:1.59 Mon Sep 3 16:29:22 2018
+++ src/sys/arch/acorn32/mainbus/fd.c Fri Feb 8 08:47:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.59 2018/09/03 16:29:22 riastradh Exp $ */
+/* $NetBSD: fd.c,v 1.60 2019/02/08 08:47:35 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.59 2018/09/03 16:29:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.60 2019/02/08 08:47:35 mrg Exp $");
#include "opt_ddb.h"
@@ -313,7 +313,7 @@ void fdcpseudointr(void *arg);
int fdcintr(void *);
void fdcretry(struct fdc_softc *fdc);
void fdfinish(struct fd_softc *fd, struct buf *bp);
-inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
+static struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
int fdformat(dev_t, struct ne7_fd_formb *, struct lwp *);
int
@@ -554,7 +554,7 @@ fd_nvtotype(const char *fdc, int nvramin
}
}
-inline struct fd_type *
+static struct fd_type *
fd_dev_to_type(struct fd_softc *fd, dev_t dev)
{
int type = FDTYPE(dev);
Index: src/sys/arch/arc/jazz/fd.c
diff -u src/sys/arch/arc/jazz/fd.c:1.48 src/sys/arch/arc/jazz/fd.c:1.49
--- src/sys/arch/arc/jazz/fd.c:1.48 Mon Sep 3 16:29:23 2018
+++ src/sys/arch/arc/jazz/fd.c Fri Feb 8 08:47:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.48 2018/09/03 16:29:23 riastradh Exp $ */
+/* $NetBSD: fd.c,v 1.49 2019/02/08 08:47:35 mrg Exp $ */
/* $OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $ */
/* NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp */
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.48 2018/09/03 16:29:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.49 2019/02/08 08:47:35 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -232,7 +232,7 @@ static void fdctimeout(void *);
static void fdcpseudointr(void *);
static void fdcretry(struct fdc_softc *);
static void fdfinish(struct fd_softc *, struct buf *);
-static inline const struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
+static const struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
static void fd_mountroot_hook(device_t);
/*
@@ -419,7 +419,7 @@ fd_nvtotype(char *fdc, int nvraminfo, in
}
#endif
-static inline const struct fd_type *
+static const struct fd_type *
fd_dev_to_type(struct fd_softc *fd, dev_t dev)
{
int type = FDTYPE(dev);
Index: src/sys/arch/atari/dev/hdfd.c
diff -u src/sys/arch/atari/dev/hdfd.c:1.83 src/sys/arch/atari/dev/hdfd.c:1.84
--- src/sys/arch/atari/dev/hdfd.c:1.83 Mon Sep 3 16:29:24 2018
+++ src/sys/arch/atari/dev/hdfd.c Fri Feb 8 08:47:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: hdfd.c,v 1.83 2018/09/03 16:29:24 riastradh Exp $ */
+/* $NetBSD: hdfd.c,v 1.84 2019/02/08 08:47:35 mrg Exp $ */
/*-
* Copyright (c) 1996 Leo Weppelman
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.83 2018/09/03 16:29:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.84 2019/02/08 08:47:35 mrg Exp $");
#include "opt_ddb.h"
@@ -335,7 +335,7 @@ int fdformat(dev_t, struct ne7_fd_formb
static void fdgetdisklabel(struct fd_softc *, dev_t);
static void fdgetdefaultlabel(struct fd_softc *, struct disklabel *, int);
-inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
+static struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
int
fdcprobe(device_t parent, cfdata_t cf, void *aux)
@@ -592,7 +592,7 @@ fdc_ctrl_intr(struct clockframe frame)
}
}
-inline struct fd_type *
+static struct fd_type *
fd_dev_to_type(struct fd_softc *fd, dev_t dev)
{
int type = FDTYPE(dev);
Index: src/sys/arch/sparc/dev/fd.c
diff -u src/sys/arch/sparc/dev/fd.c:1.158 src/sys/arch/sparc/dev/fd.c:1.159
--- src/sys/arch/sparc/dev/fd.c:1.158 Mon Sep 3 16:29:27 2018
+++ src/sys/arch/sparc/dev/fd.c Fri Feb 8 08:47:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.158 2018/09/03 16:29:27 riastradh Exp $ */
+/* $NetBSD: fd.c,v 1.159 2019/02/08 08:47:35 mrg Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.158 2018/09/03 16:29:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.159 2019/02/08 08:47:35 mrg Exp $");
#include "opt_ddb.h"
#include "opt_md.h"
@@ -225,7 +225,7 @@ CFATTACH_DECL_NEW(fdc_mainbus, sizeof(st
CFATTACH_DECL_NEW(fdc_obio, sizeof(struct fdc_softc),
fdcmatch_obio, fdcattach_obio, NULL, NULL);
-inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
+static struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
/*
* Floppies come in various flavors, e.g., 1.2MB vs 1.44MB; here is how
@@ -839,7 +839,7 @@ bool fdsuspend(device_t self, const pmf_
}
-inline struct fd_type *
+static struct fd_type *
fd_dev_to_type(struct fd_softc *fd, dev_t dev)
{
int type = FDTYPE(dev);
Index: src/sys/arch/sparc64/dev/fdc.c
diff -u src/sys/arch/sparc64/dev/fdc.c:1.46 src/sys/arch/sparc64/dev/fdc.c:1.47
--- src/sys/arch/sparc64/dev/fdc.c:1.46 Tue Feb 5 06:10:53 2019
+++ src/sys/arch/sparc64/dev/fdc.c Fri Feb 8 08:47:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fdc.c,v 1.46 2019/02/05 06:10:53 mrg Exp $ */
+/* $NetBSD: fdc.c,v 1.47 2019/02/08 08:47:35 mrg Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdc.c,v 1.46 2019/02/05 06:10:53 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdc.c,v 1.47 2019/02/08 08:47:35 mrg Exp $");
#include "opt_ddb.h"
#include "opt_md.h"
@@ -257,7 +257,7 @@ CFATTACH_DECL_NEW(fdc_ebus, sizeof(struc
fdcmatch_ebus, fdcattach_ebus, NULL, NULL);
#endif
-static inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
+static struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
/*
* Floppies come in various flavors, e.g., 1.2MB vs 1.44MB; here is how
@@ -1012,7 +1012,7 @@ bool fdsuspend(device_t self, const pmf_
}
-static inline struct fd_type *
+static struct fd_type *
fd_dev_to_type(struct fd_softc *fd, dev_t dev)
{
int type = FDTYPE(dev);
Index: src/sys/arch/sun3/dev/fd.c
diff -u src/sys/arch/sun3/dev/fd.c:1.81 src/sys/arch/sun3/dev/fd.c:1.82
--- src/sys/arch/sun3/dev/fd.c:1.81 Mon Sep 3 16:29:28 2018
+++ src/sys/arch/sun3/dev/fd.c Fri Feb 8 08:47:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.81 2018/09/03 16:29:28 riastradh Exp $ */
+/* $NetBSD: fd.c,v 1.82 2019/02/08 08:47:35 mrg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.81 2018/09/03 16:29:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.82 2019/02/08 08:47:35 mrg Exp $");
#include "opt_ddb.h"
@@ -191,7 +191,7 @@ static void fdcattach(device_t, device_t
CFATTACH_DECL_NEW(fdc, sizeof(struct fdc_softc),
fdcmatch, fdcattach, NULL, NULL);
-static inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
+static struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
/*
* Floppies come in various flavors, e.g., 1.2MB vs 1.44MB; here is how
@@ -644,7 +644,7 @@ fd_shutdown(device_t self, int howto)
return true;
}
-static inline struct fd_type *
+static struct fd_type *
fd_dev_to_type(struct fd_softc *fd, dev_t dev)
{
int type = FDTYPE(dev);
Index: src/sys/arch/x68k/dev/fd.c
diff -u src/sys/arch/x68k/dev/fd.c:1.121 src/sys/arch/x68k/dev/fd.c:1.122
--- src/sys/arch/x68k/dev/fd.c:1.121 Mon Sep 3 16:29:28 2018
+++ src/sys/arch/x68k/dev/fd.c Fri Feb 8 08:47:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.121 2018/09/03 16:29:28 riastradh Exp $ */
+/* $NetBSD: fd.c,v 1.122 2019/02/08 08:47:35 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.121 2018/09/03 16:29:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.122 2019/02/08 08:47:35 mrg Exp $");
#include "opt_ddb.h"
#include "opt_m68k_arch.h"
@@ -315,7 +315,7 @@ void fdctimeout(void *);
void fdcpseudointr(void *);
void fdcretry(struct fdc_softc *);
void fdfinish(struct fd_softc *, struct buf *);
-struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
+static struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
int fdformat(dev_t, struct ne7_fd_formb *, struct lwp *);
static int fdcpoll(struct fdc_softc *);
static int fdgetdisklabel(struct fd_softc *, dev_t);
@@ -670,7 +670,7 @@ fdattach(device_t parent, device_t self,
RND_TYPE_DISK, RND_FLAG_DEFAULT);
}
-struct fd_type *
+static struct fd_type *
fd_dev_to_type(struct fd_softc *fd, dev_t dev)
{
size_t type = FDTYPE(dev);