MFp4 (my newcard tree):

ISACFGATTR_MULTI is unused.  Retire it, and a function that has no
side effects used to compute it.
This commit is contained in:
Warner Losh 2008-08-24 07:40:14 +00:00
parent 3269dc16fd
commit 5b4ae40039
2 changed files with 0 additions and 55 deletions

View File

@ -467,55 +467,6 @@ isa_assign_resources(device_t child)
return (0);
}
/*
* Return non-zero if the device has a single configuration, that is,
* a fixed set of resoruces.
*/
static int
isa_has_single_config(device_t dev)
{
struct isa_device *idev = DEVTOISA(dev);
struct isa_config_entry *ice;
uint32_t mask;
int i;
ice = TAILQ_FIRST(&idev->id_configs);
if (TAILQ_NEXT(ice, ice_link))
return (0);
for (i = 0; i < ice->ice_config.ic_nmem; ++i) {
if (ice->ice_config.ic_mem[i].ir_size == 0)
continue;
if (ice->ice_config.ic_mem[i].ir_end !=
ice->ice_config.ic_mem[i].ir_start +
ice->ice_config.ic_mem[i].ir_size - 1)
return (0);
}
for (i = 0; i < ice->ice_config.ic_nport; ++i) {
if (ice->ice_config.ic_port[i].ir_size == 0)
continue;
if (ice->ice_config.ic_port[i].ir_end !=
ice->ice_config.ic_port[i].ir_start +
ice->ice_config.ic_port[i].ir_size - 1)
return (0);
}
for (i = 0; i < ice->ice_config.ic_nirq; ++i) {
mask = ice->ice_config.ic_irqmask[i];
if (mask == 0)
continue;
if (find_next_bit(mask, find_first_bit(mask)) != -1)
return (0);
}
for (i = 0; i < ice->ice_config.ic_ndrq; ++i) {
mask = ice->ice_config.ic_drqmask[i];
if (mask == 0)
continue;
if (find_next_bit(mask, find_first_bit(mask)) != -1)
return (0);
}
return (1);
}
/*
* Called after other devices have initialised to probe for isa devices.
*/
@ -1020,11 +971,6 @@ isa_add_config(device_t dev, device_t child, int priority,
else
TAILQ_INSERT_TAIL(&idev->id_configs, newice, ice_link);
if (isa_has_single_config(child))
idev->id_config_attr &= ~ISACFGATTR_MULTI;
else
idev->id_config_attr |= ISACFGATTR_MULTI;
return (0);
}

View File

@ -133,7 +133,6 @@ enum isa_device_ivars {
*/
#define ISACFGATTR_CANDISABLE (1 << 0) /* can be disabled */
#define ISACFGATTR_DYNAMIC (1 << 1) /* dynamic configuration */
#define ISACFGATTR_MULTI (1 << 2) /* multiple configurations */
#define ISACFGATTR_HINTS (1 << 3) /* source of config is hints */
/*