lkml.org 
[lkml]   [2000]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpqarray: several fixes/cleanups
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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.075 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site