ofw_cpu: whitespace cleanup
Reviewed by: jhb, emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40242
This commit is contained in:
parent
2c0a6d0e7b
commit
5edffecc4b
@ -89,10 +89,10 @@ static driver_t ofw_cpulist_driver = {
|
||||
|
||||
DRIVER_MODULE(ofw_cpulist, ofwbus, ofw_cpulist_driver, 0, 0);
|
||||
|
||||
static int
|
||||
ofw_cpulist_probe(device_t dev)
|
||||
static int
|
||||
ofw_cpulist_probe(device_t dev)
|
||||
{
|
||||
const char *name;
|
||||
const char *name;
|
||||
|
||||
name = ofw_bus_get_name(dev);
|
||||
|
||||
@ -104,8 +104,8 @@ ofw_cpulist_probe(device_t dev)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
ofw_cpulist_attach(device_t dev)
|
||||
static int
|
||||
ofw_cpulist_attach(device_t dev)
|
||||
{
|
||||
struct ofw_cpulist_softc *sc;
|
||||
phandle_t root, child;
|
||||
@ -122,18 +122,18 @@ ofw_cpulist_attach(device_t dev)
|
||||
for (child = OF_child(root); child != 0; child = OF_peer(child)) {
|
||||
dinfo = malloc(sizeof(*dinfo), M_OFWCPU, M_WAITOK | M_ZERO);
|
||||
|
||||
if (ofw_bus_gen_setup_devinfo(dinfo, child) != 0) {
|
||||
free(dinfo, M_OFWCPU);
|
||||
continue;
|
||||
}
|
||||
cdev = device_add_child(dev, NULL, -1);
|
||||
if (cdev == NULL) {
|
||||
device_printf(dev, "<%s>: device_add_child failed\n",
|
||||
dinfo->obd_name);
|
||||
ofw_bus_gen_destroy_devinfo(dinfo);
|
||||
free(dinfo, M_OFWCPU);
|
||||
continue;
|
||||
}
|
||||
if (ofw_bus_gen_setup_devinfo(dinfo, child) != 0) {
|
||||
free(dinfo, M_OFWCPU);
|
||||
continue;
|
||||
}
|
||||
cdev = device_add_child(dev, NULL, -1);
|
||||
if (cdev == NULL) {
|
||||
device_printf(dev, "<%s>: device_add_child failed\n",
|
||||
dinfo->obd_name);
|
||||
ofw_bus_gen_destroy_devinfo(dinfo);
|
||||
free(dinfo, M_OFWCPU);
|
||||
continue;
|
||||
}
|
||||
device_set_ivars(cdev, dinfo);
|
||||
}
|
||||
|
||||
@ -141,9 +141,9 @@ ofw_cpulist_attach(device_t dev)
|
||||
}
|
||||
|
||||
static const struct ofw_bus_devinfo *
|
||||
ofw_cpulist_get_devinfo(device_t dev, device_t child)
|
||||
ofw_cpulist_get_devinfo(device_t dev, device_t child)
|
||||
{
|
||||
return (device_get_ivars(child));
|
||||
return (device_get_ivars(child));
|
||||
}
|
||||
|
||||
static int ofw_cpu_probe(device_t);
|
||||
@ -242,8 +242,8 @@ ofw_cpu_attach(device_t dev)
|
||||
struct cpuref cpuref;
|
||||
cell_t *servers;
|
||||
int i, nservers, rv;
|
||||
|
||||
if ((nservers = OF_getencprop_alloc(node,
|
||||
|
||||
if ((nservers = OF_getencprop_alloc(node,
|
||||
"ibm,ppc-interrupt-server#s", (void **)&servers)) < 0)
|
||||
return (ENXIO);
|
||||
nservers /= sizeof(cell_t);
|
||||
|
Loading…
Reference in New Issue
Block a user