diff options
| author | flxd <flxd@NetBSD.org> | 2016-12-12 17:03:40 +0000 |
|---|---|---|
| committer | flxd <flxd@NetBSD.org> | 2016-12-12 17:03:40 +0000 |
| commit | 467dd4aee459b8488e2b78ea53dbb6ddd5bc60aa (patch) | |
| tree | 811df6f1fc4ff093596a37388f2412de8b104d9e /sys/dev/tc | |
| parent | 4011c52ee11b1079b5a63bbed0cd351a804082b8 (diff) | |
Clean-up (remove redundant declarations, concentrate checks).
Diffstat (limited to 'sys/dev/tc')
| -rw-r--r-- | sys/dev/tc/tc.c | 25 |
1 files changed, 13 insertions, 12 deletions
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; |
