Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141007951
D53409.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D53409.diff
View Options
diff --git a/sys/dev/bhnd/bcma/bcma_subr.c b/sys/dev/bhnd/bcma/bcma_subr.c
--- a/sys/dev/bhnd/bcma/bcma_subr.c
+++ b/sys/dev/bhnd/bcma/bcma_subr.c
@@ -239,7 +239,7 @@
dinfo->rid_agent = BCMA_AGENT_RID(dinfo);
dinfo->res_agent = BHND_BUS_ALLOC_RESOURCE(bus, bus, SYS_RES_MEMORY,
- &dinfo->rid_agent, r_start, r_end, r_count, RF_ACTIVE|RF_SHAREABLE);
+ dinfo->rid_agent, r_start, r_end, r_count, RF_ACTIVE|RF_SHAREABLE);
if (dinfo->res_agent == NULL) {
device_printf(bus, "failed allocating agent register block for "
"core %u\n", BCMA_DINFO_COREIDX(dinfo));
diff --git a/sys/dev/bhnd/bhnd.h b/sys/dev/bhnd/bhnd.h
--- a/sys/dev/bhnd/bhnd.h
+++ b/sys/dev/bhnd/bhnd.h
@@ -617,7 +617,7 @@
device_t child,
struct bhnd_board_info *info);
struct bhnd_resource *bhnd_bus_generic_alloc_resource (device_t dev,
- device_t child, int type, int *rid,
+ device_t child, int type, int rid,
rman_res_t start, rman_res_t end,
rman_res_t count, u_int flags);
int bhnd_bus_generic_release_resource (device_t dev,
@@ -1292,7 +1292,7 @@
* @retval resource The allocated resource.
*/
static inline struct bhnd_resource *
-bhnd_alloc_resource(device_t dev, int type, int *rid, rman_res_t start,
+bhnd_alloc_resource(device_t dev, int type, int rid, rman_res_t start,
rman_res_t end, rman_res_t count, u_int flags)
{
return BHND_BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, type, rid,
@@ -1314,7 +1314,7 @@
* @retval resource The allocated resource.
*/
static inline struct bhnd_resource *
-bhnd_alloc_resource_any(device_t dev, int type, int *rid, u_int flags)
+bhnd_alloc_resource_any(device_t dev, int type, int rid, u_int flags)
{
return bhnd_alloc_resource(dev, type, rid, 0, ~0, 1, flags);
}
diff --git a/sys/dev/bhnd/bhnd_bus_if.m b/sys/dev/bhnd/bhnd_bus_if.m
--- a/sys/dev/bhnd/bhnd_bus_if.m
+++ b/sys/dev/bhnd/bhnd_bus_if.m
@@ -923,7 +923,7 @@
device_t dev;
device_t child;
int type;
- int *rid;
+ int rid;
rman_res_t start;
rman_res_t end;
rman_res_t count;
diff --git a/sys/dev/bhnd/bhnd_erom.c b/sys/dev/bhnd/bhnd_erom.c
--- a/sys/dev/bhnd/bhnd_erom.c
+++ b/sys/dev/bhnd/bhnd_erom.c
@@ -429,7 +429,7 @@
/* Try to allocate the new mapping */
iores->mapped_rid = iores->owner_rid;
iores->mapped = bhnd_alloc_resource(iores->owner, SYS_RES_MEMORY,
- &iores->mapped_rid, addr, addr+size-1, size,
+ iores->mapped_rid, addr, addr+size-1, size,
RF_ACTIVE|RF_SHAREABLE);
if (iores->mapped == NULL) {
iores->mapped_rid = -1;
diff --git a/sys/dev/bhnd/bhnd_subr.c b/sys/dev/bhnd/bhnd_subr.c
--- a/sys/dev/bhnd/bhnd_subr.c
+++ b/sys/dev/bhnd/bhnd_subr.c
@@ -1015,7 +1015,7 @@
res[i] = NULL;
for (u_int i = 0; rs[i].type != -1; i++) {
- res[i] = bhnd_alloc_resource_any(dev, rs[i].type, &rs[i].rid,
+ res[i] = bhnd_alloc_resource_any(dev, rs[i].type, rs[i].rid,
rs[i].flags);
/* Clean up all allocations on failure */
@@ -2190,7 +2190,7 @@
*/
struct bhnd_resource *
bhnd_bus_generic_alloc_resource(device_t dev, device_t child, int type,
- int *rid, rman_res_t start, rman_res_t end, rman_res_t count,
+ int rid, rman_res_t start, rman_res_t end, rman_res_t count,
u_int flags)
{
struct bhnd_resource *br;
@@ -2201,7 +2201,7 @@
res = NULL;
/* Allocate the real bus resource (without activating it) */
- res = BUS_ALLOC_RESOURCE(dev, child, type, *rid, start, end, count,
+ res = BUS_ALLOC_RESOURCE(dev, child, type, rid, start, end, count,
(flags & ~RF_ACTIVE));
if (res == NULL)
return (NULL);
@@ -2216,7 +2216,7 @@
/* Attempt activation */
if (flags & RF_ACTIVE) {
- error = BHND_BUS_ACTIVATE_RESOURCE(dev, child, type, *rid, br);
+ error = BHND_BUS_ACTIVATE_RESOURCE(dev, child, type, rid, br);
if (error)
goto failed;
}
diff --git a/sys/dev/bhnd/cores/chipc/chipc_gpio.c b/sys/dev/bhnd/cores/chipc/chipc_gpio.c
--- a/sys/dev/bhnd/cores/chipc/chipc_gpio.c
+++ b/sys/dev/bhnd/cores/chipc/chipc_gpio.c
@@ -139,7 +139,7 @@
CC_GPIO_LOCK_INIT(sc);
sc->mem_rid = 0;
- sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid,
+ sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid,
RF_ACTIVE|RF_SHAREABLE);
if (sc->mem_res == NULL) {
device_printf(dev, "failed to allocate chipcommon registers\n");
diff --git a/sys/dev/bhnd/cores/chipc/chipc_subr.c b/sys/dev/bhnd/cores/chipc/chipc_subr.c
--- a/sys/dev/bhnd/cores/chipc/chipc_subr.c
+++ b/sys/dev/bhnd/cores/chipc/chipc_subr.c
@@ -469,7 +469,7 @@
/* Allocate resource */
cr->cr_res = bhnd_alloc_resource(sc->dev,
- SYS_RES_MEMORY, &cr->cr_res_rid, cr->cr_addr,
+ SYS_RES_MEMORY, cr->cr_res_rid, cr->cr_addr,
cr->cr_end, cr->cr_count, RF_SHAREABLE);
if (cr->cr_res == NULL) {
CHIPC_UNLOCK(sc);
diff --git a/sys/dev/bhnd/cores/pci/bhnd_pci.c b/sys/dev/bhnd/cores/pci/bhnd_pci.c
--- a/sys/dev/bhnd/cores/pci/bhnd_pci.c
+++ b/sys/dev/bhnd/cores/pci/bhnd_pci.c
@@ -132,7 +132,7 @@
sizeof(bhnd_pci_devs[0]));
/* Allocate bus resources */
- sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid,
+ sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid,
RF_ACTIVE);
if (sc->mem_res == NULL)
return (ENXIO);
diff --git a/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c b/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c
--- a/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c
+++ b/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c
@@ -96,7 +96,7 @@
sizeof(bhnd_pcie2_devs[0]));
/* Allocate bus resources */
- sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid,
+ sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid,
RF_ACTIVE);
if (sc->mem_res == NULL)
return (ENXIO);
diff --git a/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c b/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c
--- a/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c
+++ b/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c
@@ -87,7 +87,7 @@
/* Allocate register block */
rid = 0;
- res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
+ res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, rid, RF_ACTIVE);
if (res == NULL) {
device_printf(dev, "failed to allocate resources\n");
return (ENXIO);
diff --git a/sys/dev/bhnd/nvram/bhnd_sprom.c b/sys/dev/bhnd/nvram/bhnd_sprom.c
--- a/sys/dev/bhnd/nvram/bhnd_sprom.c
+++ b/sys/dev/bhnd/nvram/bhnd_sprom.c
@@ -108,7 +108,7 @@
/* Allocate SPROM resource */
rid = 0;
- r = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
+ r = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, rid, RF_ACTIVE);
if (r == NULL) {
device_printf(dev, "failed to allocate resources\n");
return (ENXIO);
diff --git a/sys/dev/bhnd/siba/siba.c b/sys/dev/bhnd/siba/siba.c
--- a/sys/dev/bhnd/siba/siba.c
+++ b/sys/dev/bhnd/siba/siba.c
@@ -1220,7 +1220,7 @@
/* Map the config resource for bus-level access */
dinfo->cfg_rid[i] = SIBA_CFG_RID(dinfo, i);
dinfo->cfg_res[i] = BHND_BUS_ALLOC_RESOURCE(dev, dev,
- SYS_RES_MEMORY, &dinfo->cfg_rid[i], r_start, r_end,
+ SYS_RES_MEMORY, dinfo->cfg_rid[i], r_start, r_end,
r_count, RF_ACTIVE|RF_SHAREABLE);
if (dinfo->cfg_res[i] == NULL) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 31, 4:52 PM (11 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27416798
Default Alt Text
D53409.diff (7 KB)
Attached To
Mode
D53409: bhnd_bus_alloc_resource*: Pass rid by value
Attached
Detach File
Event Timeline
Log In to Comment