Rasmus Andersen wrote:
> Now we are looking at this driver, could we include the following patch?
> It makes gcc stop complaining about unused functions and variables when
> compiling cpqarray.c.
> 
> --- linux-240-test10-pre4-clean/drivers/block/cpqarray.c        Thu Oct 19 21:20:31 
>2000
> +++ linux/drivers/block/cpqarray.c      Fri Oct 20 21:37:03 2000
> @@ -103,7 +103,9 @@
>  static int * ida_hardsizes;
>  static struct gendisk ida_gendisk[MAX_CTLR];
> 
> +#ifdef CONFIG_PROC_FS
>  static struct proc_dir_entry *proc_array;
> +#endif
> 
>  /* Debug... */
>  #define DBG(s) do { s } while(0)
> @@ -173,10 +175,6 @@
>  #ifdef CONFIG_PROC_FS
>  static void ida_procinit(int i);
>  static int ida_proc_get_info(char *buffer, char **start, off_t offset, int length, 
>int *eof, void *data);
> -#else
> -static void ida_procinit(int i) {}
> -static int ida_proc_get_info(char *buffer, char **start, off_t offset,
> -                            int length, int *eof, void *data) { return 0;}
>  #endif
> 
>  static void ida_geninit(int ctlr)
> @@ -495,8 +493,9 @@
> 
>                 hba[i]->access.set_intr_mask(hba[i], FIFO_NOT_EMPTY);
> 
> -
> +#ifdef CONFIG_PROC_FS
>                 ida_procinit(i);
> +#endif
> 
>                 blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR + i),
>                         request_fns[i]);

Look at include/linux/proc_fs.h...  Like pci.h, it is designed to
eliminate the need for ifdef's in the code.  Is there another way you
could work up this patch, with that in mind?

        Jeff



-- 
Jeff Garzik                    | The difference between laziness and
Building 1024                  | prioritization is the end result.
MandrakeSoft                   |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to