Rearranged preprocessor statements containing version checks such that these

are now processed correctly by scripts/specialize-patch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1048 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2009-08-14 18:53:10 +00:00
parent 2232922dd9
commit dedefa34de
3 changed files with 12 additions and 12 deletions

View File

@@ -1247,8 +1247,8 @@ int scst_alloc_device(gfp_t gfp_mask, struct scst_device **out_dev)
dev->queue_alg = SCST_CONTR_MODE_QUEUE_ALG_UNRESTRICTED_REORDER;
dev->dev_num = dev_num++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
#if defined(CONFIG_BLOCK) && defined(SCST_IO_CONTEXT)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) && defined(SCST_IO_CONTEXT)
#if defined(CONFIG_BLOCK)
dev->dev_io_ctx = alloc_io_context(GFP_KERNEL, -1);
if (dev->dev_io_ctx == NULL) {
TRACE(TRACE_OUT_OF_MEM, "%s", "Failed to alloc dev IO context");
@@ -1553,8 +1553,8 @@ static struct scst_tgt_dev *scst_alloc_add_tgt_dev(struct scst_session *sess,
tgt_dev->sess->initiator_name);
tgt_dev->tgt_dev_io_ctx = ioc_task_link(t->tgt_dev_io_ctx);
} else {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
#if defined(CONFIG_BLOCK) && defined(SCST_IO_CONTEXT)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) && defined(SCST_IO_CONTEXT)
#if defined(CONFIG_BLOCK)
tgt_dev->tgt_dev_io_ctx = alloc_io_context(GFP_KERNEL, -1);
if (tgt_dev->tgt_dev_io_ctx == NULL) {
TRACE(TRACE_OUT_OF_MEM, "Failed to alloc tgt_dev IO "

View File

@@ -40,9 +40,8 @@
details."
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
#if !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && \
!defined(CONFIG_SCST_STRICT_SERIALIZING)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) && !defined(SCSI_EXEC_REQ_FIFO_DEFINED)
#if !defined(CONFIG_SCST_STRICT_SERIALIZING)
#warning "Patch scst_exec_req_fifo-<kernel-version> was not applied on\
your kernel and CONFIG_SCST_STRICT_SERIALIZING isn't defined.\
Pass-through dev handlers will not work."
@@ -915,9 +914,8 @@ int __scst_register_dev_driver(struct scst_dev_type *dev_type,
if (res != 0)
goto out_error;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
#if !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && \
!defined(CONFIG_SCST_STRICT_SERIALIZING)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) && !defined(SCSI_EXEC_REQ_FIFO_DEFINED)
#if !defined(CONFIG_SCST_STRICT_SERIALIZING)
if (dev_type->exec == NULL) {
PRINT_ERROR("Pass-through dev handlers (handler \"%s\") not "
"supported. Consider applying on your kernel patch "

View File

@@ -185,7 +185,8 @@ static DEFINE_MUTEX(scst_proc_mutex);
#include <linux/ctype.h>
#if !defined(CONFIG_PPC) && (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) && (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < 5 * 256 + 3)
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) && (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < 5 * 256 + 3)
#if !defined(CONFIG_PPC)
/*
* If strcasecmp() and strncasecmp() have already been declared in
* <linux/string.h>, do not redefine these functions. Declarations for these
@@ -232,7 +233,8 @@ static int strncasecmp(const char *s1, const char *s2, size_t n)
return c1 - c2;
}
#endif /* !CONFIG_PPC && (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) */
#endif /* !CONFIG_PPC */
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) && (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < 5 * 256 + 3) */
#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)