lkdtm: fix for CONFIG_SCSI=n
PATCH 10/12 lkdtm: fix for CONFIG_SCSI=n
From: Randy Dunlap <[email protected]>
From: Randy Dunlap <[email protected]>
Fix lkdtm test code for case of CONFIG_SCSI=n, to avoid build errors:
In file included from linux-next-20080618/tests/lkdtm.c:55:linux-next-20080618/include/scsi/scsi_cmnd.h:28:25: warning: "BLK_MAX_CDB" is not defined linux-next-20080618/include/scsi/scsi_cmnd.h:29:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB In file included from linux-next-20080618/tests/lkdtm.c:55:linux-next-20080618/include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':linux-next-20080618/include/scsi/scsi_cmnd.h:183: error: implicit declaration of function 'blk_bidi_rq' linux-next-20080618/include/scsi/scsi_cmnd.h:184: error: dereferencing pointer to incomplete type linux-next-20080618/include/scsi/scsi_cmnd.h: In function 'scsi_in':linux-next-20080618/include/scsi/scsi_cmnd.h:190: error: dereferencing pointer to incomplete type make[2]: *** [tests/lkdtm.o] Error 1
---
tests/lkdtm.c | 8 ++++++++ 1 file changed, 8 insertions(+)
tests/lkdtm.c renamed from tests/lkdtm.c~lkdtm-fix-for-config_scsi=n +8 -0
@@ -53,7 +53,9 @@#include <linux/interrupt.h> #include <linux/hrtimer.h> #include <linux/ide.h> +#ifdef CONFIG_SCSI #include <scsi/scsi_cmnd.h> +#endif #define NUM_CPOINTS 8#define NUM_CPOINT_TYPES 5
@@ -172,12 +174,14 @@ static int jp_hrtimer_start(struct hrtimreturn 0 ; } +#ifdef CONFIG_SCSI static int jp_scsi_dispatch_cmd (struct scsi_cmnd *cmd) {lkdtm_handler ();jprobe_return ();return 0 ; } +#endif #ifdef CONFIG_IDE int jp_generic_ide_ioctl(ide_drive_t *drive, struct file *file,
@@ -304,8 +308,12 @@ static int __init lkdtm_module_init(void lkdtm.entry = (kprobe_opcode_t *) jp_hrtimer_start;break ;case SCSI_DISPATCH_CMD : +#ifdef CONFIG_SCSI lkdtm.kp.symbol_name ="scsi_dispatch_cmd" ; lkdtm.entry = (kprobe_opcode_t *) jp_scsi_dispatch_cmd; +#else +printk (KERN_INFO "lkdtm : Crash point not available\n" ); +#endif break ;case IDE_CORE_CP :#ifdef CONFIG_IDE
_
James Bottomley
maintainertests/lkdtm.c
Quoted 28 lines · On Wed, 2008-07-30 at 12:44 -0700, [email protected] wrote:
From: Randy Dunlap <[email protected]>
From: Randy Dunlap <[email protected]>
Fix lkdtm test code for case of
CONFIG_SCSI=n, to avoid build errors:In file included from
linux-next-20080618/tests/lkdtm.c:55:linux-next-20080618/include/scsi/scsi_cmnd.h:28:25: warning: "BLK_MAX_CDB" is not definedlinux-next-20080618/include/scsi/scsi_cmnd.h:29:3: error: #errorMAX_COMMAND_SIZEcan not be bigger thanBLK_MAX_CDBIn file included fromlinux-next-20080618/tests/lkdtm.c:55:linux-next-20080618/include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':linux-next-20080618/include/scsi/scsi_cmnd.h:183: error: implicit declaration of function 'blk_bidi_rq'linux-next-20080618/include/scsi/scsi_cmnd.h:184: error: dereferencing pointer to incomplete typelinux-next-20080618/include/scsi/scsi_cmnd.h: In function 'scsi_in':linux-next-20080618/include/scsi/scsi_cmnd.h:190: error: dereferencing pointer to incomplete type make[2]: *** [tests/lkdtm.o] Error 1Signed-off-by Randy Dunlap <[email protected]>Acked-by Ankita Garg <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
tests/lkdtm.c | 8 ++++++++ 1 file changed, 8 insertions(+)diff -puN tests/lkdtm.c~lkdtm-fix-for-config_scsi=n
tests/lkdtm.ctests/lkdtm.c renamed from tests/lkdtm.c~lkdtm-fix-for-config_scsi=n +0
-0
OK, you've sent me this one twice now ... what exactly is it? There's no tests directory in any kernel tree I have.
James
Quoted 23 lines · On Wed, 30 Jul 2008 15:16:48 -0500 James Bottomley…
Quoted 22 lines · On Wed, 2008-07-30 at 12:44 -0700, [email protected] wrote:
From: Randy Dunlap <[email protected]>
From: Randy Dunlap <[email protected]>
Fix lkdtm test code for case of
CONFIG_SCSI=n, to avoid build errors:In file included from
linux-next-20080618/tests/lkdtm.c:55:linux-next-20080618/include/scsi/scsi_cmnd.h:28:25: warning: "BLK_MAX_CDB" is not definedlinux-next-20080618/include/scsi/scsi_cmnd.h:29:3: error: #errorMAX_COMMAND_SIZEcan not be bigger thanBLK_MAX_CDBIn file included fromlinux-next-20080618/tests/lkdtm.c:55:linux-next-20080618/include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':linux-next-20080618/include/scsi/scsi_cmnd.h:183: error: implicit declaration of function 'blk_bidi_rq'linux-next-20080618/include/scsi/scsi_cmnd.h:184: error: dereferencing pointer to incomplete typelinux-next-20080618/include/scsi/scsi_cmnd.h: In function 'scsi_in':linux-next-20080618/include/scsi/scsi_cmnd.h:190: error: dereferencing pointer to incomplete type make[2]: *** [tests/lkdtm.o] Error 1Signed-off-by Randy Dunlap <[email protected]>Acked-by Ankita Garg <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
Quoted 8 lines
tests/lkdtm.c
Quoted 6 lines
tests/lkdtm.c | 8 ++++++++ 1 file changed, 8 insertions(+)diff -puN tests/lkdtm.c~lkdtm-fix-for-config_scsi=n
tests/lkdtm.ctests/lkdtm.c renamed from tests/lkdtm.c~lkdtm-fix-for-config_scsi=n +0
-0OK, you've sent me this one twice now ... what exactly is it?
Why didn't you tell me last time?
Quoted 2 lines
There's
no tests directory in any kernel tree I have.
You don't have a copy of linux-next? Wow.
I'll send it to Sam.
James Bottomley
maintainerQuoted 29 lines · Andrew Morton
Quoted 26 lines · On Wed, 30 Jul 2008 15:16:48 -0500 James Bottomley…
Quoted 25 lines · On Wed, 2008-07-30 at 12:44 -0700, [email protected] wrote:
From: Randy Dunlap <[email protected]>
From: Randy Dunlap <[email protected]>
Fix lkdtm test code for case of
CONFIG_SCSI=n, to avoid build errors:In file included from
linux-next-20080618/tests/lkdtm.c:55:linux-next-20080618/include/scsi/scsi_cmnd.h:28:25: warning: "BLK_MAX_CDB" is not definedlinux-next-20080618/include/scsi/scsi_cmnd.h:29:3: error: #errorMAX_COMMAND_SIZEcan not be bigger thanBLK_MAX_CDBIn file included fromlinux-next-20080618/tests/lkdtm.c:55:linux-next-20080618/include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':linux-next-20080618/include/scsi/scsi_cmnd.h:183: error: implicit declaration of function 'blk_bidi_rq'linux-next-20080618/include/scsi/scsi_cmnd.h:184: error: dereferencing pointer to incomplete typelinux-next-20080618/include/scsi/scsi_cmnd.h: In function 'scsi_in':linux-next-20080618/include/scsi/scsi_cmnd.h:190: error: dereferencing pointer to incomplete type make[2]: *** [tests/lkdtm.o] Error 1Signed-off-by Randy Dunlap <[email protected]>Acked-by Ankita Garg <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
tests/lkdtm.c | 8 ++++++++ 1 file changed, 8 insertions(+)
Quoted 7 lines
Quoted 5 lines
tests/lkdtm.c
Quoted 3 lines
diff -puN tests/lkdtm.c~lkdtm-fix-for-config_scsi=n
tests/lkdtm.ctests/lkdtm.c renamed from tests/lkdtm.c~lkdtm-fix-for-config_scsi=n +0
-0OK, you've sent me this one twice now ... what exactly is it?
Why didn't you tell me last time?
I assumed it was a piece of something I didn't have but which would appear in mainline after the merge window opened. Now the merge window has opened and closed ...
Quoted 4 lines
Quoted 2 lines
There's
no tests directory in any kernel tree I have.You don't have a copy of linux-next? Wow.
Erm .. what is it that was in linux-next before 2.6.26 and still isn't in mainline? Isn't that a linux-next protocol violation?
Quoted 1 line
I'll send it to Sam.
If he has the unmerged tree for this, sure.
James
Quoted 5 lines
I assumed it was a piece of something I didn't have but which would appear in mainline after the merge window opened. Now the merge window has opened and closed ...
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
There's
no tests directory in any kernel tree I have.You don't have a copy of linux-next? Wow.
Erm .. what is it that was in linux-next before 2.6.26 and still isn't in mainline? Isn't that a linux-next protocol violation?
The pull request was sent late and ignored.
Quoted 4 lines
Quoted 2 lines
I'll send it to Sam.
If he has the unmerged tree for this, sure.
I do.
Sam