Page MenuHomeFreeBSD

D5255.id13231.diff
No OneTemporary

D5255.id13231.diff

Index: sys/arm/arm/nexus.c
===================================================================
--- sys/arm/arm/nexus.c
+++ sys/arm/arm/nexus.c
@@ -159,7 +159,7 @@
{
mem_rman.rm_start = 0;
- mem_rman.rm_end = ~0ul;
+ mem_rman.rm_end = ~0;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory addresses";
if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0))
Index: sys/arm/at91/at91.c
===================================================================
--- sys/arm/at91/at91.c
+++ sys/arm/at91/at91.c
@@ -164,7 +164,7 @@
return (NULL);
if (rle->res)
panic("Resource rid %d type %d already in use", *rid, type);
- if (start == 0UL && end == ~0UL) {
+ if (start == 0 && end == ~0) {
start = rle->start;
count = ulmax(count, rle->count);
end = ulmax(rle->end, start + count - 1);
Index: sys/arm/at91/at91_pinctrl.c
===================================================================
--- sys/arm/at91/at91_pinctrl.c
+++ sys/arm/at91/at91_pinctrl.c
@@ -280,7 +280,7 @@
* Request for the default allocation with a given rid: use resource
* list stored in the local device info.
*/
- if ((start == 0UL) && (end == ~0UL)) {
+ if ((start == 0) && (end == ~0)) {
if ((di = device_get_ivars(child)) == NULL)
return (NULL);
Index: sys/arm/cavium/cns11xx/econa.c
===================================================================
--- sys/arm/cavium/cns11xx/econa.c
+++ sys/arm/cavium/cns11xx/econa.c
@@ -425,7 +425,7 @@
}
if (rle->res)
panic("Resource rid %d type %d already in use", *rid, type);
- if (start == 0UL && end == ~0UL) {
+ if (start == 0 && end == ~0) {
start = rle->start;
count = ulmax(count, rle->count);
end = ulmax(rle->end, start + count - 1);
Index: sys/arm/mv/mv_localbus.c
===================================================================
--- sys/arm/mv/mv_localbus.c
+++ sys/arm/mv/mv_localbus.c
@@ -341,7 +341,7 @@
* Request for the default allocation with a given rid: use resource
* list stored in the local device info.
*/
- if ((start == 0UL) && (end == ~0UL)) {
+ if ((start == 0) && (end == ~0)) {
if ((di = device_get_ivars(child)) == NULL)
return (NULL);
Index: sys/arm/mv/mv_pci.c
===================================================================
--- sys/arm/mv/mv_pci.c
+++ sys/arm/mv/mv_pci.c
@@ -848,7 +848,7 @@
type, rid, start, end, count, flags));
};
- if ((start == 0UL) && (end == ~0UL)) {
+ if ((start == 0) && (end == ~0)) {
start = sc->sc_mem_base;
end = sc->sc_mem_base + sc->sc_mem_size - 1;
count = sc->sc_mem_size;
Index: sys/arm64/arm64/gic_v3_fdt.c
===================================================================
--- sys/arm64/arm64/gic_v3_fdt.c
+++ sys/arm64/arm64/gic_v3_fdt.c
@@ -180,7 +180,7 @@
struct resource_list_entry *rle;
int ranges_len;
- if ((start == 0UL) && (end == ~0UL)) {
+ if ((start == 0) && (end == ~0)) {
if ((di = device_get_ivars(child)) == NULL)
return (NULL);
if (type != SYS_RES_MEMORY)
Index: sys/arm64/arm64/nexus.c
===================================================================
--- sys/arm64/arm64/nexus.c
+++ sys/arm64/arm64/nexus.c
@@ -146,13 +146,13 @@
{
mem_rman.rm_start = 0;
- mem_rman.rm_end = ~0ul;
+ mem_rman.rm_end = ~0;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory addresses";
if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0))
panic("nexus_attach mem_rman");
irq_rman.rm_start = 0;
- irq_rman.rm_end = ~0ul;
+ irq_rman.rm_end = ~0;
irq_rman.rm_type = RMAN_ARRAY;
irq_rman.rm_descr = "Interrupts";
if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0))
@@ -216,7 +216,7 @@
* (ie. they aren't maintained by a child bus), then work out
* the start/end values.
*/
- if ((start == 0UL) && (end == ~0UL) && (count == 1)) {
+ if ((start == 0) && (end == ~0) && (count == 1)) {
if (device_get_parent(child) != bus || ndev == NULL)
return(NULL);
rle = resource_list_find(&ndev->nx_resources, type, *rid);
Index: sys/arm64/cavium/thunder_pcie.c
===================================================================
--- sys/arm64/cavium/thunder_pcie.c
+++ sys/arm64/cavium/thunder_pcie.c
@@ -292,7 +292,7 @@
type, rid, start, end, count, flags));
};
- if ((start == 0UL) && (end == ~0UL)) {
+ if ((start == 0) && (end == ~0)) {
/* Read BAR manually to get resource address and size */
pci_read_bar(child, *rid, &map, &testval, NULL);
Index: sys/arm64/cavium/thunder_pcie_pem.c
===================================================================
--- sys/arm64/cavium/thunder_pcie_pem.c
+++ sys/arm64/cavium/thunder_pcie_pem.c
@@ -447,7 +447,7 @@
end, count, flags));
};
- if ((start == 0UL) && (end == ~0UL)) {
+ if ((start == 0) && (end == ~0)) {
device_printf(dev,
"Cannot allocate resource with unspecified range\n");
goto fail;
Index: sys/dev/aac/aac.c
===================================================================
--- sys/dev/aac/aac.c
+++ sys/dev/aac/aac.c
@@ -1781,7 +1781,7 @@
bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, rid,
sc->aac_regs_res1);
sc->aac_regs_res1 = bus_alloc_resource(sc->aac_dev,
- SYS_RES_MEMORY, &rid, 0ul, ~0ul, atu_size, RF_ACTIVE);
+ SYS_RES_MEMORY, &rid, 0, ~0, atu_size, RF_ACTIVE);
if (sc->aac_regs_res1 == NULL) {
sc->aac_regs_res1 = bus_alloc_resource_any(
sc->aac_dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
Index: sys/dev/aacraid/aacraid.c
===================================================================
--- sys/dev/aacraid/aacraid.c
+++ sys/dev/aacraid/aacraid.c
@@ -1665,7 +1665,7 @@
sc->aac_regs_rid0, sc->aac_regs_res0);
sc->aac_regs_res0 = bus_alloc_resource(
sc->aac_dev, SYS_RES_MEMORY, &sc->aac_regs_rid0,
- 0ul, ~0ul, atu_size, RF_ACTIVE);
+ 0, ~0, atu_size, RF_ACTIVE);
if (sc->aac_regs_res0 == NULL) {
sc->aac_regs_res0 = bus_alloc_resource_any(
sc->aac_dev, SYS_RES_MEMORY,
Index: sys/dev/acpica/acpi.c
===================================================================
--- sys/dev/acpica/acpi.c
+++ sys/dev/acpica/acpi.c
@@ -460,7 +460,7 @@
panic("acpi rman_init IO ports failed");
acpi_rman_mem.rm_type = RMAN_ARRAY;
acpi_rman_mem.rm_start = 0;
- acpi_rman_mem.rm_end = ~0ul;
+ acpi_rman_mem.rm_end = ~0;
acpi_rman_mem.rm_descr = "ACPI I/O memory addresses";
if (rman_init(&acpi_rman_mem) != 0)
panic("acpi rman_init memory failed");
@@ -1330,7 +1330,7 @@
struct resource_list_entry *rle;
struct resource_list *rl;
struct resource *res;
- int isdefault = (start == 0UL && end == ~0UL);
+ int isdefault = (start == 0 && end == ~0);
/*
* First attempt at allocating the resource. For direct children,
Index: sys/dev/aha/aha_isa.c
===================================================================
--- sys/dev/aha/aha_isa.c
+++ sys/dev/aha/aha_isa.c
@@ -121,7 +121,7 @@
port_rid = 0;
aha->port = bus_alloc_resource(dev, SYS_RES_IOPORT, &port_rid,
- 0ul, ~0ul, AHA_NREGS, RF_ACTIVE);
+ 0, ~0, AHA_NREGS, RF_ACTIVE);
if (aha->port == NULL)
return (ENXIO);
@@ -192,7 +192,7 @@
aha->dev = dev;
aha->portrid = 0;
aha->port = bus_alloc_resource(dev, SYS_RES_IOPORT, &aha->portrid,
- 0ul, ~0ul, AHA_NREGS, RF_ACTIVE);
+ 0, ~0, AHA_NREGS, RF_ACTIVE);
if (!aha->port) {
device_printf(dev, "Unable to allocate I/O ports\n");
goto fail;
Index: sys/dev/aic/aic_isa.c
===================================================================
--- sys/dev/aic/aic_isa.c
+++ sys/dev/aic/aic_isa.c
@@ -76,7 +76,7 @@
rid = 0;
sc->sc_port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, AIC_ISA_PORTSIZE, RF_ACTIVE);
+ 0, ~0, AIC_ISA_PORTSIZE, RF_ACTIVE);
if (!sc->sc_port) {
device_printf(dev, "I/O port allocation failed\n");
return (ENOMEM);
Index: sys/dev/aic/aic_pccard.c
===================================================================
--- sys/dev/aic/aic_pccard.c
+++ sys/dev/aic/aic_pccard.c
@@ -78,7 +78,7 @@
rid = 0;
sc->sc_port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, AIC_PCCARD_PORTSIZE, RF_ACTIVE);
+ 0, ~0, AIC_PCCARD_PORTSIZE, RF_ACTIVE);
if (!sc->sc_port)
return (ENOMEM);
Index: sys/dev/amdsbwd/amdsbwd.c
===================================================================
--- sys/dev/amdsbwd/amdsbwd.c
+++ sys/dev/amdsbwd/amdsbwd.c
@@ -395,7 +395,7 @@
return (ENXIO);
}
rid = 0;
- res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul,
+ res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
AMDSB_PMIO_WIDTH, RF_ACTIVE | RF_SHAREABLE);
if (res == NULL) {
device_printf(dev, "bus_alloc_resource for IO failed\n");
Index: sys/dev/an/if_an.c
===================================================================
--- sys/dev/an/if_an.c
+++ sys/dev/an/if_an.c
@@ -395,7 +395,7 @@
struct resource *res;
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, size, RF_ACTIVE);
+ 0, ~0, size, RF_ACTIVE);
if (res) {
sc->port_rid = rid;
sc->port_res = res;
@@ -414,7 +414,7 @@
struct resource *res;
res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
- 0ul, ~0ul, size, RF_ACTIVE);
+ 0, ~0, size, RF_ACTIVE);
if (res) {
sc->mem_rid = rid;
sc->mem_res = res;
@@ -434,7 +434,7 @@
struct resource *res;
res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
- 0ul, ~0ul, size, RF_ACTIVE);
+ 0, ~0, size, RF_ACTIVE);
if (res) {
sc->mem_aux_rid = rid;
sc->mem_aux_res = res;
Index: sys/dev/arcmsr/arcmsr.c
===================================================================
--- sys/dev/arcmsr/arcmsr.c
+++ sys/dev/arcmsr/arcmsr.c
@@ -4143,7 +4143,7 @@
u_int32_t rid0 = PCIR_BAR(0);
vm_offset_t mem_base0;
- acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0ul, ~0ul, 0x1000, RF_ACTIVE);
+ acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0, ~0, 0x1000, RF_ACTIVE);
if(acb->sys_res_arcmsr[0] == NULL) {
arcmsr_free_resource(acb);
printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev));
@@ -4178,10 +4178,10 @@
for(i=0; i < 2; i++) {
if(i == 0) {
acb->sys_res_arcmsr[i] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid[i],
- 0ul, ~0ul, size, RF_ACTIVE);
+ 0, ~0, size, RF_ACTIVE);
} else {
acb->sys_res_arcmsr[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid[i],
- 0ul, ~0ul, sizeof(struct HBB_RWBUFFER), RF_ACTIVE);
+ 0, ~0, sizeof(struct HBB_RWBUFFER), RF_ACTIVE);
}
if(acb->sys_res_arcmsr[i] == NULL) {
arcmsr_free_resource(acb);
@@ -4224,7 +4224,7 @@
u_int32_t rid0 = PCIR_BAR(1);
vm_offset_t mem_base0;
- acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0ul, ~0ul, sizeof(struct HBC_MessageUnit), RF_ACTIVE);
+ acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0, ~0, sizeof(struct HBC_MessageUnit), RF_ACTIVE);
if(acb->sys_res_arcmsr[0] == NULL) {
arcmsr_free_resource(acb);
printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev));
@@ -4251,7 +4251,7 @@
u_int32_t rid0 = PCIR_BAR(0);
vm_offset_t mem_base0;
- acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0ul, ~0ul, sizeof(struct HBD_MessageUnit), RF_ACTIVE);
+ acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, &rid0, 0, ~0, sizeof(struct HBD_MessageUnit), RF_ACTIVE);
if(acb->sys_res_arcmsr[0] == NULL) {
arcmsr_free_resource(acb);
printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev));
@@ -4323,7 +4323,7 @@
}
/* After setting up the adapter, map our interrupt */
rid = 0;
- irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0ul, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE);
+ irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
if(irqres == NULL ||
#if __FreeBSD_version >= 700025
bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE, NULL, arcmsr_intr_handler, acb, &acb->ih)) {
Index: sys/dev/ata/chipsets/ata-promise.c
===================================================================
--- sys/dev/ata/chipsets/ata-promise.c
+++ sys/dev/ata/chipsets/ata-promise.c
@@ -191,7 +191,7 @@
!BUS_READ_IVAR(device_get_parent(GRANDPARENT(dev)),
GRANDPARENT(dev), PCI_IVAR_DEVID, &devid) &&
((devid == ATA_DEC_21150) || (devid == ATA_DEC_21150_1))) {
- static long start = 0, end = 0;
+ static rman_res_t start = 0, end = 0;
if (pci_get_slot(dev) == 1) {
bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &end);
Index: sys/dev/cm/if_cm_isa.c
===================================================================
--- sys/dev/cm/if_cm_isa.c
+++ sys/dev/cm/if_cm_isa.c
@@ -64,7 +64,7 @@
rid = 0;
sc->port_res = bus_alloc_resource(
- dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, CM_IO_PORTS, RF_ACTIVE);
+ dev, SYS_RES_IOPORT, &rid, 0, ~0, CM_IO_PORTS, RF_ACTIVE);
if (sc->port_res == NULL)
return (ENOENT);
@@ -75,7 +75,7 @@
rid = 0;
sc->mem_res = bus_alloc_resource(
- dev, SYS_RES_MEMORY, &rid, 0ul, ~0ul, CM_MEM_SIZE, RF_ACTIVE);
+ dev, SYS_RES_MEMORY, &rid, 0, ~0, CM_MEM_SIZE, RF_ACTIVE);
if (sc->mem_res == NULL) {
cm_release_resources(dev);
return (ENOENT);
Index: sys/dev/cs/if_cs.c
===================================================================
--- sys/dev/cs/if_cs.c
+++ sys/dev/cs/if_cs.c
@@ -407,7 +407,7 @@
struct resource *res;
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, size, RF_ACTIVE);
+ 0, ~0, size, RF_ACTIVE);
if (res == NULL)
return (ENOENT);
sc->port_rid = rid;
Index: sys/dev/ct/ct_isa.c
===================================================================
--- sys/dev/ct/ct_isa.c
+++ sys/dev/ct/ct_isa.c
@@ -318,7 +318,7 @@
*memhp = NULL;
port_rid = 0;
- *iohp = bus_alloc_resource(dev, SYS_RES_IOPORT, &port_rid, 0ul, ~0ul,
+ *iohp = bus_alloc_resource(dev, SYS_RES_IOPORT, &port_rid, 0, ~0,
BSHW_IOSZ, RF_ACTIVE);
if (*iohp == NULL)
return ENXIO;
@@ -327,7 +327,7 @@
return 0;
mem_rid = 0;
- *memhp = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid, 0ul, ~0ul,
+ *memhp = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid, 0, ~0,
BSHW_MEMSZ, RF_ACTIVE);
if (*memhp == NULL) {
bus_release_resource(dev, SYS_RES_IOPORT, port_rid, *iohp);
Index: sys/dev/cy/cy_isa.c
===================================================================
--- sys/dev/cy/cy_isa.c
+++ sys/dev/cy/cy_isa.c
@@ -81,7 +81,7 @@
mem_rid = 0;
mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid,
- 0ul, ~0ul, 0ul, RF_ACTIVE);
+ 0, ~0, 0, RF_ACTIVE);
if (mem_res == NULL) {
device_printf(dev, "ioport resource allocation failed\n");
return (ENXIO);
@@ -113,7 +113,7 @@
mem_rid = 0;
mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid,
- 0ul, ~0ul, 0ul, RF_ACTIVE);
+ 0, ~0, 0, RF_ACTIVE);
if (mem_res == NULL) {
device_printf(dev, "memory resource allocation failed\n");
goto fail;
@@ -127,7 +127,7 @@
}
irq_rid = 0;
- irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &irq_rid, 0ul, ~0ul, 0ul,
+ irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &irq_rid, 0, ~0, 0,
RF_SHAREABLE | RF_ACTIVE);
if (irq_res == NULL) {
device_printf(dev, "interrupt resource allocation failed\n");
Index: sys/dev/cy/cy_pci.c
===================================================================
--- sys/dev/cy/cy_pci.c
+++ sys/dev/cy/cy_pci.c
@@ -115,7 +115,7 @@
ioport_rid = CY_PCI_BASE_ADDR1;
ioport_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &ioport_rid,
- 0ul, ~0ul, 0ul, RF_ACTIVE);
+ 0, ~0, 0, RF_ACTIVE);
if (ioport_res == NULL) {
device_printf(dev, "ioport resource allocation failed\n");
goto fail;
@@ -124,7 +124,7 @@
mem_rid = CY_PCI_BASE_ADDR2;
mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid,
- 0ul, ~0ul, 0ul, RF_ACTIVE);
+ 0, ~0, 0, RF_ACTIVE);
if (mem_res == NULL) {
device_printf(dev, "memory resource allocation failed\n");
goto fail;
@@ -138,7 +138,7 @@
}
irq_rid = 0;
- irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &irq_rid, 0ul, ~0ul, 0ul,
+ irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &irq_rid, 0, ~0, 0,
RF_SHAREABLE | RF_ACTIVE);
if (irq_res == NULL) {
device_printf(dev, "interrupt resource allocation failed\n");
Index: sys/dev/digi/digi_isa.c
===================================================================
--- sys/dev/digi/digi_isa.c
+++ sys/dev/digi/digi_isa.c
@@ -278,7 +278,7 @@
/* Temporarily map our io ports */
sc->res.iorid = 0;
sc->res.io = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->res.iorid,
- 0ul, ~0ul, IO_SIZE, RF_ACTIVE);
+ 0, ~0, IO_SIZE, RF_ACTIVE);
if (sc->res.io == NULL)
return (ENXIO);
@@ -292,7 +292,7 @@
/* Temporarily map our memory */
sc->res.mrid = 0;
sc->res.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->res.mrid,
- 0ul, ~0ul, sc->win_size, 0);
+ 0, ~0, sc->win_size, 0);
if (sc->res.mem == NULL) {
device_printf(dev, "0x%lx: Memory range is in use\n", sc->pmem);
bus_release_resource(dev, SYS_RES_IOPORT, sc->res.iorid,
@@ -343,7 +343,7 @@
/* Allocate resources (verified in digi_isa_probe()) */
sc->res.iorid = 0;
sc->res.io = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->res.iorid,
- 0ul, ~0ul, iosize, RF_ACTIVE);
+ 0, ~0, iosize, RF_ACTIVE);
if (sc->res.io == NULL)
return (ENXIO);
@@ -357,7 +357,7 @@
sc->res.mrid = 0;
sc->res.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->res.mrid,
- 0ul, ~0ul, msize, RF_ACTIVE);
+ 0, ~0, msize, RF_ACTIVE);
if (sc->res.mem == NULL) {
device_printf(dev, "0x%lx: Memory range is in use\n", sc->pmem);
sc->hidewin(sc);
Index: sys/dev/drm2/i915/i915_dma.c
===================================================================
--- sys/dev/drm2/i915/i915_dma.c
+++ sys/dev/drm2/i915/i915_dma.c
@@ -1142,7 +1142,7 @@
vga = device_get_parent(dev->dev);
dev_priv->mch_res_rid = 0x100;
dev_priv->mch_res = BUS_ALLOC_RESOURCE(device_get_parent(vga),
- dev->dev, SYS_RES_MEMORY, &dev_priv->mch_res_rid, 0, ~0UL,
+ dev->dev, SYS_RES_MEMORY, &dev_priv->mch_res_rid, 0, ~0,
MCHBAR_SIZE, RF_ACTIVE | RF_SHAREABLE);
if (dev_priv->mch_res == NULL) {
DRM_DEBUG_DRIVER("failed bus alloc\n");
Index: sys/dev/ed/if_ed.c
===================================================================
--- sys/dev/ed/if_ed.c
+++ sys/dev/ed/if_ed.c
@@ -165,7 +165,7 @@
struct resource *res;
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, size, RF_ACTIVE);
+ 0, ~0, size, RF_ACTIVE);
if (res) {
sc->port_res = res;
sc->port_used = size;
@@ -186,7 +186,7 @@
struct resource *res;
res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
- 0ul, ~0ul, size, RF_ACTIVE);
+ 0, ~0, size, RF_ACTIVE);
if (res) {
sc->mem_res = res;
sc->mem_used = size;
Index: sys/dev/ed/if_ed_pccard.c
===================================================================
--- sys/dev/ed/if_ed_pccard.c
+++ sys/dev/ed/if_ed_pccard.c
@@ -510,7 +510,7 @@
if (rman_get_size(sc->port_res) == ED_NOVELL_IO_PORTS / 2) {
port_rid++;
sc->port_res2 = bus_alloc_resource(dev, SYS_RES_IOPORT,
- &port_rid, 0ul, ~0ul, 1, RF_ACTIVE);
+ &port_rid, 0, ~0, 1, RF_ACTIVE);
if (sc->port_res2 == NULL ||
rman_get_size(sc->port_res2) != ED_NOVELL_IO_PORTS / 2) {
error = ENXIO;
Index: sys/dev/eisa/eisaconf.c
===================================================================
--- sys/dev/eisa/eisaconf.c
+++ sys/dev/eisa/eisaconf.c
@@ -359,7 +359,7 @@
struct resource *rv, **rvp = 0;
isdefault = (device_get_parent(child) == dev &&
- start == 0UL && end == ~0UL && count == 1);
+ start == 0 && end == ~0 && count == 1);
switch (type) {
case SYS_RES_IRQ:
Index: sys/dev/fb/s3_pci.c
===================================================================
--- sys/dev/fb/s3_pci.c
+++ sys/dev/fb/s3_pci.c
@@ -479,7 +479,7 @@
*/
rid = 0;
if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) {
+ 0, ~0, 0, RF_ACTIVE | RF_SHAREABLE))) {
printf("%s: port resource allocation failed!\n", __func__);
goto error;
}
@@ -488,7 +488,7 @@
rid = 1;
if (!(sc->enh_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) {
+ 0, ~0, 0, RF_ACTIVE | RF_SHAREABLE))) {
printf("%s: enhanced port resource allocation failed!\n",
__func__);
goto error;
Index: sys/dev/fdc/fdc_isa.c
===================================================================
--- sys/dev/fdc/fdc_isa.c
+++ sys/dev/fdc/fdc_isa.c
@@ -90,7 +90,7 @@
for (rid = 0; ; rid++) {
newrid = rid;
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &newrid,
- 0ul, ~0ul, rid == 0 ? nport : 1, RF_ACTIVE);
+ 0, ~0, rid == 0 ? nport : 1, RF_ACTIVE);
if (res == NULL)
break;
/*
Index: sys/dev/fdc/fdc_pccard.c
===================================================================
--- sys/dev/fdc/fdc_pccard.c
+++ sys/dev/fdc/fdc_pccard.c
@@ -56,7 +56,7 @@
int rid, i;
rid = 0;
- res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, 1,
+ res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1,
RF_ACTIVE);
if (res == NULL) {
device_printf(dev, "cannot alloc I/O port range\n");
Index: sys/dev/fdt/simplebus.c
===================================================================
--- sys/dev/fdt/simplebus.c
+++ sys/dev/fdt/simplebus.c
@@ -335,7 +335,7 @@
* Request for the default allocation with a given rid: use resource
* list stored in the local device info.
*/
- if ((start == 0UL) && (end == ~0UL)) {
+ if ((start == 0) && (end == ~0)) {
if ((di = device_get_ivars(child)) == NULL)
return (NULL);
Index: sys/dev/fe/if_fe.c
===================================================================
--- sys/dev/fe/if_fe.c
+++ sys/dev/fe/if_fe.c
@@ -882,7 +882,7 @@
rid = 0;
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, size, RF_ACTIVE);
+ 0, ~0, size, RF_ACTIVE);
if (res) {
sc->port_used = size;
sc->port_res = res;
Index: sys/dev/gpio/gpiobus.c
===================================================================
--- sys/dev/gpio/gpiobus.c
+++ sys/dev/gpio/gpiobus.c
@@ -516,7 +516,7 @@
if (type != SYS_RES_IRQ)
return (NULL);
- isdefault = (start == 0UL && end == ~0UL && count == 1);
+ isdefault = (start == 0 && end == ~0 && count == 1);
rle = NULL;
if (isdefault) {
rl = BUS_GET_RESOURCE_LIST(bus, child);
Index: sys/dev/hpt27xx/hpt27xx_osm_bsd.c
===================================================================
--- sys/dev/hpt27xx/hpt27xx_osm_bsd.c
+++ sys/dev/hpt27xx/hpt27xx_osm_bsd.c
@@ -1261,7 +1261,7 @@
for (hba = vbus_ext->hba_list; hba; hba = hba->next) {
int rid = 0;
if ((hba->irq_res = bus_alloc_resource(hba->pcidev,
- SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
+ SYS_RES_IRQ, &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
{
os_printk("can't allocate interrupt");
return ;
Index: sys/dev/hptiop/hptiop.c
===================================================================
--- sys/dev/hptiop/hptiop.c
+++ sys/dev/hptiop/hptiop.c
@@ -2053,7 +2053,7 @@
rid = 0;
if ((hba->irq_res = bus_alloc_resource(hba->pcidev, SYS_RES_IRQ,
- &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) {
+ &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) {
device_printf(dev, "allocate irq failed!\n");
goto free_hba_path;
}
Index: sys/dev/hptmv/entry.c
===================================================================
--- sys/dev/hptmv/entry.c
+++ sys/dev/hptmv/entry.c
@@ -1990,7 +1990,7 @@
return rid;
rid = 0;
- if ((pAdapter->hpt_irq = bus_alloc_resource(pAdapter->hpt_dev, SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
+ if ((pAdapter->hpt_irq = bus_alloc_resource(pAdapter->hpt_dev, SYS_RES_IRQ, &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
{
hpt_printk(("can't allocate interrupt\n"));
return(ENXIO);
Index: sys/dev/hptnr/hptnr_osm_bsd.c
===================================================================
--- sys/dev/hptnr/hptnr_osm_bsd.c
+++ sys/dev/hptnr/hptnr_osm_bsd.c
@@ -1446,7 +1446,7 @@
for (hba = vbus_ext->hba_list; hba; hba = hba->next) {
int rid = 0;
if ((hba->irq_res = bus_alloc_resource(hba->pcidev,
- SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
+ SYS_RES_IRQ, &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
{
os_printk("can't allocate interrupt");
return ;
Index: sys/dev/hptrr/hptrr_osm_bsd.c
===================================================================
--- sys/dev/hptrr/hptrr_osm_bsd.c
+++ sys/dev/hptrr/hptrr_osm_bsd.c
@@ -1094,7 +1094,7 @@
for (hba = vbus_ext->hba_list; hba; hba = hba->next) {
int rid = 0;
if ((hba->irq_res = bus_alloc_resource(hba->pcidev,
- SYS_RES_IRQ, &rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
+ SYS_RES_IRQ, &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL)
{
os_printk("can't allocate interrupt");
return ;
Index: sys/dev/ichsmb/ichsmb_pci.c
===================================================================
--- sys/dev/ichsmb/ichsmb_pci.c
+++ sys/dev/ichsmb/ichsmb_pci.c
@@ -241,7 +241,7 @@
&sc->io_rid, 0, ~0, 16, RF_ACTIVE);
if (sc->io_res == NULL)
sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->io_rid, 0ul, ~0ul, 32, RF_ACTIVE);
+ &sc->io_rid, 0, ~0, 32, RF_ACTIVE);
if (sc->io_res == NULL) {
device_printf(dev, "can't map I/O\n");
error = ENXIO;
Index: sys/dev/if_ndis/if_ndis_pccard.c
===================================================================
--- sys/dev/if_ndis/if_ndis_pccard.c
+++ sys/dev/if_ndis/if_ndis_pccard.c
@@ -281,7 +281,7 @@
sc = arg;
rid = NDIS_AM_RID;
sc->ndis_res_am = bus_alloc_resource(sc->ndis_dev, SYS_RES_MEMORY,
- &rid, 0UL, ~0UL, 0x1000, RF_ACTIVE);
+ &rid, 0, ~0, 0x1000, RF_ACTIVE);
if (sc->ndis_res_am == NULL) {
device_printf(sc->ndis_dev,
Index: sys/dev/iicbus/iicoc.c
===================================================================
--- sys/dev/iicbus/iicoc.c
+++ sys/dev/iicbus/iicoc.c
@@ -208,7 +208,7 @@
mtx_init(&sc->sc_mtx, "iicoc", "iicoc", MTX_DEF);
sc->mem_rid = 0;
sc->mem_res = bus_alloc_resource(dev,
- SYS_RES_MEMORY, &sc->mem_rid, 0ul, ~0ul, 0x100, RF_ACTIVE);
+ SYS_RES_MEMORY, &sc->mem_rid, 0, ~0, 0x100, RF_ACTIVE);
if (sc->mem_res == NULL) {
device_printf(dev, "Could not allocate bus resource.\n");
Index: sys/dev/mca/mca_bus.c
===================================================================
--- sys/dev/mca/mca_bus.c
+++ sys/dev/mca/mca_bus.c
@@ -463,7 +463,7 @@
int isdefault;
int passthrough;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
passthrough = (device_get_parent(child) != dev);
if (!passthrough && !isdefault) {
Index: sys/dev/ntb/ntb_hw/ntb_hw.c
===================================================================
--- sys/dev/ntb/ntb_hw/ntb_hw.c
+++ sys/dev/ntb/ntb_hw/ntb_hw.c
@@ -749,7 +749,7 @@
* Ideally I could have just specified the size when I allocated the
* resource like:
* bus_alloc_resource(ntb->device,
- * SYS_RES_MEMORY, &bar->pci_resource_id, 0ul, ~0ul,
+ * SYS_RES_MEMORY, &bar->pci_resource_id, 0, ~0,
* 1ul << bar_size_bits, RF_ACTIVE);
* but the PCI driver does not honor the size in this call, so we have
* to modify it after the fact.
Index: sys/dev/oce/oce_hw.c
===================================================================
--- sys/dev/oce/oce_hw.c
+++ sys/dev/oce/oce_hw.c
@@ -270,7 +270,7 @@
else
sc->devcfg_res = bus_alloc_resource(sc->dev,
SYS_RES_MEMORY, &rr,
- 0ul, ~0ul, 32768,
+ 0, ~0, 32768,
RF_ACTIVE|RF_SHAREABLE);
if (!sc->devcfg_res)
Index: sys/dev/ofw/ofwbus.c
===================================================================
--- sys/dev/ofw/ofwbus.c
+++ sys/dev/ofw/ofwbus.c
@@ -186,7 +186,7 @@
struct resource_list_entry *rle;
int isdefault, passthrough;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
passthrough = (device_get_parent(child) != bus);
sc = device_get_softc(bus);
rle = NULL;
Index: sys/dev/pccard/pccard.c
===================================================================
--- sys/dev/pccard/pccard.c
+++ sys/dev/pccard/pccard.c
@@ -506,7 +506,7 @@
if (start)
end = start + ios->length - 1;
else
- end = ~0UL;
+ end = ~0;
DEVPRINTF((bus, "I/O rid %d start %#lx end %#lx\n",
i, start, end));
rid = i;
@@ -530,7 +530,7 @@
if (start)
end = start + mems->length - 1;
else
- end = ~0UL;
+ end = ~0;
DEVPRINTF((bus, "Memory rid %d start %#lx end %#lx\ncardaddr %#lx hostaddr %#lx length %#lx\n",
i, start, end, mems->cardaddr, mems->hostaddr,
mems->length));
@@ -1137,7 +1137,7 @@
struct pccard_ivar *dinfo;
struct resource_list_entry *rle = 0;
int passthrough = (device_get_parent(child) != dev);
- int isdefault = (start == 0 && end == ~0UL && count == 1);
+ int isdefault = (start == 0 && end == ~0 && count == 1);
struct resource *r = NULL;
/* XXX I'm no longer sure this is right */
Index: sys/dev/pci/pci.c
===================================================================
--- sys/dev/pci/pci.c
+++ sys/dev/pci/pci.c
@@ -3008,7 +3008,7 @@
flags |= RF_PREFETCHABLE;
if (basezero || base == pci_mapbase(testval) || pci_clear_bars) {
start = 0; /* Let the parent decide. */
- end = ~0ul;
+ end = ~0;
} else {
start = base;
end = base + count - 1;
@@ -3023,7 +3023,7 @@
*/
res = resource_list_reserve(rl, bus, dev, type, &reg, start, end, count,
flags);
- if (pci_do_realloc_bars && res == NULL && (start != 0 || end != ~0ul)) {
+ if (pci_do_realloc_bars && res == NULL && (start != 0 || end != ~0)) {
/*
* If the allocation fails, try to allocate a resource for
* this BAR using any available range. The firmware felt
@@ -3031,8 +3031,8 @@
* disable decoding if we can help it.
*/
resource_list_delete(rl, type, reg);
- resource_list_add(rl, type, reg, 0, ~0ul, count);
- res = resource_list_reserve(rl, bus, dev, type, &reg, 0, ~0ul,
+ resource_list_add(rl, type, reg, 0, ~0, count);
+ res = resource_list_reserve(rl, bus, dev, type, &reg, 0, ~0,
count, flags);
}
if (res == NULL) {
@@ -3423,7 +3423,7 @@
end = sub_bus;
count = end - start + 1;
- resource_list_add(rl, PCI_RES_BUS, 0, 0ul, ~0ul, count);
+ resource_list_add(rl, PCI_RES_BUS, 0, 0, ~0, count);
/*
* If requested, clear secondary bus registers in
Index: sys/dev/pci/pci_iov.c
===================================================================
--- sys/dev/pci/pci_iov.c
+++ sys/dev/pci/pci_iov.c
@@ -330,8 +330,8 @@
rid = iov->iov_pos + PCIR_SRIOV_BAR(bar);
bar_size = 1 << bar_shift;
- res = pci_alloc_multi_resource(bus, dev, SYS_RES_MEMORY, &rid, 0ul,
- ~0ul, 1, iov->iov_num_vfs, RF_ACTIVE);
+ res = pci_alloc_multi_resource(bus, dev, SYS_RES_MEMORY, &rid, 0,
+ ~0, 1, iov->iov_num_vfs, RF_ACTIVE);
if (res == NULL)
return (ENXIO);
@@ -498,7 +498,7 @@
int error;
iov->rman.rm_start = 0;
- iov->rman.rm_end = ~0ul;
+ iov->rman.rm_end = ~0;
iov->rman.rm_type = RMAN_ARRAY;
snprintf(iov->rman_name, sizeof(iov->rman_name), "%s VF I/O memory",
device_get_nameunit(pf));
Index: sys/dev/pci/pci_pci.c
===================================================================
--- sys/dev/pci/pci_pci.c
+++ sys/dev/pci/pci_pci.c
@@ -388,8 +388,8 @@
char buf[64];
int error, rid;
- if (max_address != (u_long)max_address)
- max_address = ~0ul;
+ if (max_address != (rman_res_t)max_address)
+ max_address = ~0;
w->rman.rm_start = 0;
w->rman.rm_end = max_address;
w->rman.rm_type = RMAN_ARRAY;
@@ -577,14 +577,14 @@
* if one exists, or a new bus range if one does not.
*/
rid = 0;
- bus->res = bus_alloc_resource(dev, PCI_RES_BUS, &rid, 0ul, ~0ul,
+ bus->res = bus_alloc_resource(dev, PCI_RES_BUS, &rid, 0, ~0,
min_count, 0);
if (bus->res == NULL) {
/*
* Fall back to just allocating a range of a single bus
* number.
*/
- bus->res = bus_alloc_resource(dev, PCI_RES_BUS, &rid, 0ul, ~0ul,
+ bus->res = bus_alloc_resource(dev, PCI_RES_BUS, &rid, 0, ~0,
1, 0);
} else if (rman_get_size(bus->res) < min_count)
/*
@@ -1389,7 +1389,7 @@
end = w->rman.rm_end;
if (start + count - 1 > end || start + count < start)
return (EINVAL);
- wmask = (1ul << w->step) - 1;
+ wmask = ((rman_res_t)1 << w->step) - 1;
/*
* If there is no resource at all, just try to allocate enough
@@ -1435,7 +1435,7 @@
device_printf(sc->dev,
"attempting to grow %s window for (%#lx-%#lx,%#lx)\n",
w->name, start, end, count);
- align = 1ul << RF_ALIGNMENT(flags);
+ align = (rman_res_t)1 << RF_ALIGNMENT(flags);
if (start < w->base) {
if (rman_first_free_region(&w->rman, &start_free, &end_free) !=
0 || start_free != w->base)
Index: sys/dev/pci/vga_pci.c
===================================================================
--- sys/dev/pci/vga_pci.c
+++ sys/dev/pci/vga_pci.c
@@ -164,8 +164,8 @@
#endif
rid = PCIR_BIOS;
- res = vga_pci_alloc_resource(dev, NULL, SYS_RES_MEMORY, &rid, 0ul,
- ~0ul, 1, RF_ACTIVE);
+ res = vga_pci_alloc_resource(dev, NULL, SYS_RES_MEMORY, &rid, 0,
+ ~0, 1, RF_ACTIVE);
if (res == NULL) {
return (NULL);
}
Index: sys/dev/puc/puc.c
===================================================================
--- sys/dev/puc/puc.c
+++ sys/dev/puc/puc.c
@@ -495,7 +495,7 @@
return (NULL);
/* We only support default allocations. */
- if (start != 0UL || end != ~0UL)
+ if (start != 0 || end != ~0)
return (NULL);
if (type == port->p_bar->b_type)
Index: sys/dev/quicc/quicc_core.c
===================================================================
--- sys/dev/quicc/quicc_core.c
+++ sys/dev/quicc/quicc_core.c
@@ -263,7 +263,7 @@
return (NULL);
/* We only support default allocations. */
- if (start != 0UL || end != ~0UL)
+ if (start != 0 || end != ~0)
return (NULL);
qd = device_get_ivars(child);
Index: sys/dev/rc/rc.c
===================================================================
--- sys/dev/rc/rc.c
+++ sys/dev/rc/rc.c
@@ -243,7 +243,7 @@
for (i = 0; i < IOBASE_ADDRS; i++) {
x = i;
sc->sc_port[i] = bus_alloc_resource(dev, SYS_RES_IOPORT, &x,
- 0ul, ~0ul, 0x10, RF_ACTIVE);
+ 0, ~0, 0x10, RF_ACTIVE);
if (x != i) {
device_printf(dev, "ioport %d was rid %d\n", i, x);
goto fail;
Index: sys/dev/sbni/if_sbni_isa.c
===================================================================
--- sys/dev/sbni/if_sbni_isa.c
+++ sys/dev/sbni/if_sbni_isa.c
@@ -87,7 +87,7 @@
sc = device_get_softc(dev);
sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid,
- 0ul, ~0ul, SBNI_PORTS, RF_ACTIVE);
+ 0, ~0, SBNI_PORTS, RF_ACTIVE);
if (!sc->io_res) {
printf("sbni: cannot allocate io ports!\n");
return (ENOENT);
Index: sys/dev/sbni/if_sbni_pci.c
===================================================================
--- sys/dev/sbni/if_sbni_pci.c
+++ sys/dev/sbni/if_sbni_pci.c
@@ -96,7 +96,7 @@
sc->io_rid = PCIR_BAR(0);
sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid,
- 0ul, ~0ul, ports, RF_ACTIVE);
+ 0, ~0, ports, RF_ACTIVE);
if (!sc->io_res) {
device_printf(dev, "cannot allocate io ports!\n");
if (sc->slave_sc)
Index: sys/dev/scc/scc_core.c
===================================================================
--- sys/dev/scc/scc_core.c
+++ sys/dev/scc/scc_core.c
@@ -417,7 +417,7 @@
return (NULL);
/* We only support default allocations. */
- if (start != 0UL || end != ~0UL)
+ if (start != 0 || end != ~0)
return (NULL);
m = device_get_ivars(child);
Index: sys/dev/sdhci/sdhci_pci.c
===================================================================
--- sys/dev/sdhci/sdhci_pci.c
+++ sys/dev/sdhci/sdhci_pci.c
@@ -331,7 +331,7 @@
/* Allocate memory. */
rid = PCIR_BAR(bar + i);
sc->mem_res[i] = bus_alloc_resource(dev, SYS_RES_MEMORY,
- &rid, 0ul, ~0ul, 0x100, RF_ACTIVE);
+ &rid, 0, ~0, 0x100, RF_ACTIVE);
if (sc->mem_res[i] == NULL) {
device_printf(dev, "Can't allocate memory for slot %d\n", i);
continue;
Index: sys/dev/siba/siba.c
===================================================================
--- sys/dev/siba/siba.c
+++ sys/dev/siba/siba.c
@@ -383,7 +383,7 @@
printf("%s: entry\n", __func__);
#endif
- isdefault = (start == 0UL && end == ~0UL && count == 1);
+ isdefault = (start == 0 && end == ~0 && count == 1);
needactivate = flags & RF_ACTIVE;
rl = BUS_GET_RESOURCE_LIST(bus, child);
rle = NULL;
Index: sys/dev/snc/if_snc.c
===================================================================
--- sys/dev/snc/if_snc.c
+++ sys/dev/snc/if_snc.c
@@ -73,7 +73,7 @@
struct resource *res;
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, SNEC_NREGS, RF_ACTIVE);
+ 0, ~0, SNEC_NREGS, RF_ACTIVE);
if (res) {
sc->ioport = res;
sc->ioport_rid = rid;
@@ -96,7 +96,7 @@
struct resource *res;
res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
- 0ul, ~0ul, SNEC_NMEMS, RF_ACTIVE);
+ 0, ~0, SNEC_NMEMS, RF_ACTIVE);
if (res) {
sc->iomem = res;
sc->iomem_rid = rid;
Index: sys/dev/snc/if_snc_cbus.c
===================================================================
--- sys/dev/snc/if_snc_cbus.c
+++ sys/dev/snc/if_snc_cbus.c
@@ -148,7 +148,7 @@
bus_set_resource(dev, SYS_RES_IOPORT, rid,
port, SNEC_NREGS);
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, SNEC_NREGS,
+ 0, ~0, SNEC_NREGS,
0 /* !RF_ACTIVE */);
if (res) break;
}
Index: sys/dev/wl/if_wl.c
===================================================================
--- sys/dev/wl/if_wl.c
+++ sys/dev/wl/if_wl.c
@@ -605,7 +605,7 @@
int ports = 16; /* Number of ports */
sc->res_ioport = bus_alloc_resource(device, SYS_RES_IOPORT,
- &sc->rid_ioport, 0ul, ~0ul, ports, RF_ACTIVE);
+ &sc->rid_ioport, 0, ~0, ports, RF_ACTIVE);
if (sc->res_ioport == NULL)
goto errexit;
Index: sys/dev/xe/if_xe.c
===================================================================
--- sys/dev/xe/if_xe.c
+++ sys/dev/xe/if_xe.c
@@ -1965,7 +1965,7 @@
if (!sc->modem) {
sc->port_rid = 0; /* 0 is managed by pccard */
sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->port_rid, 0ul, ~0ul, 16, RF_ACTIVE);
+ &sc->port_rid, 0, ~0, 16, RF_ACTIVE);
} else if (sc->dingo) {
/*
* Find a 16 byte aligned ioport for the card.
@@ -1999,7 +1999,7 @@
DEVPRINTF(1, (dev, "Finding I/O port for CEM2/CEM3\n"));
sc->ce2_port_rid = 0; /* 0 is managed by pccard */
sc->ce2_port_res = bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->ce2_port_rid, 0ul, ~0ul, 8, RF_ACTIVE);
+ &sc->ce2_port_rid, 0, ~0, 8, RF_ACTIVE);
if (sc->ce2_port_res == NULL) {
DEVPRINTF(1, (dev,
"Cannot allocate I/O port for modem\n"));
Index: sys/isa/isa_common.c
===================================================================
--- sys/isa/isa_common.c
+++ sys/isa/isa_common.c
@@ -483,7 +483,7 @@
if (!rle->res) {
rid = rle->rid;
resource_list_alloc(rl, dev, child, rle->type, &rid,
- 0ul, ~0ul, 1, 0);
+ 0, ~0, 1, 0);
}
}
}
Index: sys/kern/bus_if.m
===================================================================
--- sys/kern/bus_if.m
+++ sys/kern/bus_if.m
@@ -247,9 +247,9 @@
* @param _type the type of resource to allocate
* @param _rid a pointer to the resource identifier
* @param _start hint at the start of the resource range - pass
- * @c 0UL for any start address
+ * @c 0 for any start address
* @param _end hint at the end of the resource range - pass
- * @c ~0UL for any end address
+ * @c ~0 for any end address
* @param _count hint at the size of range required - pass @c 1
* for any size
* @param _flags any extra flags to control the resource
Index: sys/kern/subr_bus.c
===================================================================
--- sys/kern/subr_bus.c
+++ sys/kern/subr_bus.c
@@ -3236,9 +3236,9 @@
* @param type the type of resource to allocate
* @param rid a pointer to the resource identifier
* @param start hint at the start of the resource range - pass
- * @c 0UL for any start address
+ * @c 0 for any start address
* @param end hint at the end of the resource range - pass
- * @c ~0UL for any end address
+ * @c ~0 for any end address
* @param count hint at the size of range required - pass @c 1
* for any size
* @param flags any extra flags to control the resource
@@ -3293,9 +3293,9 @@
* @param type the type of resource to allocate
* @param rid a pointer to the resource identifier
* @param start hint at the start of the resource range - pass
- * @c 0UL for any start address
+ * @c 0 for any start address
* @param end hint at the end of the resource range - pass
- * @c ~0UL for any end address
+ * @c ~0 for any end address
* @param count hint at the size of range required - pass @c 1
* for any size
* @param flags any extra flags to control the resource
@@ -3311,7 +3311,7 @@
{
struct resource_list_entry *rle = NULL;
int passthrough = (device_get_parent(child) != bus);
- int isdefault = (start == 0UL && end == ~0UL);
+ int isdefault = (start == 0 && end == ~0);
if (passthrough) {
return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child,
Index: sys/kern/subr_rman.c
===================================================================
--- sys/kern/subr_rman.c
+++ sys/kern/subr_rman.c
@@ -135,7 +135,7 @@
}
if (rm->rm_start == 0 && rm->rm_end == 0)
- rm->rm_end = ~0ul;
+ rm->rm_end = ~0;
if (rm->rm_type == RMAN_UNINIT)
panic("rman_init");
if (rm->rm_type == RMAN_GAUGE)
@@ -174,7 +174,7 @@
/* Skip entries before us. */
TAILQ_FOREACH(s, &rm->rm_list, r_link) {
- if (s->r_end == ULONG_MAX)
+ if (s->r_end == ~0)
break;
if (s->r_end + 1 >= r->r_start)
break;
@@ -464,8 +464,8 @@
goto out;
}
- amask = (1ul << RF_ALIGNMENT(flags)) - 1;
- KASSERT(start <= ULONG_MAX - amask,
+ amask = ((rman_res_t)1 << RF_ALIGNMENT(flags)) - 1;
+ KASSERT(start <= RM_MAX_END - amask,
("start (%#lx) + amask (%#lx) would wrap around", start, amask));
/* If bound is 0, bmask will also be 0 */
@@ -484,7 +484,7 @@
s->r_start, end));
break;
}
- if (s->r_start > ULONG_MAX - amask) {
+ if (s->r_start > RM_MAX_END - amask) {
DPRINTF(("s->r_start (%#lx) + amask (%#lx) too large\n",
s->r_start, amask));
break;
Index: sys/mips/alchemy/obio.c
===================================================================
--- sys/mips/alchemy/obio.c
+++ sys/mips/alchemy/obio.c
@@ -232,7 +232,7 @@
struct rman *rm;
int isdefault, needactivate, passthrough;
- isdefault = (start == 0UL && end == ~0UL && count == 1);
+ isdefault = (start == 0 && end == ~0 && count == 1);
needactivate = flags & RF_ACTIVE;
passthrough = (device_get_parent(child) != bus);
rle = NULL;
Index: sys/mips/atheros/apb.c
===================================================================
--- sys/mips/atheros/apb.c
+++ sys/mips/atheros/apb.c
@@ -170,7 +170,7 @@
struct rman *rm;
int isdefault, needactivate, passthrough;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
needactivate = flags & RF_ACTIVE;
/*
* Pass memory requests to nexus device
Index: sys/mips/beri/beri_simplebus.c
===================================================================
--- sys/mips/beri/beri_simplebus.c
+++ sys/mips/beri/beri_simplebus.c
@@ -260,7 +260,7 @@
* Request for the default allocation with a given rid: use resource
* list stored in the local device info.
*/
- if ((start == 0UL) && (end == ~0UL)) {
+ if ((start == 0) && (end == ~0)) {
if ((di = device_get_ivars(child)) == NULL)
return (NULL);
Index: sys/mips/idt/obio.c
===================================================================
--- sys/mips/idt/obio.c
+++ sys/mips/idt/obio.c
@@ -165,7 +165,7 @@
struct rman *rm;
int isdefault, needactivate, passthrough;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
needactivate = flags & RF_ACTIVE;
passthrough = (device_get_parent(child) != bus);
rle = NULL;
Index: sys/mips/mips/nexus.c
===================================================================
--- sys/mips/mips/nexus.c
+++ sys/mips/mips/nexus.c
@@ -154,7 +154,7 @@
}
mem_rman.rm_start = 0;
- mem_rman.rm_end = ~0ul;
+ mem_rman.rm_end = ~0;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "Memory addresses";
if (rman_init(&mem_rman) != 0 ||
@@ -249,7 +249,7 @@
(void *)(intptr_t)end, count, flags);
dprintf("%s: requested rid is %d\n", __func__, *rid);
- isdefault = (start == 0UL && end == ~0UL && count == 1);
+ isdefault = (start == 0 && end == ~0 && count == 1);
needactivate = flags & RF_ACTIVE;
passthrough = (device_get_parent(child) != bus);
rle = NULL;
Index: sys/mips/nlm/xlp_simplebus.c
===================================================================
--- sys/mips/nlm/xlp_simplebus.c
+++ sys/mips/nlm/xlp_simplebus.c
@@ -116,7 +116,7 @@
panic("xlp_simplebus_init_resources irq_rman");
port_rman.rm_start = 0;
- port_rman.rm_end = ~0ul;
+ port_rman.rm_end = ~0;
port_rman.rm_type = RMAN_ARRAY;
port_rman.rm_descr = "I/O ports";
if (rman_init(&port_rman)
@@ -124,7 +124,7 @@
panic("xlp_simplebus_init_resources port_rman");
mem_rman.rm_start = 0;
- mem_rman.rm_end = ~0ul;
+ mem_rman.rm_end = ~0;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory";
if (rman_init(&mem_rman)
@@ -132,7 +132,7 @@
panic("xlp_simplebus_init_resources mem_rman");
pci_ecfg_rman.rm_start = 0;
- pci_ecfg_rman.rm_end = ~0ul;
+ pci_ecfg_rman.rm_end = ~0;
pci_ecfg_rman.rm_type = RMAN_ARRAY;
pci_ecfg_rman.rm_descr = "PCI ECFG IO";
if (rman_init(&pci_ecfg_rman) || rman_manage_region(&pci_ecfg_rman,
@@ -140,7 +140,7 @@
panic("xlp_simplebus_init_resources pci_ecfg_rman");
gbu_rman.rm_start = 0;
- gbu_rman.rm_end = ~0ul;
+ gbu_rman.rm_end = ~0;
gbu_rman.rm_type = RMAN_ARRAY;
gbu_rman.rm_descr = "Flash region";
if (rman_init(&gbu_rman)
@@ -192,7 +192,7 @@
bustag = NULL;
if (!passthrough) {
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
if (isdefault) {
rle = resource_list_find(&di->rl, type, *rid);
if (rle == NULL)
Index: sys/mips/rmi/xlr_pci.c
===================================================================
--- sys/mips/rmi/xlr_pci.c
+++ sys/mips/rmi/xlr_pci.c
@@ -126,7 +126,7 @@
panic("pci_init_resources irq_rman");
port_rman.rm_start = 0;
- port_rman.rm_end = ~0ul;
+ port_rman.rm_end = ~0;
port_rman.rm_type = RMAN_ARRAY;
port_rman.rm_descr = "I/O ports";
if (rman_init(&port_rman)
@@ -134,7 +134,7 @@
panic("pci_init_resources port_rman");
mem_rman.rm_start = 0;
- mem_rman.rm_end = ~0ul;
+ mem_rman.rm_end = ~0;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory";
if (rman_init(&mem_rman)
Index: sys/mips/rt305x/obio.c
===================================================================
--- sys/mips/rt305x/obio.c
+++ sys/mips/rt305x/obio.c
@@ -287,7 +287,7 @@
struct rman *rm;
int isdefault, needactivate, passthrough;
- isdefault = (start == 0UL && end == ~0UL && count == 1);
+ isdefault = (start == 0 && end == ~0 && count == 1);
needactivate = flags & RF_ACTIVE;
passthrough = (device_get_parent(child) != bus);
rle = NULL;
Index: sys/mips/sibyte/sb_zbbus.c
===================================================================
--- sys/mips/sibyte/sb_zbbus.c
+++ sys/mips/sibyte/sb_zbbus.c
@@ -288,7 +288,7 @@
struct resource_list_entry *rle;
struct zbbus_devinfo *dinfo;
- isdefault = (start == 0UL && end == ~0UL && count == 1);
+ isdefault = (start == 0 && end == ~0 && count == 1);
/*
* Our direct child is asking for a default resource allocation.
Index: sys/pc98/cbus/pmc.c
===================================================================
--- sys/pc98/cbus/pmc.c
+++ sys/pc98/cbus/pmc.c
@@ -101,7 +101,7 @@
rid = 0;
sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0ul, ~0ul, PMC_ISA_PORTSIZE,
+ 0, ~0, PMC_ISA_PORTSIZE,
RF_ACTIVE);
if (sc->port_res == NULL) {
return (ENOMEM);
Index: sys/powerpc/mpc85xx/isa.c
===================================================================
--- sys/powerpc/mpc85xx/isa.c
+++ sys/powerpc/mpc85xx/isa.c
@@ -52,7 +52,7 @@
struct resource_list *rl = &idev->id_resources;
int isdefault, passthrough, rids;
- isdefault = (start == 0UL && end == ~0UL) ? 1 : 0;
+ isdefault = (start == 0 && end == ~0) ? 1 : 0;
passthrough = (device_get_parent(child) != bus) ? 1 : 0;
if (!passthrough && !isdefault &&
Index: sys/powerpc/mpc85xx/lbc.c
===================================================================
--- sys/powerpc/mpc85xx/lbc.c
+++ sys/powerpc/mpc85xx/lbc.c
@@ -504,8 +504,8 @@
rm = &sc->sc_rman;
rm->rm_type = RMAN_ARRAY;
rm->rm_descr = "Local Bus Space";
- rm->rm_start = 0UL;
- rm->rm_end = ~0UL;
+ rm->rm_start = 0;
+ rm->rm_end = ~0;
error = rman_init(rm);
if (error)
goto fail;
@@ -674,7 +674,7 @@
int needactivate;
/* We only support default allocations. */
- if (start != 0ul || end != ~0ul)
+ if (start != 0 || end != ~0)
return (NULL);
sc = device_get_softc(bus);
Index: sys/riscv/riscv/nexus.c
===================================================================
--- sys/riscv/riscv/nexus.c
+++ sys/riscv/riscv/nexus.c
@@ -143,13 +143,13 @@
{
mem_rman.rm_start = 0;
- mem_rman.rm_end = ~0ul;
+ mem_rman.rm_end = ~0;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory addresses";
if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0))
panic("nexus_attach mem_rman");
irq_rman.rm_start = 0;
- irq_rman.rm_end = ~0ul;
+ irq_rman.rm_end = ~0;
irq_rman.rm_type = RMAN_ARRAY;
irq_rman.rm_descr = "Interrupts";
if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0))
@@ -215,7 +215,7 @@
* (ie. they aren't maintained by a child bus), then work out
* the start/end values.
*/
- if ((start == 0UL) && (end == ~0UL) && (count == 1)) {
+ if ((start == 0) && (end == ~0) && (count == 1)) {
if (device_get_parent(child) != bus || ndev == NULL)
return(NULL);
rle = resource_list_find(&ndev->nx_resources, type, *rid);
Index: sys/sparc64/central/central.c
===================================================================
--- sys/sparc64/central/central.c
+++ sys/sparc64/central/central.c
@@ -228,7 +228,7 @@
int passthrough;
int i;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
passthrough = (device_get_parent(child) != bus);
res = NULL;
rle = NULL;
Index: sys/sparc64/ebus/ebus.c
===================================================================
--- sys/sparc64/ebus/ebus.c
+++ sys/sparc64/ebus/ebus.c
@@ -438,7 +438,7 @@
uint64_t cend, cstart, offset;
int i, isdefault, passthrough, ridx;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
passthrough = (device_get_parent(child) != bus);
sc = device_get_softc(bus);
rl = BUS_GET_RESOURCE_LIST(bus, child);
Index: sys/sparc64/fhc/fhc.c
===================================================================
--- sys/sparc64/fhc/fhc.c
+++ sys/sparc64/fhc/fhc.c
@@ -433,7 +433,7 @@
int passthrough;
int i;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
passthrough = (device_get_parent(child) != bus);
res = NULL;
rle = NULL;
Index: sys/sparc64/isa/isa.c
===================================================================
--- sys/sparc64/isa/isa.c
+++ sys/sparc64/isa/isa.c
@@ -279,7 +279,7 @@
* Consider adding a resource definition.
*/
int passthrough = (device_get_parent(child) != bus);
- int isdefault = (start == 0UL && end == ~0UL);
+ int isdefault = (start == 0 && end == ~0);
struct resource_list *rl;
struct resource_list_entry *rle;
u_long base, limit;
Index: sys/sparc64/sbus/sbus.c
===================================================================
--- sys/sparc64/sbus/sbus.c
+++ sys/sparc64/sbus/sbus.c
@@ -723,7 +723,7 @@
int i, slot;
int isdefault, passthrough;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
passthrough = (device_get_parent(child) != bus);
rle = NULL;
sc = device_get_softc(bus);
Index: sys/sparc64/sparc64/nexus.c
===================================================================
--- sys/sparc64/sparc64/nexus.c
+++ sys/sparc64/sparc64/nexus.c
@@ -368,7 +368,7 @@
device_t nexus;
int isdefault, passthrough;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
passthrough = (device_get_parent(child) != bus);
nexus = bus;
while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0)
Index: sys/sparc64/sparc64/upa.c
===================================================================
--- sys/sparc64/sparc64/upa.c
+++ sys/sparc64/sparc64/upa.c
@@ -412,7 +412,7 @@
bus_addr_t cend, cstart;
int i, isdefault, passthrough;
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = (start == 0 && end == ~0);
passthrough = (device_get_parent(child) != dev);
sc = device_get_softc(dev);
rl = BUS_GET_RESOURCE_LIST(dev, child);
Index: sys/sys/bus.h
===================================================================
--- sys/sys/bus.h
+++ sys/sys/bus.h
@@ -474,7 +474,7 @@
static __inline struct resource *
bus_alloc_resource_any(device_t dev, int type, int *rid, u_int flags)
{
- return (bus_alloc_resource(dev, type, rid, 0ul, ~0ul, 1, flags));
+ return (bus_alloc_resource(dev, type, rid, 0, ~0, 1, flags));
}
/*
Index: sys/x86/isa/isa.c
===================================================================
--- sys/x86/isa/isa.c
+++ sys/x86/isa/isa.c
@@ -94,7 +94,7 @@
* Consider adding a resource definition.
*/
int passthrough = (device_get_parent(child) != bus);
- int isdefault = (start == 0UL && end == ~0UL);
+ int isdefault = (start == 0 && end == ~0);
struct isa_device* idev = DEVTOISA(child);
struct resource_list *rl = &idev->id_resources;
struct resource_list_entry *rle;
Index: sys/x86/x86/nexus.c
===================================================================
--- sys/x86/x86/nexus.c
+++ sys/x86/x86/nexus.c
@@ -262,7 +262,7 @@
panic("nexus_init_resources port_rman");
mem_rman.rm_start = 0;
- mem_rman.rm_end = ~0ul;
+ mem_rman.rm_end = ~0;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory addresses";
if (rman_init(&mem_rman)
@@ -377,7 +377,7 @@
* (ie. they aren't maintained by a child bus), then work out
* the start/end values.
*/
- if ((start == 0UL) && (end == ~0UL) && (count == 1)) {
+ if ((start == 0) && (end == ~0) && (count == 1)) {
if (device_get_parent(child) != bus || ndev == NULL)
return(NULL);
rle = resource_list_find(&ndev->nx_resources, type, *rid);
@@ -746,7 +746,7 @@
* Resources use long's to track resources, so we can't
* include memory regions above 4GB.
*/
- if (p[0] > ~0ul)
+ if (p[0] > ~0)
break;
#endif
error = bus_set_resource(dev, SYS_RES_MEMORY, rid, p[0],
Index: sys/x86/xen/xenpv.c
===================================================================
--- sys/x86/xen/xenpv.c
+++ sys/x86/xen/xenpv.c
@@ -120,7 +120,7 @@
int error;
res = bus_alloc_resource(child, SYS_RES_MEMORY, res_id, LOW_MEM_LIMIT,
- ~0ul, size, RF_ACTIVE);
+ ~0, size, RF_ACTIVE);
if (res == NULL)
return (NULL);

File Metadata

Mime Type
text/plain
Expires
Sat, Jul 18, 3:58 AM (15 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35188136
Default Alt Text
D5255.id13231.diff (54 KB)

Event Timeline