fix legacy megaraid-driver to compile without CONFIG_PROC_FS
Subsystems (3)
PATCH 1/1 fix legacy megaraid-driver to compile without CONFIG_PROC_FS
From: Henrik Kretzschmar <[email protected]>
Create an empty inline function to make the legacy megaraid-driver compile without PROC_FS.
---
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +3 -0
@@ -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);
Quoted 10 lines · On Thu, 06 Jul 2006 21:54:02 +0200 Henne wrote:
From: Henrik Kretzschmar <[email protected]>
Create an empty inline function to make the legacy megaraid-driver compile without
PROC_FS.Signed-off-by Henrik Kretzschmar <[email protected]>---
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 line 1047
Quoted 9 lines
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +3
-0@@ -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);
---
~Randy
Quoted 18 lines
Quoted 18 lines
From: Henrik Kretzschmar <[email protected]>
Create an empty inline function to make the legacy megaraid-driver compile without
PROC_FS.Signed-off-by Henrik Kretzschmar <[email protected]>---
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +3
-0@@ -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
Quoted 4 lines
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 line 1047
Quoted 1 line
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +0
-0static int mega_adapinq(adapter_t *, dma_addr_t);
Great, but isn't it better to put that define stuff into the headers?
Thanks and Greets,
Henne
Quoted 18 lines · On Thu, 06 Jul 2006 22:33:49 +0200 Henne wrote:
Quoted 18 lines
Quoted 18 lines
From: Henrik Kretzschmar <[email protected]>
Create an empty inline function to make the legacy megaraid-driver compile without
PROC_FS.Signed-off-by Henrik Kretzschmar <[email protected]>---
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +3
-0@@ -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
Quoted 5 lines
Quoted 4 lines
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 line 1047
Quoted 1 line
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +0
-0static int mega_adapinq(adapter_t *, dma_addr_t);Great, but isn't it better to put that define stuff into the headers?
Sure it is.
---
~Randy
Quoted 18 lines · Henne
Quoted 18 lines
Quoted 18 lines
From: Henrik Kretzschmar <[email protected]>
Create an empty inline function to make the legacy megaraid-driver compile without
PROC_FS.Signed-off-by Henrik Kretzschmar <[email protected]>---
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +3
-0@@ -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
Quoted 5 lines
Quoted 4 lines
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 line 1047
Quoted 1 line
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +0
-0static int mega_adapinq(adapter_t *, dma_addr_t);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.
Quoted 2 lines
Thanks and Greets,
Henne
cu
Adrian
Signature · 9 lines
"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
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitorsQuoted 27 lines · Adrian Bunk
Quoted 18 lines · Henne
Quoted 18 lines
Quoted 18 lines
From: Henrik Kretzschmar <[email protected]>
Create an empty inline function to make the legacy megaraid-driver compile without
PROC_FS.Signed-off-by Henrik Kretzschmar <[email protected]>---
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +3
-0@@ -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) {} #endifQuoted 4 lines
Quoted 3 lines
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 line 1047
Quoted 1 line
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +0
-0static int mega_adapinq(adapter_t *, dma_addr_t);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).
Quoted 8 lines
If the function was global, I'd agree with you.
Quoted 2 lines
Thanks and Greets,
Hennecu
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 .
Quoted 33 lines · Henne
Quoted 32 lines · Adrian Bunk
Quoted 18 lines · Henne
Quoted 18 lines
Quoted 18 lines
From: Henrik Kretzschmar <[email protected]>
Create an empty inline function to make the legacy megaraid-driver compile without
PROC_FS.Signed-off-by Henrik Kretzschmar <[email protected]>---
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +3
-0@@ -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) {} #endifQuoted 4 lines
Quoted 3 lines
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 line 1047
Quoted 1 line
drivers/scsi/megaraid.h 2006-07-06 21:39:59.000000000 +0200 renamed from drivers/scsi/megaraid.h 2006-06-18 03:49:35.000000000 +0200 +0
-0static int mega_adapinq(adapter_t *, dma_addr_t);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.
Quoted 2 lines
Thanks and Greets,
Henne
Quoted 6 lines
Quoted 3 lines
cu
AdrianThe header I mean is /drivers/scsi/megaraid.h and is only used by
megaraid.c.
And there are the prototypes, in dependency ofCONFIG_PROC_FS, for all these other proc-related functions. Thats why I decided to make the change there and not inmegaraid.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
Signature · 9 lines
"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
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitorsQuoted 11 lines
Quoted 3 lines
The header I mean is /drivers/scsi/megaraid.h and is only used by
megaraid.c.
And there are the prototypes, in dependency ofCONFIG_PROC_FS, for all these other proc-related functions. Thats why I decided to make the change there and not inmegaraid.c.Prototypes for static functions don't belong into header files.
That this has been done in
megaraid.hin 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