Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sgimips/mace Checking for IP32 in each driver is re...



details:   https://anonhg.NetBSD.org/src/rev/d3178a67bb79
branches:  trunk
changeset: 557837:d3178a67bb79
user:      sekiya <sekiya%NetBSD.org@localhost>
date:      Mon Jan 19 10:28:28 2004 +0000

description:
Checking for IP32 in each driver is redundant -- they're attached as children
of mace, so it is sufficient to perform the check in mace_match().  Pointed
out by soren@.

diffstat:

 sys/arch/sgimips/mace/com_mace.c     |   8 +++-----
 sys/arch/sgimips/mace/if_mec_mace.c  |   6 ++----
 sys/arch/sgimips/mace/lpt_mace.c     |   9 +++------
 sys/arch/sgimips/mace/mcclock_mace.c |   8 +++-----
 sys/arch/sgimips/mace/pci_mace.c     |   9 +++------
 sys/arch/sgimips/mace/pckbc_mace.c   |  10 +++-------
 6 files changed, 17 insertions(+), 33 deletions(-)

diffs (176 lines):

diff -r a72e5530a65d -r d3178a67bb79 sys/arch/sgimips/mace/com_mace.c
--- a/sys/arch/sgimips/mace/com_mace.c  Mon Jan 19 08:42:20 2004 +0000
+++ b/sys/arch/sgimips/mace/com_mace.c  Mon Jan 19 10:28:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com_mace.c,v 1.2 2004/01/19 00:30:17 sekiya Exp $      */
+/*     $NetBSD: com_mace.c,v 1.3 2004/01/19 10:28:28 sekiya Exp $      */
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_mace.c,v 1.2 2004/01/19 00:30:17 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_mace.c,v 1.3 2004/01/19 10:28:28 sekiya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,9 +81,7 @@
        struct cfdata *match;
        void *aux;
 {
-       if (mach_type == MACH_SGI_IP32)
-               return 1;
-       return 0;
+       return 1;
 }
 
 static void
diff -r a72e5530a65d -r d3178a67bb79 sys/arch/sgimips/mace/if_mec_mace.c
--- a/sys/arch/sgimips/mace/if_mec_mace.c       Mon Jan 19 08:42:20 2004 +0000
+++ b/sys/arch/sgimips/mace/if_mec_mace.c       Mon Jan 19 10:28:28 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mec_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $        */
+/* $NetBSD: if_mec_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $        */
 
 /*
  * Copyright (c) 2003 Christopher SEKIYA
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mec_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mec_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -188,8 +188,6 @@
 static int
 mec_match(struct device * parent, struct cfdata * match, void *aux)
 {
-       if (mach_type != MACH_SGI_IP32)
-               return 0;
        return 1;
 }
 
diff -r a72e5530a65d -r d3178a67bb79 sys/arch/sgimips/mace/lpt_mace.c
--- a/sys/arch/sgimips/mace/lpt_mace.c  Mon Jan 19 08:42:20 2004 +0000
+++ b/sys/arch/sgimips/mace/lpt_mace.c  Mon Jan 19 10:28:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lpt_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $      */
+/*     $NetBSD: lpt_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $      */
 
 /*
  * Copyright (c) 2003 Christopher SEKIYA 
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpt_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -80,10 +80,7 @@
        void *aux;
 {
 
-       if (mach_type == MACH_SGI_IP32)
-               return (1);
-
-       return (0);
+       return 1;
 }
 
 static void
diff -r a72e5530a65d -r d3178a67bb79 sys/arch/sgimips/mace/mcclock_mace.c
--- a/sys/arch/sgimips/mace/mcclock_mace.c      Mon Jan 19 08:42:20 2004 +0000
+++ b/sys/arch/sgimips/mace/mcclock_mace.c      Mon Jan 19 10:28:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcclock_mace.c,v 1.2 2004/01/19 00:30:17 sekiya Exp $  */
+/*     $NetBSD: mcclock_mace.c,v 1.3 2004/01/19 10:28:28 sekiya Exp $  */
 
 /*
  * Copyright (c) 2001 Antti Kantee.  All Rights Reserved.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.2 2004/01/19 00:30:17 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.3 2004/01/19 10:28:28 sekiya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -113,9 +113,7 @@
 static int
 mcclock_mace_match(struct device *parent, struct cfdata *match, void *aux)
 {
-       if (mach_type == MACH_SGI_IP32)
-               return 1;
-       return 0;
+       return 1;
 }
 
 void
diff -r a72e5530a65d -r d3178a67bb79 sys/arch/sgimips/mace/pci_mace.c
--- a/sys/arch/sgimips/mace/pci_mace.c  Mon Jan 19 08:42:20 2004 +0000
+++ b/sys/arch/sgimips/mace/pci_mace.c  Mon Jan 19 10:28:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $      */
+/*     $NetBSD: pci_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $      */
 
 /*
  * Copyright (c) 2001,2003 Christopher Sekiya
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -104,10 +104,7 @@
        void *aux;
 {
 
-       if (mach_type == MACH_SGI_IP32)
-               return (1);
-
-       return (0);
+       return (1);
 }
 
 static void
diff -r a72e5530a65d -r d3178a67bb79 sys/arch/sgimips/mace/pckbc_mace.c
--- a/sys/arch/sgimips/mace/pckbc_mace.c        Mon Jan 19 08:42:20 2004 +0000
+++ b/sys/arch/sgimips/mace/pckbc_mace.c        Mon Jan 19 10:28:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pckbc_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $    */
+/*     $NetBSD: pckbc_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $    */
 
 /*
  * Copyright (c) 2003 Christopher SEKIYA
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -74,11 +74,7 @@
        struct cfdata *match;
        void *aux;
 {
-
-       if (mach_type == MACH_SGI_IP32)
-               return (1);
-
-       return (0);
+       return (1);
 }
 
 static void



Home | Main Index | Thread Index | Old Index