[Top] [All Lists]

[PATCH] xfs: Do not name variables "panic"

To: Dave Chinner <dchinner@xxxxxxxxxx>, Alex Elder <aelder@xxxxxxx>, Christoph Hellwig <hch@xxxxxx>
Subject: [PATCH] xfs: Do not name variables "panic"
From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Date: Sun, 16 Jan 2011 14:14:25 +0100 (CET)
Cc: xfs@xxxxxxxxxxx, Linux Kernel Development <linux-kernel@xxxxxxxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx
Sender: geert@xxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On platforms that call panic() inside their BUG() macro (m68k/sun3, and
all platforms that don't set HAVE_ARCH_BUG), compilation fails with:

| fs/xfs/support/debug.c: In function ʽxfs_cmn_errʼ:
| fs/xfs/support/debug.c:92: error: called object ʽpanicʼ is not a function

as the local variable "panic" conflicts with the "panic()" function.
Rename the local variable to resolve this.

Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
m68k/sun3: http://kisskb.ellerman.id.au/kisskb/buildresult/3779006/
None of the !HAVE_ARCH_BUG archs (h8300, m32r, m68knommu, microblaze, score,
tile, xtensa) seems to be covered by linux-next

 fs/xfs/support/debug.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c
index e6cf955..0df8889 100644
--- a/fs/xfs/support/debug.c
+++ b/fs/xfs/support/debug.c
@@ -75,11 +75,11 @@ xfs_cmn_err(
        struct va_format        vaf;
        va_list                 args;
-       int                     panic = 0;
+       int                     do_panic = 0;
        if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) {
                printk(KERN_ALERT "XFS: Transforming an alert into a BUG.");
-               panic = 1;
+               do_panic = 1;
        va_start(args, fmt);
@@ -89,7 +89,7 @@ xfs_cmn_err(
        printk(KERN_ALERT "Filesystem %s: %pV", mp->m_fsname, &vaf);
-       BUG_ON(panic);
+       BUG_ON(do_panic);



Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] xfs: Do not name variables "panic", Geert Uytterhoeven <=