From nobody Wed Jun 26 14:16:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W8NzG6pJ0z5PcnG; Wed, 26 Jun 2024 14:16:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W8NzG65MZz4gMy; Wed, 26 Jun 2024 14:16:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719411370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=it9vDHyOEIV3duoQrnYyn2+zqLJT2I1/c4xiFVUCmMQ=; b=S4DspFoINNc9GNFJPZJbFaoQhY25iRk7uusMy3gqmDtYwz4iatEo+klWFKhmX3X6KRmIn2 abo4H4FXVFwMo5Z4soldE1ynuOwDZRwuWN2ZA5taHRomDBoLnpiHFq64gmBjL3gKITASEj 5dqd5pWQ3eFa3zBmAHeQDGgXSRHitj/ncf7J9JcYrqmI6v4c6sa7vEtkiQ5hWJdjgQaznS KDvUGLPp+EAzo2l6VzV/0t+wt/AeyNeNa7SUJ/M2XvTuanwax9ZOXbJuj/9bhKICi+p1Ka Ibk7TNcdP9gMYWdCjDTBhrcyfMuCD54TKi7EeJ2eFysZi5FxOUbuo+tzzBfXMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719411370; a=rsa-sha256; cv=none; b=PM4RU90G2nllivJQEPkdX6g6/59MnciJepUd+ini2vOy47a0kqH1FYRzz+mcVwkpxfMfTH gLsrgIVevFFK0FFLr2ulJR3PKrdaD3OFxlgIUHPpJXR702OnfesJs20QTW9gGV2St+NmSe YNLQJSWi+mJOrBQRgQsvfPFiemJgMShNJRFO/b3X6fGHm3+80gyFPJb/iLI94kjUTmlmF0 684+zQL1+QSeNN+XrPvHu+UQWs0yzy/cyz6IG26G1dnyCwE7ujkHijvIBhLNKrbAHh+BnJ hlSn8bz5f9f33DUlQAp7JqnAoIgZluNVpLG/UBlMYZcgNPW/h1m50JyFBpqzkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719411370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=it9vDHyOEIV3duoQrnYyn2+zqLJT2I1/c4xiFVUCmMQ=; b=fgArSqv8aqMUt7+cEvkiAi+QzHg7fWuHzeACwpPQJyPqDJBi4ZwL7BEFkGGkiPlvotLuF1 G116aYbgkONevpel/jy8Q4q5mKlxUe1CbfkU0gv3B/wH5D9kNKL01yKkn7iS1uJ349R0NM WV/XUMiCtSHv9HdpUjFX2IbsDbc78yFnl0dn5lQPfuGYr5IvpAq2kggFRtNVjWUpIRFSE/ FPacoKHIm4Azu6gGIpeLT0jW0JEN2y+P/6kiPnCA2up4vCf6Al/hjX48OvK6CtTkOsiJ9Q i03LRQkw3kPCf3pZ18FRHaUlqHRjXwMPNKAV7iRwS0Py0ua6S8XTmlGHZqnKqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W8NzG5Z4lznJY; Wed, 26 Jun 2024 14:16:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45QEGAWx015745; Wed, 26 Jun 2024 14:16:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QEGAc8015742; Wed, 26 Jun 2024 14:16:10 GMT (envelope-from git) Date: Wed, 26 Jun 2024 14:16:10 GMT Message-Id: <202406261416.45QEGAc8015742@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 609cdb12b962 - main - ofw: convert boolean_t to bool List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 609cdb12b9620dfa7c124b2f1834cd79e5cd98ec Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=609cdb12b9620dfa7c124b2f1834cd79e5cd98ec commit 609cdb12b9620dfa7c124b2f1834cd79e5cd98ec Author: Mitchell Horne AuthorDate: 2024-06-26 14:01:49 +0000 Commit: Mitchell Horne CommitDate: 2024-06-26 14:14:36 +0000 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 --- sys/arm64/arm64/machdep.c | 2 +- sys/dev/ofw/ofw_bus_subr.c | 4 ++-- sys/dev/ofw/ofw_cpu.c | 4 ++-- sys/dev/ofw/ofw_cpu.h | 2 +- sys/dev/ofw/openfirm.c | 10 +++++----- sys/dev/ofw/openfirm.h | 4 ++-- sys/powerpc/include/ofw_machdep.h | 2 +- sys/powerpc/ofw/ofw_machdep.c | 18 +++++++++--------- sys/riscv/riscv/machdep.c | 2 +- sys/x86/x86/fdt_machdep.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index e7d46ff70531..090ea2c10853 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -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) diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c index d63e89e2d677..a6d562cd8e9d 100644 --- a/sys/dev/ofw/ofw_bus_subr.c +++ b/sys/dev/ofw/ofw_bus_subr.c @@ -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); diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c index e18004ae19d2..127510a64f4f 100644 --- a/sys/dev/ofw/ofw_cpu.c +++ b/sys/dev/ofw/ofw_cpu.c @@ -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]; diff --git a/sys/dev/ofw/ofw_cpu.h b/sys/dev/ofw/ofw_cpu.h index cb30dfb6e262..9f4e9e65aa61 100644 --- a/sys/dev/ofw/ofw_cpu.h +++ b/sys/dev/ofw/ofw_cpu.h @@ -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_ */ diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index 881a2cccb072..f9c73122b454 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -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 */ diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index 149f2a951745..30203404a6b0 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -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 diff --git a/sys/powerpc/include/ofw_machdep.h b/sys/powerpc/include/ofw_machdep.h index 7c3767dfc679..8b3f912fec8c 100644 --- a/sys/powerpc/include/ofw_machdep.h +++ b/sys/powerpc/include/ofw_machdep.h @@ -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); diff --git a/sys/powerpc/ofw/ofw_machdep.c b/sys/powerpc/ofw/ofw_machdep.c index 6d7b0b01fc84..bffc04b15259 100644 --- a/sys/powerpc/ofw/ofw_machdep.c +++ b/sys/powerpc/ofw/ofw_machdep.c @@ -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); diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index ffb29e53b88e..eda7ebc32bbf 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -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) diff --git a/sys/x86/x86/fdt_machdep.c b/sys/x86/x86/fdt_machdep.c index 901655d829b4..30820a88d263 100644 --- a/sys/x86/x86/fdt_machdep.c +++ b/sys/x86/x86/fdt_machdep.c @@ -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; }