svn commit: r194023 - in head/sys/dev: ncv nsp pdq snc stg ubsec wb wi

Andriy Gapon avg at FreeBSD.org
Thu Jun 11 17:14:30 UTC 2009


Author: avg
Date: Thu Jun 11 17:14:28 2009
New Revision: 194023
URL: http://svn.freebsd.org/changeset/base/194023

Log:
  strict kobj sigs: fix assortment of device_detach and device_shutdown impls
  
  with common issue of having void return type instead of int
  
  Reviewed by:	imp, current@
  Approved by:	jhb (mentor)

Modified:
  head/sys/dev/ncv/ncr53c500_pccard.c
  head/sys/dev/nsp/nsp_pccard.c
  head/sys/dev/pdq/if_fpa.c
  head/sys/dev/snc/if_snc.c
  head/sys/dev/snc/if_sncvar.h
  head/sys/dev/stg/tmc18c30.h
  head/sys/dev/stg/tmc18c30_subr.c
  head/sys/dev/ubsec/ubsec.c
  head/sys/dev/wb/if_wb.c
  head/sys/dev/wi/if_wi.c
  head/sys/dev/wi/if_wivar.h

Modified: head/sys/dev/ncv/ncr53c500_pccard.c
==============================================================================
--- head/sys/dev/ncv/ncr53c500_pccard.c	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/ncv/ncr53c500_pccard.c	Thu Jun 11 17:14:28 2009	(r194023)
@@ -260,11 +260,13 @@ ncv_pccard_attach(device_t dev)
 	return(0);
 }
 
-static	void
+static	int
 ncv_pccard_detach(device_t dev)
 {
 	ncv_card_unload(dev);
 	ncv_release_resource(dev);
+
+	return (0);
 }
 
 static device_method_t ncv_pccard_methods[] = {

Modified: head/sys/dev/nsp/nsp_pccard.c
==============================================================================
--- head/sys/dev/nsp/nsp_pccard.c	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/nsp/nsp_pccard.c	Thu Jun 11 17:14:28 2009	(r194023)
@@ -200,11 +200,13 @@ nsp_pccard_attach(device_t dev)
 	return(0);
 }
 
-static void
+static int
 nsp_pccard_detach(device_t dev)
 {
 	nsp_card_unload(dev);
 	nsp_release_resource(dev);
+
+	return (0);
 }
 
 static device_method_t nsp_pccard_methods[] = {

Modified: head/sys/dev/pdq/if_fpa.c
==============================================================================
--- head/sys/dev/pdq/if_fpa.c	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/pdq/if_fpa.c	Thu Jun 11 17:14:28 2009	(r194023)
@@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$");
 static int	pdq_pci_probe		(device_t);
 static int	pdq_pci_attach		(device_t);
 static int	pdq_pci_detach		(device_t);
-static void	pdq_pci_shutdown	(device_t);
+static int	pdq_pci_shutdown	(device_t);
 static void	pdq_pci_ifintr		(void *);
 
 static void
@@ -185,7 +185,7 @@ pdq_pci_detach (dev)
     return (0);
 }
 
-static void
+static int
 pdq_pci_shutdown(device_t dev)
 {
     pdq_softc_t *sc;
@@ -193,7 +193,7 @@ pdq_pci_shutdown(device_t dev)
     sc = device_get_softc(dev);
     pdq_hwreset(sc->sc_pdq);
 
-    return;
+    return (0);
 }
 
 static device_method_t pdq_pci_methods[] = {

Modified: head/sys/dev/snc/if_snc.c
==============================================================================
--- head/sys/dev/snc/if_snc.c	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/snc/if_snc.c	Thu Jun 11 17:14:28 2009	(r194023)
@@ -252,7 +252,7 @@ snc_attach(dev)
   Shutdown routine
  ****************************************************************/
 
-void
+int
 snc_shutdown(dev)
 	device_t dev;
 {
@@ -261,4 +261,6 @@ snc_shutdown(dev)
 	SNC_LOCK(sc);
 	sncshutdown(sc);
 	SNC_UNLOCK(sc);
+
+	return (0);
 }

Modified: head/sys/dev/snc/if_sncvar.h
==============================================================================
--- head/sys/dev/snc/if_sncvar.h	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/snc/if_sncvar.h	Thu Jun 11 17:14:28 2009	(r194023)
@@ -44,4 +44,4 @@ int	snc_alloc_irq		(device_t, int, int);
 int	snc_probe		(device_t, int);
 int	snc_attach		(device_t);
 
-void	snc_shutdown		(device_t);
+int	snc_shutdown		(device_t);

Modified: head/sys/dev/stg/tmc18c30.h
==============================================================================
--- head/sys/dev/stg/tmc18c30.h	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/stg/tmc18c30.h	Thu Jun 11 17:14:28 2009	(r194023)
@@ -8,5 +8,5 @@ int	stg_alloc_resource	(device_t);
 void	stg_release_resource	(device_t);
 int	stg_probe		(device_t);
 int	stg_attach		(device_t);
-void	stg_detach		(device_t);
+int	stg_detach		(device_t);
 void	stg_intr		(void *);

Modified: head/sys/dev/stg/tmc18c30_subr.c
==============================================================================
--- head/sys/dev/stg/tmc18c30_subr.c	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/stg/tmc18c30_subr.c	Thu Jun 11 17:14:28 2009	(r194023)
@@ -162,7 +162,7 @@ stg_attach(device_t dev)
 	return(STGIOSZ);
 }
 
-void
+int
 stg_detach (device_t dev)
 {
 	struct stg_softc *sc = device_get_softc(dev);
@@ -173,7 +173,7 @@ stg_detach (device_t dev)
 	scsi_low_dettach(&sc->sc_sclow);
 	splx(s);
 	stg_release_resource(dev);
-	return;
+	return (0);
 }
 
 void

Modified: head/sys/dev/ubsec/ubsec.c
==============================================================================
--- head/sys/dev/ubsec/ubsec.c	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/ubsec/ubsec.c	Thu Jun 11 17:14:28 2009	(r194023)
@@ -107,7 +107,7 @@ static	int ubsec_attach(device_t);
 static	int ubsec_detach(device_t);
 static	int ubsec_suspend(device_t);
 static	int ubsec_resume(device_t);
-static	void ubsec_shutdown(device_t);
+static	int ubsec_shutdown(device_t);
 
 static	int ubsec_newsession(device_t, u_int32_t *, struct cryptoini *);
 static	int ubsec_freesession(device_t, u_int64_t);
@@ -558,12 +558,13 @@ ubsec_detach(device_t dev)
  * Stop all chip i/o so that the kernel's probe routines don't
  * get confused by errant DMAs when rebooting.
  */
-static void
+static int
 ubsec_shutdown(device_t dev)
 {
 #ifdef notyet
 	ubsec_stop(device_get_softc(dev));
 #endif
+	return (0);
 }
 
 /*

Modified: head/sys/dev/wb/if_wb.c
==============================================================================
--- head/sys/dev/wb/if_wb.c	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/wb/if_wb.c	Thu Jun 11 17:14:28 2009	(r194023)
@@ -159,7 +159,7 @@ static void wb_init(void *);
 static void wb_init_locked(struct wb_softc *);
 static void wb_stop(struct wb_softc *);
 static void wb_watchdog(struct ifnet *);
-static void wb_shutdown(device_t);
+static int wb_shutdown(device_t);
 static int wb_ifmedia_upd(struct ifnet *);
 static void wb_ifmedia_sts(struct ifnet *, struct ifmediareq *);
 
@@ -1832,7 +1832,7 @@ wb_stop(sc)
  * Stop all chip I/O so that the kernel's probe routines don't
  * get confused by errant DMAs when rebooting.
  */
-static void
+static int
 wb_shutdown(dev)
 	device_t		dev;
 {
@@ -1844,5 +1844,5 @@ wb_shutdown(dev)
 	wb_stop(sc);
 	WB_UNLOCK(sc);
 
-	return;
+	return (0);
 }

Modified: head/sys/dev/wi/if_wi.c
==============================================================================
--- head/sys/dev/wi/if_wi.c	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/wi/if_wi.c	Thu Jun 11 17:14:28 2009	(r194023)
@@ -571,12 +571,13 @@ wi_vap_delete(struct ieee80211vap *vap)
 	free(wvp, M_80211_VAP);
 }
 
-void
+int
 wi_shutdown(device_t dev)
 {
 	struct wi_softc *sc = device_get_softc(dev);
 
 	wi_stop(sc, 1);
+	return (0);
 }
 
 void

Modified: head/sys/dev/wi/if_wivar.h
==============================================================================
--- head/sys/dev/wi/if_wivar.h	Thu Jun 11 17:10:21 2009	(r194022)
+++ head/sys/dev/wi/if_wivar.h	Thu Jun 11 17:14:28 2009	(r194023)
@@ -176,7 +176,7 @@ struct wi_card_ident {
 
 int	wi_attach(device_t);
 int	wi_detach(device_t);
-void	wi_shutdown(device_t);
+int	wi_shutdown(device_t);
 int	wi_alloc(device_t, int);
 void	wi_free(device_t);
 extern devclass_t wi_devclass;


More information about the svn-src-head mailing list