Minor compiler and checkpatch fixes
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 17 Nov 2009 12:59:49 +0000 (12:59 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 17 Nov 2009 12:59:49 +0000 (12:59 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1341 d57e44dd-8a1f-0410-8b47-8ef2f437770f

iscsi-scst/kernel/nthread.c
scst/src/scst_targ.c

index 9819e69..8b09985 100644 (file)
@@ -765,7 +765,7 @@ out:
 static void process_read_io(struct iscsi_conn *conn, int *closed)
 {
        struct iscsi_cmnd *cmnd = conn->read_cmnd;
-       int res = 0;
+       int res;
 
        TRACE_ENTRY();
 
@@ -914,6 +914,7 @@ static void process_read_io(struct iscsi_conn *conn, int *closed)
 
                default:
                        PRINT_CRIT_ERROR("%d %x", conn->read_state, cmnd_opcode(cmnd));
+                       res = -1; /* to keep compiler happy */
                        sBUG();
                }
        } while (res == 0);
index 0e70224..a68f571 100644 (file)
@@ -3499,6 +3499,11 @@ void scst_process_active_cmd(struct scst_cmd *cmd, bool atomic)
 
        TRACE_ENTRY();
 
+       /*
+        * Checkpatch will complain on the use of in_atomic() below. You
+        * can safely ignore this warning since in_atomic() is used here only
+        * for debugging purposes.
+        */
        EXTRACHECKS_BUG_ON(in_irq() || irqs_disabled());
        EXTRACHECKS_WARN_ON((in_atomic() || in_interrupt() || irqs_disabled()) &&
                             !atomic);