mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 05:36:10 +00:00
ofw: convert boolean_t to bool
Most of these already treat it as a proper bool, i.e. using true/false. Also fix-up callers of OF_install(). No functional change intended. Reviewed by: andrew, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45733
This commit is contained in:
parent
2cb7605a24
commit
609cdb12b9
|
@ -754,7 +754,7 @@ try_load_dtb(caddr_t kmdp)
|
|||
return;
|
||||
}
|
||||
|
||||
if (OF_install(OFW_FDT, 0) == FALSE)
|
||||
if (!OF_install(OFW_FDT, 0))
|
||||
panic("Cannot install FDT");
|
||||
|
||||
if (OF_init((void *)dtbp) != 0)
|
||||
|
|
|
@ -641,7 +641,7 @@ ofw_bus_intr_to_rl(device_t dev, phandle_t node,
|
|||
phandle_t iparent;
|
||||
uint32_t icells, *intr;
|
||||
int err, i, irqnum, nintr, rid;
|
||||
boolean_t extended;
|
||||
bool extended;
|
||||
|
||||
nintr = OF_getencprop_alloc_multi(node, "interrupts", sizeof(*intr),
|
||||
(void **)&intr);
|
||||
|
@ -707,7 +707,7 @@ ofw_bus_intr_by_rid(device_t dev, phandle_t node, int wanted_rid,
|
|||
phandle_t iparent;
|
||||
uint32_t icells, *intr;
|
||||
int err, i, nintr, rid;
|
||||
boolean_t extended;
|
||||
bool extended;
|
||||
|
||||
nintr = OF_getencprop_alloc_multi(node, "interrupts", sizeof(*intr),
|
||||
(void **)&intr);
|
||||
|
|
|
@ -151,7 +151,7 @@ static int ofw_cpu_read_ivar(device_t dev, device_t child, int index,
|
|||
struct ofw_cpu_softc {
|
||||
struct pcpu *sc_cpu_pcpu;
|
||||
uint32_t sc_nominal_mhz;
|
||||
boolean_t sc_reg_valid;
|
||||
bool sc_reg_valid;
|
||||
pcell_t sc_reg[2];
|
||||
};
|
||||
|
||||
|
@ -335,7 +335,7 @@ ofw_cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result)
|
|||
}
|
||||
|
||||
int
|
||||
ofw_cpu_early_foreach(ofw_cpu_foreach_cb callback, boolean_t only_runnable)
|
||||
ofw_cpu_early_foreach(ofw_cpu_foreach_cb callback, bool only_runnable)
|
||||
{
|
||||
phandle_t node, child;
|
||||
pcell_t addr_cells, reg[2];
|
||||
|
|
|
@ -30,6 +30,6 @@
|
|||
#define _DEV_OFW_OFW_CPU_H_
|
||||
|
||||
typedef bool (*ofw_cpu_foreach_cb)(u_int, phandle_t, u_int, pcell_t *);
|
||||
int ofw_cpu_early_foreach(ofw_cpu_foreach_cb, boolean_t);
|
||||
int ofw_cpu_early_foreach(ofw_cpu_foreach_cb, bool);
|
||||
|
||||
#endif /* _DEV_OFW_OFW_CPU_H_ */
|
||||
|
|
|
@ -96,7 +96,7 @@ struct xrefinfo {
|
|||
|
||||
static SLIST_HEAD(, xrefinfo) xreflist = SLIST_HEAD_INITIALIZER(xreflist);
|
||||
static struct mtx xreflist_lock;
|
||||
static boolean_t xref_init_done;
|
||||
static bool xref_init_done;
|
||||
|
||||
#define FIND_BY_XREF 0
|
||||
#define FIND_BY_NODE 1
|
||||
|
@ -193,7 +193,7 @@ xrefinfo_add(phandle_t node, phandle_t xref, device_t dev)
|
|||
*/
|
||||
SET_DECLARE(ofw_set, ofw_def_t);
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
OF_install(char *name, int prio)
|
||||
{
|
||||
ofw_def_t *ofwp, **ofwpp;
|
||||
|
@ -202,7 +202,7 @@ OF_install(char *name, int prio)
|
|||
/* Allow OF layer to be uninstalled */
|
||||
if (name == NULL) {
|
||||
ofw_def_impl = NULL;
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -216,11 +216,11 @@ OF_install(char *name, int prio)
|
|||
prio >= curr_prio) {
|
||||
curr_prio = prio;
|
||||
ofw_def_impl = ofwp;
|
||||
return (TRUE);
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
/* Initializer */
|
||||
|
|
|
@ -83,8 +83,8 @@ MALLOC_DECLARE(M_OFWPROP);
|
|||
* interface as the Open Firmware access mechanism, OF_init initializes it.
|
||||
*/
|
||||
|
||||
boolean_t OF_install(char *name, int prio);
|
||||
int OF_init(void *cookie);
|
||||
bool OF_install(char *name, int prio);
|
||||
int OF_init(void *cookie);
|
||||
|
||||
/*
|
||||
* Known Open Firmware interface names
|
||||
|
|
|
@ -42,7 +42,7 @@ typedef uint32_t cell_t;
|
|||
void OF_getetheraddr(device_t dev, u_char *addr);
|
||||
|
||||
void OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *));
|
||||
boolean_t OF_bootstrap(void);
|
||||
bool OF_bootstrap(void);
|
||||
|
||||
void OF_reboot(void);
|
||||
|
||||
|
|
|
@ -595,10 +595,10 @@ OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *))
|
|||
fdt = fdt_ptr;
|
||||
}
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
OF_bootstrap(void)
|
||||
{
|
||||
boolean_t status = FALSE;
|
||||
bool status = false;
|
||||
int err = 0;
|
||||
|
||||
#ifdef AIM
|
||||
|
@ -613,8 +613,8 @@ OF_bootstrap(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
if (status != TRUE)
|
||||
return status;
|
||||
if (!status)
|
||||
return (status);
|
||||
|
||||
err = OF_init(openfirmware);
|
||||
} else
|
||||
|
@ -629,8 +629,8 @@ OF_bootstrap(void)
|
|||
#endif
|
||||
|
||||
status = OF_install(OFW_FDT, 0);
|
||||
if (status != TRUE)
|
||||
return status;
|
||||
if (!status)
|
||||
return (status);
|
||||
|
||||
#ifdef AIM /* AIM-only for now -- Book-E does this remapping in early init */
|
||||
/* Get the FDT size for mapping if we can */
|
||||
|
@ -668,15 +668,15 @@ OF_bootstrap(void)
|
|||
*/
|
||||
else {
|
||||
status = OF_install(OFW_FDT, 0);
|
||||
if (status != TRUE)
|
||||
return status;
|
||||
if (!status)
|
||||
return (status);
|
||||
err = OF_init(&fdt_static_dtb);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (err != 0) {
|
||||
OF_install(NULL, 0);
|
||||
status = FALSE;
|
||||
status = false;
|
||||
}
|
||||
|
||||
return (status);
|
||||
|
|
|
@ -321,7 +321,7 @@ try_load_dtb(caddr_t kmdp)
|
|||
return;
|
||||
}
|
||||
|
||||
if (OF_install(OFW_FDT, 0) == FALSE)
|
||||
if (!OF_install(OFW_FDT, 0))
|
||||
panic("Cannot install FDT");
|
||||
|
||||
if (OF_init((void *)dtbp) != 0)
|
||||
|
|
|
@ -46,7 +46,7 @@ x86_init_fdt(void)
|
|||
void *dtbp, *mdp;
|
||||
int error;
|
||||
|
||||
if (OF_install(OFW_FDT, 0) == FALSE) {
|
||||
if (!OF_install(OFW_FDT, 0)) {
|
||||
error = ENXIO;
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue