[XFS] replace remaining __FUNCTION__ occurrences
authorHarvey Harrison <harvey.harrison@gmail.com>
Thu, 10 Apr 2008 02:19:21 +0000 (12:19 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 18 Apr 2008 01:51:26 +0000 (11:51 +1000)
__FUNCTION__ is gcc-specific, use __func__

SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30775a

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
12 files changed:
fs/xfs/linux-2.6/kmem.c
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_vnode.h
fs/xfs/xfs_alloc.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap.h
fs/xfs/xfs_bmap_btree.c
fs/xfs/xfs_filestream.c
fs/xfs/xfs_log.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_trans_ail.c

index e040f1ce1b6a71885c6453c620bcf3642ddd45c1..9b1bb17a050160487dfa00887e385d017a0b496b 100644 (file)
@@ -37,7 +37,7 @@ kmem_alloc(size_t size, unsigned int __nocast flags)
 #ifdef DEBUG
        if (unlikely(!(flags & KM_LARGE) && (size > PAGE_SIZE))) {
                printk(KERN_WARNING "Large %s attempt, size=%ld\n",
-                       __FUNCTION__, (long)size);
+                       __func__, (long)size);
                dump_stack();
        }
 #endif
@@ -52,7 +52,7 @@ kmem_alloc(size_t size, unsigned int __nocast flags)
                if (!(++retries % 100))
                        printk(KERN_ERR "XFS: possible memory allocation "
                                        "deadlock in %s (mode:0x%x)\n",
-                                       __FUNCTION__, lflags);
+                                       __func__, lflags);
                congestion_wait(WRITE, HZ/50);
        } while (1);
 }
@@ -129,7 +129,7 @@ kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags)
                if (!(++retries % 100))
                        printk(KERN_ERR "XFS: possible memory allocation "
                                        "deadlock in %s (mode:0x%x)\n",
-                                       __FUNCTION__, lflags);
+                                       __func__, lflags);
                congestion_wait(WRITE, HZ/50);
        } while (1);
 }
index e347bfd47c9126f30680820519c31b4f06d91294..142ddbece37444e3f5ba4574a1d21fd3e16c84eb 100644 (file)
@@ -400,7 +400,7 @@ _xfs_buf_lookup_pages(
                                printk(KERN_ERR
                                        "XFS: possible memory allocation "
                                        "deadlock in %s (mode:0x%x)\n",
-                                       __FUNCTION__, gfp_mask);
+                                       __func__, gfp_mask);
 
                        XFS_STATS_INC(xb_page_retries);
                        xfsbufd_wakeup(0, gfp_mask);
@@ -598,7 +598,7 @@ xfs_buf_get_flags(
                error = _xfs_buf_map_pages(bp, flags);
                if (unlikely(error)) {
                        printk(KERN_WARNING "%s: failed to map pages\n",
-                                       __FUNCTION__);
+                                       __func__);
                        goto no_buffer;
                }
        }
@@ -778,7 +778,7 @@ xfs_buf_get_noaddr(
        error = _xfs_buf_map_pages(bp, XBF_MAPPED);
        if (unlikely(error)) {
                printk(KERN_WARNING "%s: failed to map pages\n",
-                               __FUNCTION__);
+                               __func__);
                goto fail_free_mem;
        }
 
index 72e55db948d25309a0ded203c522b3f81088d65e..fb561beea3730f3bd4fea92a9de2aa04236e17af 100644 (file)
@@ -935,7 +935,7 @@ xfs_fs_clear_inode(
                xfs_inactive(ip);
                xfs_iflags_clear(ip, XFS_IMODIFIED);
                if (xfs_reclaim(ip))
-                       panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, inode);
+                       panic("%s: cannot reclaim 0x%p\n", __func__, inode);
        }
 
        ASSERT(XFS_I(inode) == NULL);
index 4ed5914adefb8272ddc8b49d0b87850dba1eddec..dbb8a5d27f7838115bd763510aae2a7da30c8b9b 100644 (file)
@@ -288,9 +288,9 @@ extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *);
 extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *);
 extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *);
 #define xfs_itrace_entry(ip)   \
-       _xfs_itrace_entry(ip, __FUNCTION__, (inst_t *)__return_address)
+       _xfs_itrace_entry(ip, __func__, (inst_t *)__return_address)
 #define xfs_itrace_exit(ip)    \
-       _xfs_itrace_exit(ip, __FUNCTION__, (inst_t *)__return_address)
+       _xfs_itrace_exit(ip, __func__, (inst_t *)__return_address)
 #define xfs_itrace_exit_tag(ip, tag)   \
        _xfs_itrace_exit(ip, tag, (inst_t *)__return_address)
 #define xfs_itrace_ref(ip)     \
index bdbfbbee4959f2a59e051649414b367ab10ed386..bd5c01788effbe100cadc8ef5b750afbd719c91f 100644 (file)
@@ -55,17 +55,17 @@ xfs_alloc_search_busy(xfs_trans_t *tp,
 ktrace_t *xfs_alloc_trace_buf;
 
 #define        TRACE_ALLOC(s,a)        \
-       xfs_alloc_trace_alloc(__FUNCTION__, s, a, __LINE__)
+       xfs_alloc_trace_alloc(__func__, s, a, __LINE__)
 #define        TRACE_FREE(s,a,b,x,f)   \
-       xfs_alloc_trace_free(__FUNCTION__, s, mp, a, b, x, f, __LINE__)
+       xfs_alloc_trace_free(__func__, s, mp, a, b, x, f, __LINE__)
 #define        TRACE_MODAGF(s,a,f)     \
-       xfs_alloc_trace_modagf(__FUNCTION__, s, mp, a, f, __LINE__)
-#define        TRACE_BUSY(__FUNCTION__,s,ag,agb,l,sl,tp)       \
-       xfs_alloc_trace_busy(__FUNCTION__, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSY, __LINE__)
-#define        TRACE_UNBUSY(__FUNCTION__,s,ag,sl,tp)   \
-       xfs_alloc_trace_busy(__FUNCTION__, s, mp, ag, -1, -1, sl, tp, XFS_ALLOC_KTRACE_UNBUSY, __LINE__)
-#define        TRACE_BUSYSEARCH(__FUNCTION__,s,ag,agb,l,sl,tp) \
-       xfs_alloc_trace_busy(__FUNCTION__, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSYSEARCH, __LINE__)
+       xfs_alloc_trace_modagf(__func__, s, mp, a, f, __LINE__)
+#define        TRACE_BUSY(__func__,s,ag,agb,l,sl,tp)   \
+       xfs_alloc_trace_busy(__func__, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSY, __LINE__)
+#define        TRACE_UNBUSY(__func__,s,ag,sl,tp)       \
+       xfs_alloc_trace_busy(__func__, s, mp, ag, -1, -1, sl, tp, XFS_ALLOC_KTRACE_UNBUSY, __LINE__)
+#define        TRACE_BUSYSEARCH(__func__,s,ag,agb,l,sl,tp)     \
+       xfs_alloc_trace_busy(__func__, s, mp, ag, agb, l, sl, tp, XFS_ALLOC_KTRACE_BUSYSEARCH, __LINE__)
 #else
 #define        TRACE_ALLOC(s,a)
 #define        TRACE_FREE(s,a,b,x,f)
index 7d683e0b8ef742c0537356aeb733db5b75643182..65b8fa83e078da2ce7386b911eb62b39b3b0d3db 100644 (file)
@@ -323,13 +323,13 @@ xfs_bmap_trace_pre_update(
        int             whichfork);     /* data or attr fork */
 
 #define        XFS_BMAP_TRACE_DELETE(d,ip,i,c,w)       \
-       xfs_bmap_trace_delete(__FUNCTION__,d,ip,i,c,w)
+       xfs_bmap_trace_delete(__func__,d,ip,i,c,w)
 #define        XFS_BMAP_TRACE_INSERT(d,ip,i,c,r1,r2,w) \
-       xfs_bmap_trace_insert(__FUNCTION__,d,ip,i,c,r1,r2,w)
+       xfs_bmap_trace_insert(__func__,d,ip,i,c,r1,r2,w)
 #define        XFS_BMAP_TRACE_POST_UPDATE(d,ip,i,w)    \
-       xfs_bmap_trace_post_update(__FUNCTION__,d,ip,i,w)
+       xfs_bmap_trace_post_update(__func__,d,ip,i,w)
 #define        XFS_BMAP_TRACE_PRE_UPDATE(d,ip,i,w)     \
-       xfs_bmap_trace_pre_update(__FUNCTION__,d,ip,i,w)
+       xfs_bmap_trace_pre_update(__func__,d,ip,i,w)
 #else
 #define        XFS_BMAP_TRACE_DELETE(d,ip,i,c,w)
 #define        XFS_BMAP_TRACE_INSERT(d,ip,i,c,r1,r2,w)
@@ -6164,10 +6164,10 @@ xfs_check_block(
                        }
                        if (*thispa == *pp) {
                                cmn_err(CE_WARN, "%s: thispa(%d) == pp(%d) %Ld",
-                                       __FUNCTION__, j, i,
+                                       __func__, j, i,
                                        (unsigned long long)be64_to_cpu(*thispa));
                                panic("%s: ptrs are equal in node\n",
-                                       __FUNCTION__);
+                                       __func__);
                        }
                }
        }
@@ -6324,13 +6324,13 @@ xfs_bmap_check_leaf_extents(
        return;
 
 error0:
-       cmn_err(CE_WARN, "%s: at error0", __FUNCTION__);
+       cmn_err(CE_WARN, "%s: at error0", __func__);
        if (bp_release)
                xfs_trans_brelse(NULL, bp);
 error_norelse:
        cmn_err(CE_WARN, "%s: BAD after btree leaves for %d extents",
-               __FUNCTION__, i);
-       panic("%s: CORRUPTED BTREE OR SOMETHING", __FUNCTION__);
+               __func__, i);
+       panic("%s: CORRUPTED BTREE OR SOMETHING", __func__);
        return;
 }
 #endif
index 87224b7d7984d9affdc9323f71d3c4066ed3f0a3..6ff70cda451cbe6011a118ac6a612eaf79dfd3a5 100644 (file)
@@ -151,7 +151,7 @@ xfs_bmap_trace_exlist(
        xfs_extnum_t            cnt,            /* count of entries in list */
        int                     whichfork);     /* data or attr fork */
 #define        XFS_BMAP_TRACE_EXLIST(ip,c,w)   \
-       xfs_bmap_trace_exlist(__FUNCTION__,ip,c,w)
+       xfs_bmap_trace_exlist(__func__,ip,c,w)
 #else
 #define        XFS_BMAP_TRACE_EXLIST(ip,c,w)
 #endif
index 93470b728dd0b8a7af71c299e08d489d24841380..4f0e849d973edda419fb75980b62f5e4f159419a 100644 (file)
@@ -275,21 +275,21 @@ xfs_bmbt_trace_cursor(
 }
 
 #define        XFS_BMBT_TRACE_ARGBI(c,b,i)     \
-       xfs_bmbt_trace_argbi(__FUNCTION__, c, b, i, __LINE__)
+       xfs_bmbt_trace_argbi(__func__, c, b, i, __LINE__)
 #define        XFS_BMBT_TRACE_ARGBII(c,b,i,j)  \
-       xfs_bmbt_trace_argbii(__FUNCTION__, c, b, i, j, __LINE__)
+       xfs_bmbt_trace_argbii(__func__, c, b, i, j, __LINE__)
 #define        XFS_BMBT_TRACE_ARGFFFI(c,o,b,i,j)       \
-       xfs_bmbt_trace_argfffi(__FUNCTION__, c, o, b, i, j, __LINE__)
+       xfs_bmbt_trace_argfffi(__func__, c, o, b, i, j, __LINE__)
 #define        XFS_BMBT_TRACE_ARGI(c,i)        \
-       xfs_bmbt_trace_argi(__FUNCTION__, c, i, __LINE__)
+       xfs_bmbt_trace_argi(__func__, c, i, __LINE__)
 #define        XFS_BMBT_TRACE_ARGIFK(c,i,f,s)  \
-       xfs_bmbt_trace_argifk(__FUNCTION__, c, i, f, s, __LINE__)
+       xfs_bmbt_trace_argifk(__func__, c, i, f, s, __LINE__)
 #define        XFS_BMBT_TRACE_ARGIFR(c,i,f,r)  \
-       xfs_bmbt_trace_argifr(__FUNCTION__, c, i, f, r, __LINE__)
+       xfs_bmbt_trace_argifr(__func__, c, i, f, r, __LINE__)
 #define        XFS_BMBT_TRACE_ARGIK(c,i,k)     \
-       xfs_bmbt_trace_argik(__FUNCTION__, c, i, k, __LINE__)
+       xfs_bmbt_trace_argik(__func__, c, i, k, __LINE__)
 #define        XFS_BMBT_TRACE_CURSOR(c,s)      \
-       xfs_bmbt_trace_cursor(__FUNCTION__, c, s, __LINE__)
+       xfs_bmbt_trace_cursor(__func__, c, s, __LINE__)
 #else
 #define        XFS_BMBT_TRACE_ARGBI(c,b,i)
 #define        XFS_BMBT_TRACE_ARGBII(c,b,i,j)
index eb03eab5ca52bd5f924e986a516ef800c5bb8e3a..3f3785b10804a1d9b00bcfad52091e4547f53934 100644 (file)
@@ -73,7 +73,7 @@ xfs_filestreams_trace(
 #define TRACE4(mp,t,a0,a1,a2,a3)       TRACE6(mp,t,a0,a1,a2,a3,0,0)
 #define TRACE5(mp,t,a0,a1,a2,a3,a4)    TRACE6(mp,t,a0,a1,a2,a3,a4,0)
 #define TRACE6(mp,t,a0,a1,a2,a3,a4,a5) \
-       xfs_filestreams_trace(mp, t, __FUNCTION__, __LINE__, \
+       xfs_filestreams_trace(mp, t, __func__, __LINE__, \
                                (__psunsigned_t)a0, (__psunsigned_t)a1, \
                                (__psunsigned_t)a2, (__psunsigned_t)a3, \
                                (__psunsigned_t)a4, (__psunsigned_t)a5)
index 4a6f7c5d145933c2781bf18d7971368545f3bcc7..bece882f99ec44084ed3c0447f96238ef9b81c1b 100644 (file)
@@ -2225,7 +2225,7 @@ xlog_state_do_callback(
                        repeats = 0;
                        xfs_fs_cmn_err(CE_WARN, log->l_mp,
                                "%s: possible infinite loop (%d iterations)",
-                               __FUNCTION__, flushcnt);
+                               __func__, flushcnt);
                }
        } while (!ioerrors && loopdidcallbacks);
 
index 962d74a9ea7e571269475fb1804145083895fdfc..c37521467fdc94926dad7e470253b7f9d0311f11 100644 (file)
@@ -192,7 +192,7 @@ xlog_header_check_dump(
 {
        int                     b;
 
-       cmn_err(CE_DEBUG, "%s:  SB : uuid = ", __FUNCTION__);
+       cmn_err(CE_DEBUG, "%s:  SB : uuid = ", __func__);
        for (b = 0; b < 16; b++)
                cmn_err(CE_DEBUG, "%02x", ((uchar_t *)&mp->m_sb.sb_uuid)[b]);
        cmn_err(CE_DEBUG, ", fmt = %d\n", XLOG_FMT);
@@ -3447,7 +3447,7 @@ xlog_valid_rec_header(
            (!rhead->h_version ||
            (be32_to_cpu(rhead->h_version) & (~XLOG_VERSION_OKBITS))))) {
                xlog_warn("XFS: %s: unrecognised log version (%d).",
-                       __FUNCTION__, be32_to_cpu(rhead->h_version));
+                       __func__, be32_to_cpu(rhead->h_version));
                return XFS_ERROR(EIO);
        }
 
index 13235ae9a582138ecb5ef5e7e16a09fb88bb7845..1f77c00af566be43c8a2c569e2be9222002f555f 100644 (file)
@@ -438,7 +438,7 @@ xfs_trans_delete_ail(
                else {
                        xfs_cmn_err(XFS_PTAG_AILDELETE, CE_ALERT, mp,
                "%s: attempting to delete a log item that is not in the AIL",
-                                       __FUNCTION__);
+                                       __func__);
                        spin_unlock(&mp->m_ail_lock);
                        xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
                }