]> err.no Git - linux-2.6/commitdiff
ACPI: fix empty macros found by -Wextra
authorDave Jones <davej@redhat.com>
Mon, 9 Jul 2007 18:33:14 +0000 (11:33 -0700)
committerLen Brown <len.brown@intel.com>
Sun, 22 Jul 2007 04:54:24 +0000 (00:54 -0400)
ACPI has a ton of macros which make a bunch of empty if's when configured
in non-debug mode.

[lenb: The code it complaines about is functionally correct,
 so this patch is just to make -Wextra happier]

#define DBG()

if(...)
        DBG();
next_c_statement

which turns into
if(...) ;
next_c_statement

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/glue.c
include/acpi/acmacros.h

index 41427a41f6201fbcad4c8b7bcbaaa62228e21ed3..4893e256e399bea43ee35a62a0c0fa16667d3bdf 100644 (file)
@@ -16,7 +16,7 @@
 #if ACPI_GLUE_DEBUG
 #define DBG(x...) printk(PREFIX x)
 #else
-#define DBG(x...)
+#define DBG(x...) do { } while(0)
 #endif
 static LIST_HEAD(bus_type_list);
 static DECLARE_RWSEM(bus_type_sem);
index 8948a6461834d1d8fa2eb5cd3a3239d48a8a4483..e64a748bdd2eb7bdd5daf9dfc5f9ab7d279774bb 100644 (file)
 #define ACPI_DEBUG_EXEC(a)
 #define ACPI_NORMAL_EXEC(a)             a;
 
-#define ACPI_DEBUG_DEFINE(a)
-#define ACPI_DEBUG_ONLY_MEMBERS(a)
-#define ACPI_FUNCTION_NAME(a)
-#define ACPI_FUNCTION_TRACE(a)
-#define ACPI_FUNCTION_TRACE_PTR(a,b)
-#define ACPI_FUNCTION_TRACE_U32(a,b)
-#define ACPI_FUNCTION_TRACE_STR(a,b)
-#define ACPI_FUNCTION_EXIT
-#define ACPI_FUNCTION_STATUS_EXIT(s)
-#define ACPI_FUNCTION_VALUE_EXIT(s)
-#define ACPI_FUNCTION_ENTRY()
-#define ACPI_DUMP_STACK_ENTRY(a)
-#define ACPI_DUMP_OPERANDS(a,b,c,d,e)
-#define ACPI_DUMP_ENTRY(a,b)
-#define ACPI_DUMP_TABLES(a,b)
-#define ACPI_DUMP_PATHNAME(a,b,c,d)
-#define ACPI_DUMP_RESOURCE_LIST(a)
-#define ACPI_DUMP_BUFFER(a,b)
-#define ACPI_DEBUG_PRINT(pl)
-#define ACPI_DEBUG_PRINT_RAW(pl)
+#define ACPI_DEBUG_DEFINE(a)           do { } while(0)
+#define ACPI_DEBUG_ONLY_MEMBERS(a)     do { } while(0)
+#define ACPI_FUNCTION_NAME(a)          do { } while(0)
+#define ACPI_FUNCTION_TRACE(a)         do { } while(0)
+#define ACPI_FUNCTION_TRACE_PTR(a,b)   do { } while(0)
+#define ACPI_FUNCTION_TRACE_U32(a,b)   do { } while(0)
+#define ACPI_FUNCTION_TRACE_STR(a,b)   do { } while(0)
+#define ACPI_FUNCTION_EXIT             do { } while(0)
+#define ACPI_FUNCTION_STATUS_EXIT(s)   do { } while(0)
+#define ACPI_FUNCTION_VALUE_EXIT(s)    do { } while(0)
+#define ACPI_FUNCTION_ENTRY()          do { } while(0)
+#define ACPI_DUMP_STACK_ENTRY(a)       do { } while(0)
+#define ACPI_DUMP_OPERANDS(a,b,c,d,e)  do { } while(0)
+#define ACPI_DUMP_ENTRY(a,b)           do { } while(0)
+#define ACPI_DUMP_TABLES(a,b)          do { } while(0)
+#define ACPI_DUMP_PATHNAME(a,b,c,d)    do { } while(0)
+#define ACPI_DUMP_RESOURCE_LIST(a)     do { } while(0)
+#define ACPI_DUMP_BUFFER(a,b)          do { } while(0)
+#define ACPI_DEBUG_PRINT(pl)           do { } while(0)
+#define ACPI_DEBUG_PRINT_RAW(pl)       do { } while(0)
 
 #define return_VOID                     return
 #define return_ACPI_STATUS(s)           return(s)