From: akpm@linux-foundation.org
To: James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, akpm@linux-foundation.org,
randy.dunlap@oracle.com, ankita@in.ibm.com
Subject: [patch 10/12] lkdtm: fix for CONFIG_SCSI=n
Date: Wed, 30 Jul 2008 12:44:28 -0700 [thread overview]
Message-ID: <200807301944.m6UJiSab012906@imap1.linux-foundation.org> (raw)
From: Randy Dunlap <randy.dunlap@oracle.com>
From: Randy Dunlap <randy.dunlap@oracle.com>
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
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Ankita Garg <ankita@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tests/lkdtm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff -puN tests/lkdtm.c~lkdtm-fix-for-config_scsi=n tests/lkdtm.c
--- a/tests/lkdtm.c~lkdtm-fix-for-config_scsi=n
+++ a/tests/lkdtm.c
@@ -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 hrtim
return 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
_
next reply other threads:[~2008-07-30 19:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 19:44 akpm [this message]
2008-07-30 20:16 ` [patch 10/12] lkdtm: fix for CONFIG_SCSI=n James Bottomley
2008-07-30 20:42 ` Andrew Morton
2008-07-30 20:47 ` James Bottomley
2008-07-30 20:55 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200807301944.m6UJiSab012906@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=ankita@in.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.