[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/28] chips/busses.h: use boolean instead of a char
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 01/28] chips/busses.h: use boolean instead of a char |
Date: |
Mon, 9 Dec 2013 00:43:10 +0900 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Marin Ramesa, le Sun 08 Dec 2013 12:40:03 +0100, a écrit :
> A struct member which tracks if the device has been probed. It should
> really be a boolean instead of a char.
I'd rather not, since it changes its size.
> * chips/busses.c (alive): Use boolean values.
> * chips/busses.h (alive): Use boolean instead of a char.
> * i386/i386at/autoconf.c (bus_device_init): Use boolean values in
> initialization.
>
> ---
> chips/busses.c | 6 +++---
> chips/busses.h | 4 ++--
> i386/i386at/autoconf.c | 12 ++++++------
> 3 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/chips/busses.c b/chips/busses.c
> index f9f6f1b..870358b 100644
> --- a/chips/busses.c
> +++ b/chips/busses.c
> @@ -96,7 +96,7 @@ boolean_t configure_bus_master(
> if ((*driver->probe) (virt, master) == 0)
> return FALSE;
>
> - master->alive = 1;
> + master->alive = TRUE;
> master->adaptor = adpt_no;
>
> /*
> @@ -128,7 +128,7 @@ boolean_t configure_bus_master(
> continue;
> }
>
> - device->alive = 1;
> + device->alive = TRUE;
> device->adaptor = adpt_no;
> device->ctlr = master->unit;
>
> @@ -211,7 +211,7 @@ boolean_t configure_bus_device(
> if ((*driver->probe) (virt, (struct bus_ctlr *)device) == 0)
> return FALSE;
>
> - device->alive = 1;
> + device->alive = TRUE;
> device->adaptor = adpt_no;
>
> printf("%s%d: at %s%d", device->name, device->unit, bus_name, adpt_no);
> diff --git a/chips/busses.h b/chips/busses.h
> index 49c0e44..982f7ad 100644
> --- a/chips/busses.h
> +++ b/chips/busses.h
> @@ -78,7 +78,7 @@ struct bus_ctlr {
> int am; /* address modifier */
> vm_offset_t phys_address;/* device phys address */
> char adaptor; /* slot where found */
> - char alive; /* probed successfully */
> + boolean_t alive; /* probed successfully */
> char flags; /* any special conditions */
> vm_offset_t sysdep; /* On some systems, queue of
> * operations in-progress */
> @@ -98,7 +98,7 @@ struct bus_device {
> int am; /* address modifier */
> vm_offset_t phys_address;/* device phys address */
> char adaptor;
> - char alive;
> + boolean_t alive;
> char ctlr;
> char slave;
> int flags;
> diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c
> index 31bb73c..93d6b99 100644
> --- a/i386/i386at/autoconf.c
> +++ b/i386/i386at/autoconf.c
> @@ -62,21 +62,21 @@ struct bus_device bus_device_init[] = {
>
> #if NCOM > 0
> {&comdriver, "com", 0, comintr, 0x3f8, 8, 0x3f8,
> - '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 4},
> + '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 4},
> {&comdriver, "com", 1, comintr, 0x2f8, 8, 0x2f8,
> - '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 3},
> + '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 3},
> {&comdriver, "com", 2, comintr, 0x3e8, 8, 0x3e8,
> - '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 5},
> + '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 5},
> #endif /* NCOM > 0 */
>
> #ifdef MACH_LPR
> #if NLPR > 0
> {&lprdriver, "lpr", 0, lprintr, 0x378, 3, 0x378,
> - '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
> + '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 7},
> {&lprdriver, "lpr", 0, lprintr, 0x278, 3, 0x278,
> - '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
> + '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 7},
> {&lprdriver, "lpr", 0, lprintr, 0x3bc, 3, 0x3bc,
> - '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7},
> + '?', FALSE, -1, -1, 0, 0, 0, SPL_TTY, 7},
> #endif /* NLPR > 0 */
> #endif /* MACH_LPR */
>
> --
> 1.8.1.4
>
>
--
Samuel
<b> lisons de l'assembleur c
-+- #sos - CrisC forever -+-
- Re: [PATCH 21/28] ddb/db_expr.c (db_mult_expr): remove unnecessary variable, (continued)
- [PATCH 22/28] ddb/db_expr.c (db_add_expr): remove unnecessary variable, Marin Ramesa, 2013/12/08
- [PATCH 23/28] ddb/db_mp.c: use boolean instead of an int, Marin Ramesa, 2013/12/08
- [PATCH 24/28] ddb/db_mp.c (remote_db): comment the call to cpu_interrupt_to_db(), Marin Ramesa, 2013/12/08
- [PATCH 25/28] ddb/db_mp.c: definition of db_console() only if CONSOLE_ON_MASTER, Marin Ramesa, 2013/12/08
- [PATCH 26/28] ddb/db_print.c: use unsigned long instead of an unsigned int, Marin Ramesa, 2013/12/08
- [PATCH 27/28] Use db_addr_t instead of db_expr_t, Marin Ramesa, 2013/12/08
- [PATCH 28/28] ddb/db_trap.c (db_task_trap): remove forward declarations, Marin Ramesa, 2013/12/08
- Re: [PATCH 01/28] chips/busses.h: use boolean instead of a char,
Samuel Thibault <=