Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/marvell Cleanup foo_match().
details: https://anonhg.NetBSD.org/src/rev/65f67413bef5
branches: trunk
changeset: 756777:65f67413bef5
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sun Aug 01 06:57:06 2010 +0000
description:
Cleanup foo_match().
+ Remove check for model.
+ Remove unnecessary null line.
diffstat:
sys/dev/marvell/gtidmac.c | 8 ++------
sys/dev/marvell/gtmpsc.c | 20 +++-----------------
sys/dev/marvell/gtpci.c | 23 +++++------------------
sys/dev/marvell/gttwsi.c | 5 ++---
sys/dev/marvell/if_gfe.c | 12 ++----------
sys/dev/marvell/mvpex.c | 23 +++--------------------
sys/dev/marvell/mvsata_mv.c | 11 +++++------
7 files changed, 22 insertions(+), 80 deletions(-)
diffs (274 lines):
diff -r 7fc82818a817 -r 65f67413bef5 sys/dev/marvell/gtidmac.c
--- a/sys/dev/marvell/gtidmac.c Sun Aug 01 06:47:16 2010 +0000
+++ b/sys/dev/marvell/gtidmac.c Sun Aug 01 06:57:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gtidmac.c,v 1.5 2010/07/20 11:47:59 kiyohara Exp $ */
+/* $NetBSD: gtidmac.c,v 1.6 2010/08/01 06:57:06 kiyohara Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.5 2010/07/20 11:47:59 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.6 2010/08/01 06:57:06 kiyohara Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -285,10 +285,6 @@
if (strcmp(mva->mva_name, match->cf_name) != 0)
return 0;
-
- if (mva->mva_model == MARVELL_ORION_1_88F6082)
- return 0;
-
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
mva->mva_irq == MVA_IRQ_DEFAULT)
return 0;
diff -r 7fc82818a817 -r 65f67413bef5 sys/dev/marvell/gtmpsc.c
--- a/sys/dev/marvell/gtmpsc.c Sun Aug 01 06:47:16 2010 +0000
+++ b/sys/dev/marvell/gtmpsc.c Sun Aug 01 06:57:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gtmpsc.c,v 1.39 2010/07/11 08:43:36 kiyohara Exp $ */
+/* $NetBSD: gtmpsc.c,v 1.40 2010/08/01 06:57:06 kiyohara Exp $ */
/*
* Copyright (c) 2009 KIYOHARA Takashi
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.39 2010/07/11 08:43:36 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.40 2010/08/01 06:57:06 kiyohara Exp $");
#include "opt_kgdb.h"
@@ -216,21 +216,7 @@
if (strcmp(mva->mva_name, match->cf_name) != 0)
return 0;
-
- switch (mva->mva_model) {
- case MARVELL_DISCOVERY:
- case MARVELL_DISCOVERY_II:
- case MARVELL_DISCOVERY_III:
-#if 0
- case MARVELL_DISCOVERY_LT:
-#endif
- break;
-
- default:
- return 0;
- }
- if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
- mva->mva_irq == MVA_IRQ_DEFAULT)
+ if (mva->mva_offset == MVA_OFFSET_DEFAULT)
return 0;
mva->mva_size = GTMPSC_SIZE;
diff -r 7fc82818a817 -r 65f67413bef5 sys/dev/marvell/gtpci.c
--- a/sys/dev/marvell/gtpci.c Sun Aug 01 06:47:16 2010 +0000
+++ b/sys/dev/marvell/gtpci.c Sun Aug 01 06:57:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gtpci.c,v 1.26 2010/07/11 08:43:36 kiyohara Exp $ */
+/* $NetBSD: gtpci.c,v 1.27 2010/08/01 06:57:06 kiyohara Exp $ */
/*
* Copyright (c) 2008, 2009 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.26 2010/07/11 08:43:36 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.27 2010/08/01 06:57:06 kiyohara Exp $");
#include "opt_pci.h"
#include "pci.h"
@@ -90,6 +90,8 @@
if (strcmp(mva->mva_name, match->cf_name) != 0)
return 0;
+ if (mva->mva_unit == MVA_UNIT_DEFAULT)
+ return 0;
switch (mva->mva_model) {
case MARVELL_DISCOVERY:
case MARVELL_DISCOVERY_II:
@@ -99,23 +101,8 @@
case MARVELL_DISCOVERY_V:
case MARVELL_DISCOVERY_VI:
#endif
- if (mva->mva_unit == MVA_UNIT_DEFAULT ||
- mva->mva_offset != MVA_OFFSET_DEFAULT)
+ if (mva->mva_offset != MVA_OFFSET_DEFAULT)
return 0;
- break;
-
- case MARVELL_ORION_1_88F5180N:
- case MARVELL_ORION_1_88F5181:
- case MARVELL_ORION_1_88F5182:
- case MARVELL_ORION_2_88F5281:
- case MARVELL_ORION_1_88W8660:
- if (mva->mva_offset == MVA_OFFSET_DEFAULT)
- return 0;
- mva->mva_unit = 0; /* unit 0 only */
- break;
-
- default:
- return 0;
}
mva->mva_size = GTPCI_SIZE;
diff -r 7fc82818a817 -r 65f67413bef5 sys/dev/marvell/gttwsi.c
--- a/sys/dev/marvell/gttwsi.c Sun Aug 01 06:47:16 2010 +0000
+++ b/sys/dev/marvell/gttwsi.c Sun Aug 01 06:57:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gttwsi.c,v 1.2 2010/07/11 08:43:36 kiyohara Exp $ */
+/* $NetBSD: gttwsi.c,v 1.3 2010/08/01 06:57:06 kiyohara Exp $ */
/*
* Copyright (c) 2008 Eiji Kawauchi.
* All rights reserved.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gttwsi.c,v 1.2 2010/07/11 08:43:36 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gttwsi.c,v 1.3 2010/08/01 06:57:06 kiyohara Exp $");
#include "locators.h"
#include <sys/param.h>
@@ -157,7 +157,6 @@
if (strcmp(mva->mva_name, match->cf_name) != 0)
return 0;
-
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
mva->mva_irq == MVA_IRQ_DEFAULT)
return 0;
diff -r 7fc82818a817 -r 65f67413bef5 sys/dev/marvell/if_gfe.c
--- a/sys/dev/marvell/if_gfe.c Sun Aug 01 06:47:16 2010 +0000
+++ b/sys/dev/marvell/if_gfe.c Sun Aug 01 06:57:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gfe.c,v 1.37 2010/07/11 08:43:36 kiyohara Exp $ */
+/* $NetBSD: if_gfe.c,v 1.38 2010/08/01 06:57:06 kiyohara Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.37 2010/07/11 08:43:36 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.38 2010/08/01 06:57:06 kiyohara Exp $");
#include "opt_inet.h"
#include "rnd.h"
@@ -218,14 +218,6 @@
if (strcmp(mva->mva_name, cf->cf_name) != 0)
return 0;
-
- switch (mva->mva_model) {
- case MARVELL_DISCOVERY:
- break;
-
- default:
- return 0;
- }
if (mva->mva_offset == MVA_OFFSET_DEFAULT)
return 0;
diff -r 7fc82818a817 -r 65f67413bef5 sys/dev/marvell/mvpex.c
--- a/sys/dev/marvell/mvpex.c Sun Aug 01 06:47:16 2010 +0000
+++ b/sys/dev/marvell/mvpex.c Sun Aug 01 06:57:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mvpex.c,v 1.1 2010/07/13 11:16:02 kiyohara Exp $ */
+/* $NetBSD: mvpex.c,v 1.2 2010/08/01 06:57:06 kiyohara Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.1 2010/07/13 11:16:02 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.2 2010/08/01 06:57:06 kiyohara Exp $");
#include "opt_pci.h"
#include "pci.h"
@@ -87,25 +87,8 @@
{
struct marvell_attach_args *mva = aux;
- switch (mva->mva_model) {
-#if 0
- case MARVELL_DISCOVERY_V:
- case MARVELL_DISCOVERY_VI:
-#endif
- case MARVELL_ORION_1_88F1181:
- case MARVELL_ORION_1_88F5082:
- case MARVELL_ORION_1_88F5180N:
- case MARVELL_ORION_1_88F5181:
- case MARVELL_ORION_1_88F5182:
- case MARVELL_ORION_1_88F6082:
- case MARVELL_ORION_1_88W8660:
- case MARVELL_ORION_2_88F1281:
- case MARVELL_ORION_2_88F5281:
- break;
-
- default:
+ if (strcmp(mva->mva_name, match->cf_name) != 0)
return 0;
- }
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
mva->mva_irq == MVA_IRQ_DEFAULT)
return 0;
diff -r 7fc82818a817 -r 65f67413bef5 sys/dev/marvell/mvsata_mv.c
--- a/sys/dev/marvell/mvsata_mv.c Sun Aug 01 06:47:16 2010 +0000
+++ b/sys/dev/marvell/mvsata_mv.c Sun Aug 01 06:57:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mvsata_mv.c,v 1.1 2010/07/13 13:05:05 kiyohara Exp $ */
+/* $NetBSD: mvsata_mv.c,v 1.2 2010/08/01 06:57:06 kiyohara Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsata_mv.c,v 1.1 2010/07/13 13:05:05 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata_mv.c,v 1.2 2010/08/01 06:57:06 kiyohara Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -90,19 +90,16 @@
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F5182, 1, 2, gen2e, 0 },
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6082, 1, 1, gen2e, 0 },
-#if 0
/* Kirkwood */
- /* 88F6190 has a port */
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6192, 1, 2, gen2e, 0 },
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6281, 1, 2, gen2e, 0 },
+#if 0
/* Discovery Inovation */
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78200, 1, 2, gen2e, 0 },
/* MV76100 has a port */
{ PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78100, 1, 2, gen2e, 0 },
#endif
-
- { -1, -1, 0, 0, gen_unknown, 0 }
};
@@ -113,6 +110,8 @@
struct marvell_attach_args *mva = aux;
int i;
+ if (strcmp(mva->mva_name, match->cf_name) != 0)
+ return 0;
if (mva->mva_offset == MVA_OFFSET_DEFAULT ||
mva->mva_irq == MVA_IRQ_DEFAULT)
return 0;
Home |
Main Index |
Thread Index |
Old Index