Bug 186129 - ti mbox and pruss has params to mtx_init reversed
Summary: ti mbox and pruss has params to mtx_init reversed
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 1.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-26 14:10 UTC by tak.swd
Modified: 2014-01-27 17:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tak.swd 2014-01-26 14:10:00 UTC
Args are in wrong order to mtx_init(9)

(1)
http://svnweb.freebsd.org/base/head/sys/arm/ti/ti_mbox.c?revision=258209&view=markup#l143

now:
mtx_init(&sc->sc_mtx, "TI mbox", MTX_DEF, 0);

correct:
mtx_init(&sc->sc_mtx, "TI mbox", NULL, MTX_DEF);


(2)
http://svnweb.freebsd.org/base/head/sys/arm/ti/ti_pruss.c?revision=258210&view=markup#l169

now:
mtx_init(&sc->sc_mtx, "TI PRUSS", MTX_DEF, 0);

correct:
mtx_init(&sc->sc_mtx, "TI PRUSS", NULL, MTX_DEF);
Comment 1 dfilter service freebsd_committer freebsd_triage 2014-01-27 17:31:29 UTC
Author: jmg
Date: Mon Jan 27 17:31:21 2014
New Revision: 261211
URL: http://svnweb.freebsd.org/changeset/base/261211

Log:
  fix args to mtx_init
  
  Note that this commit hasn't been compile tested because these files
  are not hooked up to the build...
  
  PR:		186129
  Submitted by:	Takanori Sawada
  Approved by:	rpaulo

Modified:
  head/sys/arm/ti/ti_mbox.c
  head/sys/arm/ti/ti_pruss.c

Modified: head/sys/arm/ti/ti_mbox.c
==============================================================================
--- head/sys/arm/ti/ti_mbox.c	Mon Jan 27 13:28:55 2014	(r261210)
+++ head/sys/arm/ti/ti_mbox.c	Mon Jan 27 17:31:21 2014	(r261211)
@@ -140,7 +140,7 @@ ti_mbox_attach(device_t dev)
 	}
 	sc = device_get_softc(dev);
 	rid = 0;
-	mtx_init(&sc->sc_mtx, "TI mbox", MTX_DEF, 0);
+	mtx_init(&sc->sc_mtx, "TI mbox", NULL, MTX_DEF);
 	sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
 	    RF_ACTIVE);
 	if (sc->sc_mem_res == NULL) {

Modified: head/sys/arm/ti/ti_pruss.c
==============================================================================
--- head/sys/arm/ti/ti_pruss.c	Mon Jan 27 13:28:55 2014	(r261210)
+++ head/sys/arm/ti/ti_pruss.c	Mon Jan 27 17:31:21 2014	(r261211)
@@ -166,7 +166,7 @@ ti_pruss_attach(device_t dev)
 	}
 	sc = device_get_softc(dev);
 	rid = 0;
-	mtx_init(&sc->sc_mtx, "TI PRUSS", MTX_DEF, 0);
+	mtx_init(&sc->sc_mtx, "TI PRUSS", NULL, MTX_DEF);
 	sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
 	    RF_ACTIVE);
 	if (sc->sc_mem_res == NULL) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 2 John-Mark Gurney freebsd_committer freebsd_triage 2014-01-27 17:32:00 UTC
State Changed
From-To: open->closed

commited..  Thanks for the report...