From: Marcin Slusarz Date: Fri, 8 Feb 2008 12:20:46 +0000 (-0800) Subject: udf: fix udf_debug macro X-Git-Tag: v2.6.25-rc1~136 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=756fa92f4d725698ffa4ac1faeb8f4e8cdb6cd95;p=linux-2.6-omap-h63xx.git udf: fix udf_debug macro udf_debug should be enclosed with do { } while (0) to be safely used in code like below: if (something) udf_debug(); else anything; (Otherwise compiler will not compile it with: "error: expected expression before 'else'") Signed-off-by: Marcin Slusarz Cc: Jan Kara Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h index 36c684e1b11..c954527a41b 100644 --- a/include/linux/udf_fs.h +++ b/include/linux/udf_fs.h @@ -39,11 +39,11 @@ #ifdef UDFFS_DEBUG #define udf_debug(f, a...) \ - { \ + do { \ printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \ __FILE__, __LINE__, __FUNCTION__); \ printk (f, ##a); \ - } + } while (0) #else #define udf_debug(f, a...) /**/ #endif