Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160291936
D53403.id165221.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D53403.id165221.diff
View Options
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1525,7 +1525,7 @@
* acpi_alloc_resource() will sub-alloc from the system
* resource.
*/
- resource_list_reserve(rl, dev, children[i], rle->type, &rle->rid,
+ resource_list_reserve(rl, dev, children[i], rle->type, rle->rid,
rle->start, rle->end, rle->count, 0);
}
}
diff --git a/sys/dev/dpaa2/dpaa2_rc.c b/sys/dev/dpaa2/dpaa2_rc.c
--- a/sys/dev/dpaa2/dpaa2_rc.c
+++ b/sys/dev/dpaa2/dpaa2_rc.c
@@ -3321,7 +3321,7 @@
/* Reserve a newly added DPAA2 resource. */
res = resource_list_reserve(&dinfo->resources, rcdev, child, devtype,
- rid, (rman_res_t) dpaa2_dev, (rman_res_t) dpaa2_dev, 1,
+ *rid, (rman_res_t) dpaa2_dev, (rman_res_t) dpaa2_dev, 1,
flags & ~RF_ACTIVE);
if (!res) {
device_printf(rcdev, "%s: failed to reserve %s (rid=%d) for: %s "
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -3481,7 +3481,7 @@
* driver for this device will later inherit this resource in
* pci_alloc_resource().
*/
- res = resource_list_reserve(rl, bus, dev, type, ®, start, end, count,
+ res = resource_list_reserve(rl, bus, dev, type, reg, start, end, count,
flags);
if ((pci_do_realloc_bars
|| pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_REALLOC_BAR))
@@ -3494,7 +3494,7 @@
*/
resource_list_delete(rl, type, reg);
resource_list_add(rl, type, reg, 0, ~0, count);
- res = resource_list_reserve(rl, bus, dev, type, ®, 0, ~0,
+ res = resource_list_reserve(rl, bus, dev, type, reg, 0, ~0,
count, flags);
}
if (res == NULL) {
@@ -3553,11 +3553,11 @@
} else {
rid = PCIR_BAR(0);
resource_list_add(rl, type, rid, 0x1f0, 0x1f7, 8);
- (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x1f0,
+ (void)resource_list_reserve(rl, bus, dev, type, rid, 0x1f0,
0x1f7, 8, 0);
rid = PCIR_BAR(1);
resource_list_add(rl, type, rid, 0x3f6, 0x3f6, 1);
- (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x3f6,
+ (void)resource_list_reserve(rl, bus, dev, type, rid, 0x3f6,
0x3f6, 1, 0);
}
if (progif & PCIP_STORAGE_IDE_MODESEC) {
@@ -3568,11 +3568,11 @@
} else {
rid = PCIR_BAR(2);
resource_list_add(rl, type, rid, 0x170, 0x177, 8);
- (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x170,
+ (void)resource_list_reserve(rl, bus, dev, type, rid, 0x170,
0x177, 8, 0);
rid = PCIR_BAR(3);
resource_list_add(rl, type, rid, 0x376, 0x376, 1);
- (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x376,
+ (void)resource_list_reserve(rl, bus, dev, type, rid, 0x376,
0x376, 1, 0);
}
pci_add_map(bus, dev, PCIR_BAR(4), rl, force,
@@ -3815,7 +3815,7 @@
struct resource *res;
char *cp;
rman_res_t start, end, count;
- int rid, sec_bus, sec_reg, sub_bus, sub_reg, sup_bus;
+ int sec_bus, sec_reg, sub_bus, sub_reg, sup_bus;
switch (cfg->hdrtype & PCIM_HDRTYPE) {
case PCIM_HDRTYPE_BRIDGE:
@@ -3895,8 +3895,7 @@
if (pci_clear_buses)
goto clear;
- rid = 0;
- res = resource_list_reserve(rl, bus, dev, PCI_RES_BUS, &rid,
+ res = resource_list_reserve(rl, bus, dev, PCI_RES_BUS, 0,
start, end, count, 0);
if (res != NULL)
return;
@@ -3945,7 +3944,7 @@
if (resource_list_find(rl, PCI_RES_BUS, rid) == NULL)
resource_list_add(rl, PCI_RES_BUS, rid, start, end, count);
if (!resource_list_reserved(rl, PCI_RES_BUS, rid)) {
- res = resource_list_reserve(rl, dev, child, PCI_RES_BUS, &rid,
+ res = resource_list_reserve(rl, dev, child, PCI_RES_BUS, rid,
start, end, count, flags & ~RF_ACTIVE);
if (res == NULL) {
resource_list_delete(rl, PCI_RES_BUS, rid);
@@ -4106,7 +4105,7 @@
continue;
resource_list_add(rl, type, rid, start, end, count);
- res = resource_list_reserve(rl, bus, dev, type, &rid, start, end, count,
+ res = resource_list_reserve(rl, bus, dev, type, rid, start, end, count,
flags);
if (res == NULL) {
resource_list_delete(rl, type, rid);
@@ -5591,7 +5590,7 @@
* appropriate BAR for that resource.
*/
resource_list_add(rl, type, *rid, start, end, count);
- res = resource_list_reserve(rl, dev, child, type, rid, start, end,
+ res = resource_list_reserve(rl, dev, child, type, *rid, start, end,
count, flags & ~RF_ACTIVE);
if (res == NULL) {
resource_list_delete(rl, type, *rid);
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -3078,7 +3078,7 @@
*/
struct resource *
resource_list_reserve(struct resource_list *rl, device_t bus, device_t child,
- int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
+ int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
{
struct resource_list_entry *rle = NULL;
int passthrough = (device_get_parent(child) != bus);
@@ -3091,10 +3091,10 @@
panic(
"resource_list_reserve() should only reserve inactive resources");
- r = resource_list_alloc(rl, bus, child, type, *rid, start, end, count,
+ r = resource_list_alloc(rl, bus, child, type, rid, start, end, count,
flags);
if (r != NULL) {
- rle = resource_list_find(rl, type, *rid);
+ rle = resource_list_find(rl, type, rid);
rle->flags |= RLE_RESERVED;
}
return (r);
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -393,7 +393,7 @@
struct resource *
resource_list_reserve(struct resource_list *rl,
device_t bus, device_t child,
- int type, int *rid,
+ int type, int rid,
rman_res_t start, rman_res_t end,
rman_res_t count, u_int flags);
int resource_list_unreserve(struct resource_list *rl,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 24, 12:02 AM (37 m, 29 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34264250
Default Alt Text
D53403.id165221.diff (5 KB)
Attached To
Mode
D53403: resource_list_reserve: Pass rid by value
Attached
Detach File
Event Timeline
Log In to Comment