Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Invert logic around nested pmf(9) registrations ...
details: https://anonhg.NetBSD.org/src/rev/9d92f26698ae
branches: trunk
changeset: 747204:9d92f26698ae
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Sep 05 14:09:55 2009 +0000
description:
Invert logic around nested pmf(9) registrations for readability.
diffstat:
sys/dev/pci/if_age.c | 10 +++++-----
sys/dev/pci/if_ale.c | 10 +++++-----
sys/dev/pci/if_bce.c | 10 +++++-----
sys/dev/pci/if_bge.c | 10 +++++-----
sys/dev/pci/if_bnx.c | 10 +++++-----
sys/dev/pci/if_ipw.c | 10 +++++-----
sys/dev/pci/if_iwi.c | 10 +++++-----
sys/dev/pci/if_iwn.c | 10 +++++-----
sys/dev/pci/if_lii.c | 10 +++++-----
sys/dev/pci/if_msk.c | 10 +++++-----
sys/dev/pci/if_nfe.c | 10 +++++-----
sys/dev/pci/if_sip.c | 10 +++++-----
sys/dev/pci/if_sk.c | 10 +++++-----
sys/dev/pci/if_wm.c | 10 +++++-----
sys/dev/pci/if_wpi.c | 10 +++++-----
15 files changed, 75 insertions(+), 75 deletions(-)
diffs (truncated from 480 to 300 lines):
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_age.c
--- a/sys/dev/pci/if_age.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_age.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_age.c,v 1.32 2009/08/05 15:29:51 cegger Exp $ */
+/* $NetBSD: if_age.c,v 1.33 2009/09/05 14:09:55 tsutsui Exp $ */
/* $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $ */
/*-
@@ -31,7 +31,7 @@
/* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.32 2009/08/05 15:29:51 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.33 2009/09/05 14:09:55 tsutsui Exp $");
#include "bpfilter.h"
#include "vlan.h"
@@ -290,10 +290,10 @@
if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr);
- if (!pmf_device_register(self, NULL, age_resume))
+ if (pmf_device_register(self, NULL, age_resume))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, ifp);
return;
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_ale.c
--- a/sys/dev/pci/if_ale.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_ale.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ale.c,v 1.7 2009/08/18 06:02:36 cegger Exp $ */
+/* $NetBSD: if_ale.c,v 1.8 2009/09/05 14:09:55 tsutsui Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari%FreeBSD.org@localhost>
@@ -32,7 +32,7 @@
/* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.7 2009/08/18 06:02:36 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.8 2009/09/05 14:09:55 tsutsui Exp $");
#include "bpfilter.h"
#include "vlan.h"
@@ -581,10 +581,10 @@
if_attach(ifp);
ether_ifattach(ifp, sc->ale_eaddr);
- if (!pmf_device_register(self, NULL, NULL))
+ if (pmf_device_register(self, NULL, NULL))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, ifp);
return;
fail:
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_bce.c
--- a/sys/dev/pci/if_bce.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_bce.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bce.c,v 1.26 2009/07/16 20:14:17 jakllsch Exp $ */
+/* $NetBSD: if_bce.c,v 1.27 2009/09/05 14:09:55 tsutsui Exp $ */
/*
* Copyright (c) 2003 Clifford Wright. All rights reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.26 2009/07/16 20:14:17 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.27 2009/09/05 14:09:55 tsutsui Exp $");
#include "bpfilter.h"
#include "vlan.h"
@@ -472,10 +472,10 @@
#endif
callout_init(&sc->bce_timeout, 0);
- if (!pmf_device_register(self, NULL, bce_resume)) {
+ if (pmf_device_register(self, NULL, bce_resume))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- } else
- pmf_class_network_register(self, ifp);
}
/* handle media, and ethernet requests */
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_bge.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.167 2009/07/25 13:52:47 msaitoh Exp $ */
+/* $NetBSD: if_bge.c,v 1.168 2009/09/05 14:09:55 tsutsui Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.167 2009/07/25 13:52:47 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.168 2009/09/05 14:09:55 tsutsui Exp $");
#include "bpfilter.h"
#include "vlan.h"
@@ -2647,10 +2647,10 @@
DPRINTFN(5, ("callout_init\n"));
callout_init(&sc->bge_timeout, 0);
- if (!pmf_device_register(self, NULL, NULL))
+ if (pmf_device_register(self, NULL, NULL))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, ifp);
}
static void
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_bnx.c
--- a/sys/dev/pci/if_bnx.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_bnx.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bnx.c,v 1.27 2009/05/05 10:21:22 cegger Exp $ */
+/* $NetBSD: if_bnx.c,v 1.28 2009/09/05 14:09:55 tsutsui Exp $ */
/* $OpenBSD: if_bnx.c,v 1.43 2007/01/30 03:21:10 krw Exp $ */
/*-
@@ -35,7 +35,7 @@
#if 0
__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
#endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.27 2009/05/05 10:21:22 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.28 2009/09/05 14:09:55 tsutsui Exp $");
/*
* The following controllers are supported by this driver:
@@ -699,10 +699,10 @@
callout_init(&sc->bnx_timeout, 0);
- if (!pmf_device_register(self, NULL, NULL))
+ if (pmf_device_register(self, NULL, NULL))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, ifp);
/* Print some important debugging info. */
DBRUN(BNX_INFO, bnx_dump_driver_state(sc));
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_ipw.c
--- a/sys/dev/pci/if_ipw.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_ipw.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ipw.c,v 1.48 2009/05/12 08:23:00 cegger Exp $ */
+/* $NetBSD: if_ipw.c,v 1.49 2009/09/05 14:09:55 tsutsui Exp $ */
/* FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp */
/*-
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.48 2009/05/12 08:23:00 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.49 2009/09/05 14:09:55 tsutsui Exp $");
/*-
* Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -327,10 +327,10 @@
*/
sc->dwelltime = 100;
- if (!pmf_device_register(self, NULL, NULL))
+ if (pmf_device_register(self, NULL, NULL))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, ifp);
ieee80211_announce(ic);
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_iwi.c
--- a/sys/dev/pci/if_iwi.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_iwi.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwi.c,v 1.81 2009/05/06 09:25:15 cegger Exp $ */
+/* $NetBSD: if_iwi.c,v 1.82 2009/09/05 14:09:55 tsutsui Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.81 2009/05/06 09:25:15 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.82 2009/09/05 14:09:55 tsutsui Exp $");
/*-
* Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -429,10 +429,10 @@
iwi_sysctlattach(sc);
- if (!pmf_device_register(self, NULL, NULL))
+ if (pmf_device_register(self, NULL, NULL))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, ifp);
ieee80211_announce(ic);
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_iwn.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwn.c,v 1.31 2009/05/12 08:23:00 cegger Exp $ */
+/* $NetBSD: if_iwn.c,v 1.32 2009/09/05 14:09:55 tsutsui Exp $ */
/*-
* Copyright (c) 2007
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.31 2009/05/12 08:23:00 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.32 2009/09/05 14:09:55 tsutsui Exp $");
/*
@@ -408,10 +408,10 @@
sc->amrr.amrr_min_success_threshold = 1;
sc->amrr.amrr_max_success_threshold = 15;
- if (!pmf_device_register(self, NULL, iwn_resume))
+ if (pmf_device_register(self, NULL, iwn_resume))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, ifp);
iwn_radiotap_attach(sc);
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_lii.c
--- a/sys/dev/pci/if_lii.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_lii.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lii.c,v 1.6 2009/04/26 06:56:46 cegger Exp $ */
+/* $NetBSD: if_lii.c,v 1.7 2009/09/05 14:09:55 tsutsui Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lii.c,v 1.6 2009/04/26 06:56:46 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lii.c,v 1.7 2009/09/05 14:09:55 tsutsui Exp $");
#include "bpfilter.h"
@@ -340,10 +340,10 @@
if_attach(ifp);
ether_ifattach(ifp, eaddr);
- if (!pmf_device_register(self, NULL, NULL))
+ if (pmf_device_register(self, NULL, NULL))
+ pmf_class_network_register(self, ifp);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, ifp);
return;
diff -r 685e4f90bac8 -r 9d92f26698ae sys/dev/pci/if_msk.c
--- a/sys/dev/pci/if_msk.c Sat Sep 05 13:50:15 2009 +0000
+++ b/sys/dev/pci/if_msk.c Sat Sep 05 14:09:55 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.27 2009/05/12 08:23:00 cegger Exp $ */
+/* $NetBSD: if_msk.c,v 1.28 2009/09/05 14:09:55 tsutsui Exp $ */
/* $OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $ */
/*
@@ -52,7 +52,7 @@
*/
Home |
Main Index |
Thread Index |
Old Index