summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorflxd <flxd@NetBSD.org>2016-12-12 17:03:40 +0000
committerflxd <flxd@NetBSD.org>2016-12-12 17:03:40 +0000
commit467dd4aee459b8488e2b78ea53dbb6ddd5bc60aa (patch)
tree811df6f1fc4ff093596a37388f2412de8b104d9e /sys
parent4011c52ee11b1079b5a63bbed0cd351a804082b8 (diff)
Clean-up (remove redundant declarations, concentrate checks).
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/tc/tcasic.c5
-rw-r--r--sys/arch/pmax/tc/tcbus.c6
-rw-r--r--sys/dev/tc/tc.c25
3 files changed, 17 insertions, 19 deletions
diff --git a/sys/arch/alpha/tc/tcasic.c b/sys/arch/alpha/tc/tcasic.c
index 285281a6bbf..7d1faebb78e 100644
--- a/sys/arch/alpha/tc/tcasic.c
+++ b/sys/arch/alpha/tc/tcasic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tcasic.c,v 1.44 2012/02/06 02:14:16 matt Exp $ */
+/* $NetBSD: tcasic.c,v 1.45 2016/12/12 17:03:40 flxd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1.44 2012/02/06 02:14:16 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1.45 2016/12/12 17:03:40 flxd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -179,7 +179,6 @@ extern void mfb_cnattach(tc_addr_t);
extern void tfb_cnattach(tc_addr_t);
extern void px_cnattach(tc_addr_t);
extern void pxg_cnattach(tc_addr_t);
-extern int tc_checkslot(tc_addr_t, char *);
struct cnboards {
const char *cb_tcname;
diff --git a/sys/arch/pmax/tc/tcbus.c b/sys/arch/pmax/tc/tcbus.c
index 26b8a5928fd..8100a977c30 100644
--- a/sys/arch/pmax/tc/tcbus.c
+++ b/sys/arch/pmax/tc/tcbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tcbus.c,v 1.31 2016/11/16 19:37:06 macallan Exp $ */
+/* $NetBSD: tcbus.c,v 1.32 2016/12/12 17:03:41 flxd Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcbus.c,v 1.31 2016/11/16 19:37:06 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcbus.c,v 1.32 2016/12/12 17:03:41 flxd Exp $");
#define _PMAX_BUS_DMA_PRIVATE
/*
@@ -179,8 +179,6 @@ tc_ds_get_dma_tag(int slot)
#include <pmax/pmax/cons.h>
#include <pmax/dec_prom.h>
-int tc_checkslot(tc_addr_t, char *);
-
struct cnboards {
const char *cb_tcname;
void (*cb_cnattach)(tc_addr_t);
diff --git a/sys/dev/tc/tc.c b/sys/dev/tc/tc.c
index 76ccb525b95..31bec2d934b 100644
--- a/sys/dev/tc/tc.c
+++ b/sys/dev/tc/tc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tc.c,v 1.53 2016/07/19 18:27:27 christos Exp $ */
+/* $NetBSD: tc.c,v 1.54 2016/12/12 17:03:41 flxd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.53 2016/07/19 18:27:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.54 2016/12/12 17:03:41 flxd Exp $");
#include "opt_tcverbose.h"
@@ -209,6 +209,17 @@ static const tc_offset_t tc_slot_romoffs[] = {
static int
tc_check_romp(const struct tc_rommap *romp)
{
+
+ switch (romp->tcr_width.v) {
+ case 1:
+ case 2:
+ case 4:
+ break;
+
+ default:
+ return 0;
+ }
+
if (romp->tcr_stride.v != 4)
return 0;
@@ -232,16 +243,6 @@ tc_checkslot(tc_addr_t slotbase, char *namep)
romp = (struct tc_rommap *)
(slotbase + tc_slot_romoffs[i]);
- switch (romp->tcr_width.v) {
- case 1:
- case 2:
- case 4:
- break;
-
- default:
- continue;
- }
-
if (!tc_check_romp(romp))
continue;