Patch from Bart Van Assche <bart.vanassche@gmail.com>:
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 23 May 2008 09:38:07 +0000 (09:38 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 23 May 2008 09:38:07 +0000 (09:38 +0000)
The patch below makes sure the SCST code compiles again (it was broken by r386). The patch
includes the following changes:
- Make sure that macro's do not end in a semicolon, because otherwise the
  transformation if (condition) { MACRO; } else {...}
  into if (condition) MACRO; else {...}
  results in a compilation error.
- Aligned backslashes (whitespace-only change).
- One "else{" was incorectly changed into "else { {" -- fixed this.

I have verified that the following command again succeeds:
  make -s iscsi scst && make -s -C srpt && make -s -C qla2x00t

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@389 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/include/scst.h
scst/include/scst_debug.h

index 9d61efe..ab7e232 100644 (file)
@@ -1565,7 +1565,7 @@ struct scst_tgt_dev_UA {
 
 #ifndef smp_mb__after_set_bit
 /* There is no smp_mb__after_set_bit() in the kernel */
-#define smp_mb__after_set_bit()                 smp_mb();
+#define smp_mb__after_set_bit()                 smp_mb()
 #endif
 
 /*
index c04015c..93bfc42 100644 (file)
 #define TRACE_ALL            0xffffffff
 /* Flags 0xXXXX0000 are local for users */
 
-#define PRINT(log_flag, format, args...)  printk("%s" format "\n", log_flag, ## args);
-#define PRINTN(log_flag, format, args...) printk("%s" format, log_flag, ## args);
+#define PRINT(log_flag, format, args...)  printk("%s" format "\n", log_flag, ## args)
+#define PRINTN(log_flag, format, args...) printk("%s" format, log_flag, ## args)
 
 #ifdef LOG_PREFIX
 #define __LOG_PREFIX   LOG_PREFIX
@@ -189,7 +189,7 @@ do {                                                                        \
 
 #define __TRACE(trace, format, args...)                                        \
 do {                                                                   \
-       if (trace_flag & (trace)) {                                             \
+       if (trace_flag & (trace)) {                                     \
                char *__tflag = LOG_FLAG;                               \
                if (debug_print_prefix(trace_flag, __tflag, NULL, __FUNCTION__,\
                                       __LINE__) > 0) {                 \
@@ -221,7 +221,7 @@ do {                                                                        \
 
 #define TRACE_BUFF_FLAG(flag, message, buff, len)                      \
 do {                                                                   \
-       if (trace_flag & (flag)) {                                              \
+       if (trace_flag & (flag)) {                                      \
                char *__tflag = LOG_FLAG;                               \
                if (debug_print_prefix(trace_flag, __tflag, NULL, __FUNCTION__, \
                                       __LINE__) > 0) {                 \
@@ -275,7 +275,6 @@ do {                                                                        \
                                __FUNCTION__);                          \
                }                                                       \
                else {                                                  \
-               {                                                       \
                        PRINT(LOG_FLAG, "ENTRY %s", __FUNCTION__);      \
                }                                                       \
        }                                                               \