bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/28] chips/busses.c: comment out dead code


From: Samuel Thibault
Subject: Re: [PATCH 02/28] chips/busses.c: comment out dead code
Date: Mon, 9 Dec 2013 00:44:19 +0900
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Marin Ramesa, le Sun 08 Dec 2013 12:40:04 +0100, a écrit :
> Field bus_master_init is initialized to zero

Well, that's just because it's not used ATM.  It could be.

> and therefore
> configure_bus_master() always returns FALSE without any
> effect on bus_master_init. The for loops in configure_bus_master()
> and probeio() never get executed. I suggest commenting out of
> this code.
> 
> * chips/busses.c (configure_bus_master): Comment out the function.
> * chips/busses.h (bus_master_init): Comment out variable declaration.
> * i386/i386at/autoconf.c (bus_master_init): Comment out field initialization.
> (probeio): Comment out the for loop.
> 
> ---
>  chips/busses.c         |  3 ++-
>  chips/busses.h         |  2 +-
>  i386/i386at/autoconf.c | 10 ++++++++--
>  3 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/chips/busses.c b/chips/busses.c
> index 870358b..ed89dcb 100644
> --- a/chips/busses.c
> +++ b/chips/busses.c
> @@ -44,7 +44,7 @@
>  
>  
>  
> -
> +#if 0
>  /*
>   * configure_bus_master
>   *
> @@ -159,6 +159,7 @@ boolean_t configure_bus_master(
>       }
>       return TRUE;
>  }
> +#endif /* 0 */
>  
>  /*
>   * configure_bus_device
> diff --git a/chips/busses.h b/chips/busses.h
> index 982f7ad..a7561cf 100644
> --- a/chips/busses.h
> +++ b/chips/busses.h
> @@ -141,7 +141,7 @@ struct bus_driver {
>  };
>  
>  #ifdef       KERNEL
> -extern struct bus_ctlr               bus_master_init[];
> +/*extern struct bus_ctlr             bus_master_init[];*/
>  extern struct bus_device     bus_device_init[];
>  
>  extern boolean_t configure_bus_master(char *, vm_offset_t, vm_offset_t,
> diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c
> index 93d6b99..72a1e60 100644
> --- a/i386/i386at/autoconf.c
> +++ b/i386/i386at/autoconf.c
> @@ -46,6 +46,7 @@ extern      struct  bus_driver      lprdriver;
>  #include <i386at/lpr.h>
>  #endif /* NLPR */
>  
> +#if 0
>  struct       bus_ctlr        bus_master_init[] = {
>  
>  /* driver    name unit intr    address        len phys_address
> @@ -53,7 +54,7 @@ struct      bus_ctlr        bus_master_init[] = {
>  
>    {0}
>  };
> -
> +#endif /* 0 */
>  
>  struct       bus_device      bus_device_init[] = {
>  
> @@ -93,9 +94,12 @@ struct     bus_device      bus_device_init[] = {
>  void probeio(void)
>  {
>       struct  bus_device      *device;
> -     struct  bus_ctlr        *master;
>       int                     i = 0;
>  
> +     #if 0
> +
> +     struct  bus_ctlr        *master;
> +
>       for (master = bus_master_init; master->driver; master++)
>       {
>               if (configure_bus_master(master->name, master->address,
> @@ -103,6 +107,8 @@ void probeio(void)
>                       i++;
>       }
>  
> +     #endif /* 0 */
> +
>       for (device = bus_device_init; device->driver; device++)
>       {
>               /* ignore what we (should) have found already */
> -- 
> 1.8.1.4
> 
> 

-- 
Samuel
"2 + 2 = 5 pour d'assez grandes valeurs de 2"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]