* [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
@ 2006-07-06 19:54 Henne
2006-07-06 20:14 ` [KJ] " Randy.Dunlap
0 siblings, 1 reply; 8+ messages in thread
From: Henne @ 2006-07-06 19:54 UTC (permalink / raw)
To: Neela.Kolli; +Cc: linux-scsi, linux-kernel, kernel-janitors
From: Henrik Kretzschmar <henne@nachtwindheim.de>
Create an empty inline function to make the legacy megaraid-driver compile
without PROC_FS.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
--- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
+++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
@@ -1039,6 +1039,9 @@
static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
static int proc_rdrv(adapter_t *, char *, int, int);
+#else
+static inline void
+mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
#endif
static int mega_adapinq(adapter_t *, dma_addr_t);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
2006-07-06 19:54 [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Henne
@ 2006-07-06 20:14 ` Randy.Dunlap
2006-07-06 20:33 ` Henne
0 siblings, 1 reply; 8+ messages in thread
From: Randy.Dunlap @ 2006-07-06 20:14 UTC (permalink / raw)
To: Henne; +Cc: Neela.Kolli, kernel-janitors, linux-kernel, linux-scsi
On Thu, 06 Jul 2006 21:54:02 +0200 Henne wrote:
> From: Henrik Kretzschmar <henne@nachtwindheim.de>
>
> Create an empty inline function to make the legacy megaraid-driver compile
> without PROC_FS.
> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
> ---
>
> --- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
> +++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
> @@ -1039,6 +1039,9 @@
> static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
> static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
> static int proc_rdrv(adapter_t *, char *, int, int);
> +#else
> +static inline void
> +mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
> #endif
>
> static int mega_adapinq(adapter_t *, dma_addr_t);
Already in -mm:
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm6/broken-out/drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs=y.patch
---
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
2006-07-06 20:14 ` [KJ] " Randy.Dunlap
@ 2006-07-06 20:33 ` Henne
2006-07-06 20:39 ` Randy.Dunlap
2006-07-06 20:42 ` Adrian Bunk
0 siblings, 2 replies; 8+ messages in thread
From: Henne @ 2006-07-06 20:33 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: Neela.Kolli, kernel-janitors, linux-kernel, linux-scsi
>> From: Henrik Kretzschmar <henne@nachtwindheim.de>
>>
>> Create an empty inline function to make the legacy megaraid-driver compile
>> without PROC_FS.
>> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
>> ---
>>
>> --- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
>> +++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
>> @@ -1039,6 +1039,9 @@
>> static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
>> static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
>> static int proc_rdrv(adapter_t *, char *, int, int);
>> +#else
>> +static inline void
>> +mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
>> #endif
>>
>> static int mega_adapinq(adapter_t *, dma_addr_t);
>
> Already in -mm:
> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm6/broken-out/drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs=y.patch
Great, but isn't it better to put that define stuff into the headers?
Thanks and Greets,
Henne
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
2006-07-06 20:33 ` Henne
@ 2006-07-06 20:39 ` Randy.Dunlap
2006-07-06 20:42 ` Adrian Bunk
1 sibling, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2006-07-06 20:39 UTC (permalink / raw)
To: Henne; +Cc: Neela.Kolli, kernel-janitors, linux-kernel, linux-scsi
On Thu, 06 Jul 2006 22:33:49 +0200 Henne wrote:
> >> From: Henrik Kretzschmar <henne@nachtwindheim.de>
> >>
> >> Create an empty inline function to make the legacy megaraid-driver compile
> >> without PROC_FS.
> >> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
> >> ---
> >>
> >> --- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
> >> +++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
> >> @@ -1039,6 +1039,9 @@
> >> static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
> >> static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
> >> static int proc_rdrv(adapter_t *, char *, int, int);
> >> +#else
> >> +static inline void
> >> +mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
> >> #endif
> >>
> >> static int mega_adapinq(adapter_t *, dma_addr_t);
> >
> > Already in -mm:
> > http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm6/broken-out/drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs=y.patch
> Great, but isn't it better to put that define stuff into the headers?
Sure it is.
---
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
2006-07-06 20:33 ` Henne
2006-07-06 20:39 ` Randy.Dunlap
@ 2006-07-06 20:42 ` Adrian Bunk
2006-07-06 20:54 ` Henne
1 sibling, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2006-07-06 20:42 UTC (permalink / raw)
To: Henne; +Cc: Randy.Dunlap, Neela.Kolli, kernel-janitors, linux-kernel,
linux-scsi
On Thu, Jul 06, 2006 at 10:33:49PM +0200, Henne wrote:
> >> From: Henrik Kretzschmar <henne@nachtwindheim.de>
> >>
> >> Create an empty inline function to make the legacy megaraid-driver compile
> >> without PROC_FS.
> >> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
> >> ---
> >>
> >> --- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
> >> +++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
> >> @@ -1039,6 +1039,9 @@
> >> static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
> >> static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
> >> static int proc_rdrv(adapter_t *, char *, int, int);
> >> +#else
> >> +static inline void
> >> +mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
> >> #endif
> >>
> >> static int mega_adapinq(adapter_t *, dma_addr_t);
> >
> > Already in -mm:
> > http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm6/broken-out/drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs=y.patch
> Great, but isn't it better to put that define stuff into the headers?
No - the function itself is static (and has therefore itself no
prototype in any header).
If the function was global, I'd agree with you.
> Thanks and Greets,
> Henne
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
2006-07-06 20:42 ` Adrian Bunk
@ 2006-07-06 20:54 ` Henne
2006-07-06 21:59 ` Adrian Bunk
0 siblings, 1 reply; 8+ messages in thread
From: Henne @ 2006-07-06 20:54 UTC (permalink / raw)
To: Adrian Bunk
Cc: Randy.Dunlap, Neela.Kolli, kernel-janitors, linux-kernel,
linux-scsi
Adrian Bunk schrieb:
> On Thu, Jul 06, 2006 at 10:33:49PM +0200, Henne wrote:
>>>> From: Henrik Kretzschmar <henne@nachtwindheim.de>
>>>>
>>>> Create an empty inline function to make the legacy megaraid-driver compile
>>>> without PROC_FS.
>>>> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
>>>> ---
>>>>
>>>> --- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
>>>> +++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
>>>> @@ -1039,6 +1039,9 @@
>>>> static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
>>>> static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
>>>> static int proc_rdrv(adapter_t *, char *, int, int);
>>>> +#else
>>>> +static inline void
>>>> +mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
>>>> #endif
>>>>
>>>> static int mega_adapinq(adapter_t *, dma_addr_t);
>>> Already in -mm:
>>> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm6/broken-out/drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs=y.patch
>> Great, but isn't it better to put that define stuff into the headers?
>
> No - the function itself is static (and has therefore itself no
> prototype in any header).
>
> If the function was global, I'd agree with you.
>
>> Thanks and Greets,
>> Henne
>
> cu
> Adrian
>
The header I mean is /drivers/scsi/megaraid.h and is only used by megaraid.c.
And there are the prototypes, in dependency of CONFIG_PROC_FS, for all these other proc-related functions.
Thats why I decided to make the change there and not in megaraid.c .
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
2006-07-06 20:54 ` Henne
@ 2006-07-06 21:59 ` Adrian Bunk
2006-07-07 6:32 ` Henne
0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2006-07-06 21:59 UTC (permalink / raw)
To: Henne; +Cc: Randy.Dunlap, Neela.Kolli, kernel-janitors, linux-kernel,
linux-scsi
On Thu, Jul 06, 2006 at 10:54:57PM +0200, Henne wrote:
> Adrian Bunk schrieb:
> > On Thu, Jul 06, 2006 at 10:33:49PM +0200, Henne wrote:
> >>>> From: Henrik Kretzschmar <henne@nachtwindheim.de>
> >>>>
> >>>> Create an empty inline function to make the legacy megaraid-driver compile
> >>>> without PROC_FS.
> >>>> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
> >>>> ---
> >>>>
> >>>> --- linux-2.6.18-rc1/drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200
> >>>> +++ linux/drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200
> >>>> @@ -1039,6 +1039,9 @@
> >>>> static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
> >>>> static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
> >>>> static int proc_rdrv(adapter_t *, char *, int, int);
> >>>> +#else
> >>>> +static inline void
> >>>> +mega_create_proc_entry(int index, struct proc_dir_entry *parent) {}
> >>>> #endif
> >>>>
> >>>> static int mega_adapinq(adapter_t *, dma_addr_t);
> >>> Already in -mm:
> >>> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm6/broken-out/drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs=y.patch
> >> Great, but isn't it better to put that define stuff into the headers?
> >
> > No - the function itself is static (and has therefore itself no
> > prototype in any header).
> >
> > If the function was global, I'd agree with you.
> >
> >> Thanks and Greets,
> >> Henne
> >
> > cu
> > Adrian
> >
> The header I mean is /drivers/scsi/megaraid.h and is only used by megaraid.c.
> And there are the prototypes, in dependency of CONFIG_PROC_FS, for all these other proc-related functions.
> Thats why I decided to make the change there and not in megaraid.c .
Prototypes for static functions don't belong into header files.
That this has been done in megaraid.h in the past is something that
should be cleaned up, not a good example.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS
2006-07-06 21:59 ` Adrian Bunk
@ 2006-07-07 6:32 ` Henne
0 siblings, 0 replies; 8+ messages in thread
From: Henne @ 2006-07-07 6:32 UTC (permalink / raw)
To: Adrian Bunk
Cc: Randy.Dunlap, Neela.Kolli, kernel-janitors, linux-kernel,
linux-scsi
>> The header I mean is /drivers/scsi/megaraid.h and is only used by megaraid.c.
>> And there are the prototypes, in dependency of CONFIG_PROC_FS, for all these other proc-related functions.
>> Thats why I decided to make the change there and not in megaraid.c .
>
> Prototypes for static functions don't belong into header files.
>
> That this has been done in megaraid.h in the past is something that
> should be cleaned up, not a good example.
>
> cu
> Adrian
Allright,
thats that kind of answer I wanted to hear. :)
Thanks and Greets,
Henne
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-07-07 6:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-06 19:54 [PATCH] fix legacy megaraid-driver to compile without CONFIG_PROC_FS Henne
2006-07-06 20:14 ` [KJ] " Randy.Dunlap
2006-07-06 20:33 ` Henne
2006-07-06 20:39 ` Randy.Dunlap
2006-07-06 20:42 ` Adrian Bunk
2006-07-06 20:54 ` Henne
2006-07-06 21:59 ` Adrian Bunk
2006-07-07 6:32 ` Henne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox