ChangeSet 1.2199.8.36, 2005/03/22 19:37:26-08:00, [EMAIL PROTECTED]

        [IRDA]: Squash warnings introduced by DEBUG cleanups.
        
        Signed-off-by: David S. Miller <[EMAIL PROTECTED]>



 include/net/irda/irda.h |   13 ++++++++-----
 net/irda/iriap.c        |    2 +-
 net/irda/irlmp.c        |    4 ++--
 3 files changed, 11 insertions(+), 8 deletions(-)


diff -Nru a/include/net/irda/irda.h b/include/net/irda/irda.h
--- a/include/net/irda/irda.h   2005-03-26 17:17:51 -08:00
+++ b/include/net/irda/irda.h   2005-03-26 17:17:51 -08:00
@@ -66,17 +66,20 @@
 /* use 0 for production, 1 for verification, >2 for debug */
 #define IRDA_DEBUG_LEVEL 0
 
-#define IRDA_DEBUG(n, args...) ( (irda_debug >= (n)) ? \
-                                (printk(KERN_DEBUG args)) : \
-                                0 )
+#define IRDA_DEBUG(n, args...) \
+do {   if (irda_debug >= (n)) \
+               printk(KERN_DEBUG args); \
+} while (0)
 #define IRDA_ASSERT(expr, func) \
 do { if(!(expr)) { \
        printk( "Assertion failed! %s:%s:%d %s\n", \
                __FILE__,__FUNCTION__,__LINE__,(#expr) ); \
        func } } while (0)
+#define IRDA_ASSERT_LABEL(label)       label
 #else
-#define IRDA_DEBUG(n, args...) 0
-#define IRDA_ASSERT(expr, func) 0
+#define IRDA_DEBUG(n, args...) do { } while (0)
+#define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0)
+#define IRDA_ASSERT_LABEL(label)
 #endif /* CONFIG_IRDA_DEBUG */
 
 #define IRDA_WARNING(args...) printk(KERN_WARNING args)
diff -Nru a/net/irda/iriap.c b/net/irda/iriap.c
--- a/net/irda/iriap.c  2005-03-26 17:17:51 -08:00
+++ b/net/irda/iriap.c  2005-03-26 17:17:51 -08:00
@@ -1057,7 +1057,7 @@
                        seq_putc(seq, '\n');
 
                }
-       outloop:
+       IRDA_ASSERT_LABEL(outloop:)
                spin_unlock(&obj->attribs->hb_spinlock);
        }
 
diff -Nru a/net/irda/irlmp.c b/net/irda/irlmp.c
--- a/net/irda/irlmp.c  2005-03-26 17:17:51 -08:00
+++ b/net/irda/irlmp.c  2005-03-26 17:17:51 -08:00
@@ -1738,7 +1738,7 @@
         * Jean II */
 errlsap:
        spin_unlock(&lap->lsaps->hb_spinlock);
-errlap:
+IRDA_ASSERT_LABEL(errlap:)
        spin_unlock_irqrestore(&irlmp->links->hb_spinlock, flags);
        return TRUE;
 
@@ -1989,7 +1989,7 @@
                        seq_putc(seq, '\n');
 
                }
-       outloop:
+       IRDA_ASSERT_LABEL(outloop:)
                spin_unlock(&lap->lsaps->hb_spinlock);
                seq_putc(seq, '\n');
        } else
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to