mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] alpha: fixup BUG macro
@ 2009-02-04 10:16 Alexey Dobriyan
  2009-02-04 10:34 ` Ivan Kokshaysky
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2009-02-04 10:16 UTC (permalink / raw)
  To: akpm, ink; +Cc: linux-kernel

Do usual do {} while (0) dance, otherwise

fs/gfs2/util.c:99: error: expected expression before 'else'
drivers/scsi/lpfc/lpfc_sli.c:363: error: expected expression before 'else'

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/alpha/include/asm/bug.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/alpha/include/asm/bug.h
+++ b/arch/alpha/include/asm/bug.h
@@ -8,12 +8,12 @@
 
 /* ??? Would be nice to use .gprel32 here, but we can't be sure that the
    function loaded the GP, so this could fail in modules.  */
-#define BUG()	{							\
+#define BUG()	do {							\
 	__asm__ __volatile__(						\
 		"call_pal %0  # bugchk\n\t"				\
 		".long %1\n\t.8byte %2"					\
 		: : "i"(PAL_bugchk), "i"(__LINE__), "i"(__FILE__));	\
-	for ( ; ; ); }
+	for ( ; ; ); } while (0)
 
 #define HAVE_ARCH_BUG
 #endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] alpha: fixup BUG macro
  2009-02-04 10:16 [PATCH] alpha: fixup BUG macro Alexey Dobriyan
@ 2009-02-04 10:34 ` Ivan Kokshaysky
  0 siblings, 0 replies; 2+ messages in thread
From: Ivan Kokshaysky @ 2009-02-04 10:34 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: akpm, linux-kernel

On Wed, Feb 04, 2009 at 01:16:52PM +0300, Alexey Dobriyan wrote:
> Do usual do {} while (0) dance, otherwise
> 
> fs/gfs2/util.c:99: error: expected expression before 'else'
> drivers/scsi/lpfc/lpfc_sli.c:363: error: expected expression before 'else'
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

Ivan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-04 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-04 10:16 [PATCH] alpha: fixup BUG macro Alexey Dobriyan
2009-02-04 10:34 ` Ivan Kokshaysky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®