]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
include: replace __FUNCTION__ with __func__
authorHarvey Harrison <harvey.harrison@gmail.com>
Thu, 16 Oct 2008 05:01:24 +0000 (22:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:30 +0000 (11:21 -0700)
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
21 files changed:
include/acpi/acmacros.h
include/acpi/platform/acgcc.h
include/asm-generic/bug.h
include/asm-x86/es7000/apic.h
include/asm-x86/summit/apic.h
include/linux/ext2_fs.h
include/linux/ext3_fs.h
include/linux/ext3_jbd.h
include/linux/jbd.h
include/linux/jbd2.h
include/linux/pm.h
include/linux/reiserfs_fs.h
include/linux/rtmutex.h
include/media/saa7146.h
include/net/9p/9p.h
include/net/bluetooth/bluetooth.h
include/net/ieee80211.h
include/net/ip_vs.h
include/net/irda/irda.h
include/net/sctp/sctp.h
include/video/cyblafb.h

index 57ab9e9d7593e6213ff2342f55d2dbaaab92ff80..74a9617776a80f728b874ab47f58a5f124d00996 100644 (file)
@@ -467,7 +467,7 @@ struct acpi_integer_overlay {
 /*
  * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
  * define it now. This is the case where there the compiler does not support
- * a __FUNCTION__ macro or equivalent.
+ * a __func__ macro or equivalent.
  */
 #ifndef ACPI_GET_FUNCTION_NAME
 #define ACPI_GET_FUNCTION_NAME          _acpi_function_name
@@ -475,12 +475,12 @@ struct acpi_integer_overlay {
  * The Name parameter should be the procedure name as a quoted string.
  * The function name is also used by the function exit macros below.
  * Note: (const char) is used to be compatible with the debug interfaces
- * and macros such as __FUNCTION__.
+ * and macros such as __func__.
  */
 #define ACPI_FUNCTION_NAME(name)       static const char _acpi_function_name[] = #name;
 
 #else
-/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
+/* Compiler supports __func__ (or equivalent) -- Ignore this macro */
 
 #define ACPI_FUNCTION_NAME(name)
 #endif
index 8996dba90cd91bbe07b084baf84bd52b46d2fde8..8e2cdc57b1974f5430b4d39fe681090f9ffd0441 100644 (file)
@@ -46,7 +46,7 @@
 
 /* Function name is used for debug output. Non-ANSI, compiler-dependent */
 
-#define ACPI_GET_FUNCTION_NAME          __FUNCTION__
+#define ACPI_GET_FUNCTION_NAME          __func__
 
 /*
  * This macro is used to tag functions as "printf-like" because
index edc6ba82e090961a841cd37b54cb6abc0311b4d7..0f6dabd4b5175488081fc8395a30b9a5d5e5f217 100644 (file)
@@ -22,7 +22,7 @@ struct bug_entry {
 
 #ifndef HAVE_ARCH_BUG
 #define BUG() do { \
-       printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
+       printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
        panic("BUG!"); \
 } while (0)
 #endif
index bd2c44d1f7ac356f6e09a277763b9d1d585454c2..aae50c2fb303db35d3bab0f2cfdd1a854f1b4fb2 100644 (file)
@@ -171,7 +171,7 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
                        int new_apicid = cpu_to_logical_apicid(cpu);
                        if (apicid_cluster(apicid) !=
                                        apicid_cluster(new_apicid)){
-                               printk ("%s: Not a valid mask!\n",__FUNCTION__);
+                               printk ("%s: Not a valid mask!\n", __func__);
 #if defined CONFIG_ES7000_CLUSTERED_APIC
                                return 0xFF;
 #else
index c5b2e4b10358dd6beda71fb8b5a318d9ee341dff..394b00bb5e72542b3bfd4ecc2efbee58157cf3a9 100644 (file)
@@ -160,7 +160,7 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
                        int new_apicid = cpu_to_logical_apicid(cpu);
                        if (apicid_cluster(apicid) !=
                                        apicid_cluster(new_apicid)){
-                               printk ("%s: Not a valid mask!\n",__FUNCTION__);
+                               printk ("%s: Not a valid mask!\n", __func__);
                                return 0xFF;
                        }
                        apicid = apicid | new_apicid;
index 2efe7b863cff361301d4a73c1c4e46338d0b02b1..78c775a83f7cd041acaa872ae455676a06a0e096 100644 (file)
@@ -47,7 +47,7 @@
 #ifdef EXT2FS_DEBUG
 #      define ext2_debug(f, a...)      { \
                                        printk ("EXT2-fs DEBUG (%s, %d): %s:", \
-                                               __FILE__, __LINE__, __FUNCTION__); \
+                                               __FILE__, __LINE__, __func__); \
                                        printk (f, ## a); \
                                        }
 #else
index 8120fa1bc2357008f63c06c78d3304c781bf9341..159d9b476cd7f404c0ae33facd7189e7efe477ad 100644 (file)
@@ -43,7 +43,7 @@
 #define ext3_debug(f, a...)                                            \
        do {                                                            \
                printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:",       \
-                       __FILE__, __LINE__, __FUNCTION__);              \
+                       __FILE__, __LINE__, __func__);          \
                printk (KERN_DEBUG f, ## a);                            \
        } while (0)
 #else
@@ -871,7 +871,7 @@ extern void ext3_update_dynamic_rev (struct super_block *sb);
 #define ext3_std_error(sb, errno)                              \
 do {                                                           \
        if ((errno))                                            \
-               __ext3_std_error((sb), __FUNCTION__, (errno));  \
+               __ext3_std_error((sb), __func__, (errno));      \
 } while (0)
 
 /*
index 8c43b13a02fe1df033f161ab91d69cdd7a389858..cf82d519be408b7b97a2a0edd3e796d5eff8c2b5 100644 (file)
@@ -137,17 +137,17 @@ int __ext3_journal_dirty_metadata(const char *where,
                                handle_t *handle, struct buffer_head *bh);
 
 #define ext3_journal_get_undo_access(handle, bh) \
-       __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh))
+       __ext3_journal_get_undo_access(__func__, (handle), (bh))
 #define ext3_journal_get_write_access(handle, bh) \
-       __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh))
+       __ext3_journal_get_write_access(__func__, (handle), (bh))
 #define ext3_journal_revoke(handle, blocknr, bh) \
-       __ext3_journal_revoke(__FUNCTION__, (handle), (blocknr), (bh))
+       __ext3_journal_revoke(__func__, (handle), (blocknr), (bh))
 #define ext3_journal_get_create_access(handle, bh) \
-       __ext3_journal_get_create_access(__FUNCTION__, (handle), (bh))
+       __ext3_journal_get_create_access(__func__, (handle), (bh))
 #define ext3_journal_dirty_metadata(handle, bh) \
-       __ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh))
+       __ext3_journal_dirty_metadata(__func__, (handle), (bh))
 #define ext3_journal_forget(handle, bh) \
-       __ext3_journal_forget(__FUNCTION__, (handle), (bh))
+       __ext3_journal_forget(__func__, (handle), (bh))
 
 int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh);
 
@@ -160,7 +160,7 @@ static inline handle_t *ext3_journal_start(struct inode *inode, int nblocks)
 }
 
 #define ext3_journal_stop(handle) \
-       __ext3_journal_stop(__FUNCTION__, (handle))
+       __ext3_journal_stop(__func__, (handle))
 
 static inline handle_t *ext3_journal_current_handle(void)
 {
index 07a9b52a265418cb4b213ae8b1fff8e6eefbdd9d..7ebbcb1c9ba4e5d6a5a72290c002f37c09617fce 100644 (file)
@@ -61,7 +61,7 @@ extern u8 journal_enable_debug;
        do {                                                            \
                if ((n) <= journal_enable_debug) {                      \
                        printk (KERN_DEBUG "(%s, %d): %s: ",            \
-                               __FILE__, __LINE__, __FUNCTION__);      \
+                               __FILE__, __LINE__, __func__);  \
                        printk (f, ## a);                               \
                }                                                       \
        } while (0)
@@ -984,7 +984,7 @@ extern int  cleanup_journal_tail(journal_t *);
 
 #define jbd_ENOSYS() \
 do {                                                                      \
-       printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \
+       printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \
        current->state = TASK_UNINTERRUPTIBLE;                             \
        schedule();                                                        \
 } while (1)
index d2e91ea998fd44b945cb8337cbc0934967b774f9..463d6f10b64f7ffaea2f4fc13e57bc2ca4a95c8e 100644 (file)
@@ -61,7 +61,7 @@ extern u8 jbd2_journal_enable_debug;
        do {                                                            \
                if ((n) <= jbd2_journal_enable_debug) {                 \
                        printk (KERN_DEBUG "(%s, %d): %s: ",            \
-                               __FILE__, __LINE__, __FUNCTION__);      \
+                               __FILE__, __LINE__, __func__);  \
                        printk (f, ## a);                               \
                }                                                       \
        } while (0)
@@ -1143,7 +1143,7 @@ extern int        jbd2_cleanup_journal_tail(journal_t *);
 
 #define jbd_ENOSYS() \
 do {                                                                      \
-       printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \
+       printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \
        current->state = TASK_UNINTERRUPTIBLE;                             \
        schedule();                                                        \
 } while (1)
index 4dcce54b6d76f798e11f3e3ae08032ee0fbac592..42de4003c4ee10a52599ea95d7ae9d53964a0bf9 100644 (file)
@@ -419,7 +419,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
 
 #define suspend_report_result(fn, ret)                                 \
        do {                                                            \
-               __suspend_report_result(__FUNCTION__, fn, ret);         \
+               __suspend_report_result(__func__, fn, ret);             \
        } while (0)
 
 #else /* !CONFIG_PM_SLEEP */
index e9963af16cda6ade6ede6dded784c2624f4bc449..bc5114d35e99b65db4e11acefe3bae623a7c9db9 100644 (file)
@@ -87,7 +87,7 @@ void reiserfs_warning(struct super_block *s, const char *fmt, ...);
 if( !( cond ) )                                                                \
   reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \
                  __FILE__ ":%i:%s: " format "\n",              \
-                 in_interrupt() ? -1 : task_pid_nr(current), __LINE__ , __FUNCTION__ , ##args )
+                 in_interrupt() ? -1 : task_pid_nr(current), __LINE__ , __func__ , ##args )
 
 #define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args)
 
index 382bb7951166ec649e7113c4d2eac86194e7ad78..f19b00b7d530a8e60f67e77c5f1c5ac5270e8d9b 100644 (file)
@@ -54,7 +54,7 @@ struct hrtimer_sleeper;
 #ifdef CONFIG_DEBUG_RT_MUTEXES
 # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
        , .name = #mutexname, .file = __FILE__, .line = __LINE__
-# define rt_mutex_init(mutex)                  __rt_mutex_init(mutex, __FUNCTION__)
+# define rt_mutex_init(mutex)                  __rt_mutex_init(mutex, __func__)
  extern void rt_mutex_debug_task_free(struct task_struct *tsk);
 #else
 # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname)
index 64a2ec746a3e151779ca9ee00aac3db6cd4ca7da..c5a6e22a4b37d626d90370b3becb212105534478 100644 (file)
@@ -24,7 +24,7 @@
 
 extern unsigned int saa7146_debug;
 
-//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__FUNCTION__)
+//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__func__)
 
 #ifndef DEBUG_VARIABLE
        #define DEBUG_VARIABLE saa7146_debug
index c3626c0ba9d39a4358e028c328dfe534c5393b18..fb163e2e0de60c2c9df90b0980c4f84aadf6b9a1 100644 (file)
@@ -61,7 +61,7 @@ extern unsigned int p9_debug_level;
 do {  \
        if ((p9_debug_level & level) == level) \
                printk(KERN_NOTICE "-- %s (%d): " \
-               format , __FUNCTION__, task_pid_nr(current) , ## arg); \
+               format , __func__, task_pid_nr(current) , ## arg); \
 } while (0)
 
 #define PRINT_FCALL_ERROR(s, fcall) P9_DPRINTK(P9_DEBUG_ERROR,   \
@@ -76,7 +76,7 @@ do {  \
 #define P9_EPRINTK(level, format, arg...) \
 do { \
        printk(level "9p: %s (%d): " \
-               format , __FUNCTION__, task_pid_nr(current), ## arg); \
+               format , __func__, task_pid_nr(current), ## arg); \
 } while (0)
 
 /**
index 6f8418bf42417c218b112a4ae46b5b942c7863ee..996d12df75940f1ac722b52d764e5cd6c6d9a4c5 100644 (file)
@@ -54,8 +54,8 @@
 #define SOL_RFCOMM     18
 
 #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
-#define BT_DBG(fmt, arg...)  printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg)
-#define BT_ERR(fmt, arg...)  printk(KERN_ERR  "%s: " fmt "\n" , __FUNCTION__ , ## arg)
+#define BT_DBG(fmt, arg...)  printk(KERN_INFO "%s: " fmt "\n" , __func__ , ## arg)
+#define BT_ERR(fmt, arg...)  printk(KERN_ERR  "%s: " fmt "\n" , __func__ , ## arg)
 
 /* Connection and socket states */
 enum {
index 6048579d0b2433edf27132f086cfcc7509dd752d..93a56de3594be63de5c2a2847ea78fbb68db940b 100644 (file)
@@ -114,7 +114,7 @@ extern u32 ieee80211_debug_level;
 #define IEEE80211_DEBUG(level, fmt, args...) \
 do { if (ieee80211_debug_level & (level)) \
   printk(KERN_DEBUG "ieee80211: %c %s " fmt, \
-         in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
+         in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
 static inline bool ieee80211_ratelimit_debug(u32 level)
 {
        return (ieee80211_debug_level & level) && net_ratelimit();
index 0b2071d9326de8c059ed814848247c50d24535cb..fe9fcf73c85ed26135b802a959382a85e5d64e43 100644 (file)
@@ -165,13 +165,13 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len,
     do {                                                               \
            if (level <= ip_vs_get_debug_level())                       \
                    printk(KERN_DEBUG "Enter: %s, %s line %i\n",        \
-                          __FUNCTION__, __FILE__, __LINE__);           \
+                          __func__, __FILE__, __LINE__);               \
     } while (0)
 #define LeaveFunction(level)                                            \
     do {                                                                \
            if (level <= ip_vs_get_debug_level())                       \
                        printk(KERN_DEBUG "Leave: %s, %s line %i\n",    \
-                              __FUNCTION__, __FILE__, __LINE__);       \
+                              __func__, __FILE__, __LINE__);       \
     } while (0)
 #else
 #define EnterFunction(level)   do {} while (0)
index 08387553b57e5ee18aeb9f3c8890cdd3d5f54a20..7e582061b230dd9dce935059d959572cbba7cc9a 100644 (file)
@@ -72,7 +72,7 @@ do {  if (irda_debug >= (n)) \
 #define IRDA_ASSERT(expr, func) \
 do { if(!(expr)) { \
        printk( "Assertion failed! %s:%s:%d %s\n", \
-               __FILE__,__FUNCTION__,__LINE__,(#expr) ); \
+               __FILE__,__func__,__LINE__,(#expr) ); \
        func } } while (0)
 #define IRDA_ASSERT_LABEL(label)       label
 #else
index 703305d00365ff86460315c5490b3417b36ce2f1..ed71b110edf795094336e436816d9bdd5e6a1aab 100644 (file)
@@ -303,7 +303,7 @@ extern int sctp_debug_flag;
 #define SCTP_ASSERT(expr, str, func) \
        if (!(expr)) { \
                SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \
-                       str, (#expr), __FILE__, __FUNCTION__, __LINE__); \
+                       str, (#expr), __FILE__, __func__, __LINE__); \
                func; \
        }
 
index 717440575380e3a0af91b230eac8f33bad15893a..d3c1d4e2c8e3a7f1f62d60d3d678e270fd374567 100644 (file)
@@ -4,7 +4,7 @@
 #endif
 
 #if CYBLAFB_DEBUG
-#define debug(f,a...)  printk("%s:" f,  __FUNCTION__ , ## a);
+#define debug(f,a...)  printk("%s:" f,  __func__ , ## a);
 #else
 #define debug(f,a...)
 #endif