Exclude unneeded code from the kernel patch generation
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 23 Oct 2009 18:02:25 +0000 (18:02 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 23 Oct 2009 18:02:25 +0000 (18:02 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1262 d57e44dd-8a1f-0410-8b47-8ef2f437770f

iscsi-scst/kernel/iscsi.c

index 2cca098..36baa15 100644 (file)
 #include "iscsi.h"
 #include "digest.h"
 
+#ifndef GENERATING_UPSTREAM_PATCH
 #if !defined(CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION)
 #warning "Patch put_page_callback-<kernel-version>.patch not applied on your\
  kernel or CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION\
  config option not set. ISCSI-SCST will be working with not the best\
  performance. Refer README file for details."
 #endif
+#endif
 
 #define ISCSI_INIT_WRITE_WAKE          0x1
 #define ISCSI_INIT_WRITE_REMOVE_HASH   0x2
@@ -3226,10 +3228,12 @@ static int __init iscsi_init(void)
                goto out_free_dummy;
        }
 #else
+#ifndef GENERATING_UPSTREAM_PATCH
        PRINT_WARNING("%s",
                "CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION "
                "not enabled in your kernel. ISCSI-SCST will be working with "
                "not the best performance. Refer README file for details.");
+#endif
 #endif
 
        ctr_major = register_chrdev(0, ctr_name, &ctr_fops);