Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

include: replace __FUNCTION__ with __func__

__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>

authored by

Harvey Harrison and committed by
Linus Torvalds
d5c003b4 8e9c7716

+35 -35
+3 -3
include/acpi/acmacros.h
··· 467 467 /* 468 468 * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, 469 469 * define it now. This is the case where there the compiler does not support 470 - * a __FUNCTION__ macro or equivalent. 470 + * a __func__ macro or equivalent. 471 471 */ 472 472 #ifndef ACPI_GET_FUNCTION_NAME 473 473 #define ACPI_GET_FUNCTION_NAME _acpi_function_name ··· 475 475 * The Name parameter should be the procedure name as a quoted string. 476 476 * The function name is also used by the function exit macros below. 477 477 * Note: (const char) is used to be compatible with the debug interfaces 478 - * and macros such as __FUNCTION__. 478 + * and macros such as __func__. 479 479 */ 480 480 #define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name; 481 481 482 482 #else 483 - /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ 483 + /* Compiler supports __func__ (or equivalent) -- Ignore this macro */ 484 484 485 485 #define ACPI_FUNCTION_NAME(name) 486 486 #endif
+1 -1
include/acpi/platform/acgcc.h
··· 46 46 47 47 /* Function name is used for debug output. Non-ANSI, compiler-dependent */ 48 48 49 - #define ACPI_GET_FUNCTION_NAME __FUNCTION__ 49 + #define ACPI_GET_FUNCTION_NAME __func__ 50 50 51 51 /* 52 52 * This macro is used to tag functions as "printf-like" because
+1 -1
include/asm-generic/bug.h
··· 22 22 23 23 #ifndef HAVE_ARCH_BUG 24 24 #define BUG() do { \ 25 - printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \ 25 + printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ 26 26 panic("BUG!"); \ 27 27 } while (0) 28 28 #endif
+1 -1
include/asm-x86/es7000/apic.h
··· 171 171 int new_apicid = cpu_to_logical_apicid(cpu); 172 172 if (apicid_cluster(apicid) != 173 173 apicid_cluster(new_apicid)){ 174 - printk ("%s: Not a valid mask!\n",__FUNCTION__); 174 + printk ("%s: Not a valid mask!\n", __func__); 175 175 #if defined CONFIG_ES7000_CLUSTERED_APIC 176 176 return 0xFF; 177 177 #else
+1 -1
include/asm-x86/summit/apic.h
··· 160 160 int new_apicid = cpu_to_logical_apicid(cpu); 161 161 if (apicid_cluster(apicid) != 162 162 apicid_cluster(new_apicid)){ 163 - printk ("%s: Not a valid mask!\n",__FUNCTION__); 163 + printk ("%s: Not a valid mask!\n", __func__); 164 164 return 0xFF; 165 165 } 166 166 apicid = apicid | new_apicid;
+1 -1
include/linux/ext2_fs.h
··· 47 47 #ifdef EXT2FS_DEBUG 48 48 # define ext2_debug(f, a...) { \ 49 49 printk ("EXT2-fs DEBUG (%s, %d): %s:", \ 50 - __FILE__, __LINE__, __FUNCTION__); \ 50 + __FILE__, __LINE__, __func__); \ 51 51 printk (f, ## a); \ 52 52 } 53 53 #else
+2 -2
include/linux/ext3_fs.h
··· 43 43 #define ext3_debug(f, a...) \ 44 44 do { \ 45 45 printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", \ 46 - __FILE__, __LINE__, __FUNCTION__); \ 46 + __FILE__, __LINE__, __func__); \ 47 47 printk (KERN_DEBUG f, ## a); \ 48 48 } while (0) 49 49 #else ··· 871 871 #define ext3_std_error(sb, errno) \ 872 872 do { \ 873 873 if ((errno)) \ 874 - __ext3_std_error((sb), __FUNCTION__, (errno)); \ 874 + __ext3_std_error((sb), __func__, (errno)); \ 875 875 } while (0) 876 876 877 877 /*
+7 -7
include/linux/ext3_jbd.h
··· 137 137 handle_t *handle, struct buffer_head *bh); 138 138 139 139 #define ext3_journal_get_undo_access(handle, bh) \ 140 - __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh)) 140 + __ext3_journal_get_undo_access(__func__, (handle), (bh)) 141 141 #define ext3_journal_get_write_access(handle, bh) \ 142 - __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh)) 142 + __ext3_journal_get_write_access(__func__, (handle), (bh)) 143 143 #define ext3_journal_revoke(handle, blocknr, bh) \ 144 - __ext3_journal_revoke(__FUNCTION__, (handle), (blocknr), (bh)) 144 + __ext3_journal_revoke(__func__, (handle), (blocknr), (bh)) 145 145 #define ext3_journal_get_create_access(handle, bh) \ 146 - __ext3_journal_get_create_access(__FUNCTION__, (handle), (bh)) 146 + __ext3_journal_get_create_access(__func__, (handle), (bh)) 147 147 #define ext3_journal_dirty_metadata(handle, bh) \ 148 - __ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh)) 148 + __ext3_journal_dirty_metadata(__func__, (handle), (bh)) 149 149 #define ext3_journal_forget(handle, bh) \ 150 - __ext3_journal_forget(__FUNCTION__, (handle), (bh)) 150 + __ext3_journal_forget(__func__, (handle), (bh)) 151 151 152 152 int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh); 153 153 ··· 160 160 } 161 161 162 162 #define ext3_journal_stop(handle) \ 163 - __ext3_journal_stop(__FUNCTION__, (handle)) 163 + __ext3_journal_stop(__func__, (handle)) 164 164 165 165 static inline handle_t *ext3_journal_current_handle(void) 166 166 {
+2 -2
include/linux/jbd.h
··· 61 61 do { \ 62 62 if ((n) <= journal_enable_debug) { \ 63 63 printk (KERN_DEBUG "(%s, %d): %s: ", \ 64 - __FILE__, __LINE__, __FUNCTION__); \ 64 + __FILE__, __LINE__, __func__); \ 65 65 printk (f, ## a); \ 66 66 } \ 67 67 } while (0) ··· 984 984 985 985 #define jbd_ENOSYS() \ 986 986 do { \ 987 - printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \ 987 + printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \ 988 988 current->state = TASK_UNINTERRUPTIBLE; \ 989 989 schedule(); \ 990 990 } while (1)
+2 -2
include/linux/jbd2.h
··· 61 61 do { \ 62 62 if ((n) <= jbd2_journal_enable_debug) { \ 63 63 printk (KERN_DEBUG "(%s, %d): %s: ", \ 64 - __FILE__, __LINE__, __FUNCTION__); \ 64 + __FILE__, __LINE__, __func__); \ 65 65 printk (f, ## a); \ 66 66 } \ 67 67 } while (0) ··· 1143 1143 1144 1144 #define jbd_ENOSYS() \ 1145 1145 do { \ 1146 - printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \ 1146 + printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \ 1147 1147 current->state = TASK_UNINTERRUPTIBLE; \ 1148 1148 schedule(); \ 1149 1149 } while (1)
+1 -1
include/linux/pm.h
··· 419 419 420 420 #define suspend_report_result(fn, ret) \ 421 421 do { \ 422 - __suspend_report_result(__FUNCTION__, fn, ret); \ 422 + __suspend_report_result(__func__, fn, ret); \ 423 423 } while (0) 424 424 425 425 #else /* !CONFIG_PM_SLEEP */
+1 -1
include/linux/reiserfs_fs.h
··· 87 87 if( !( cond ) ) \ 88 88 reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \ 89 89 __FILE__ ":%i:%s: " format "\n", \ 90 - in_interrupt() ? -1 : task_pid_nr(current), __LINE__ , __FUNCTION__ , ##args ) 90 + in_interrupt() ? -1 : task_pid_nr(current), __LINE__ , __func__ , ##args ) 91 91 92 92 #define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args) 93 93
+1 -1
include/linux/rtmutex.h
··· 54 54 #ifdef CONFIG_DEBUG_RT_MUTEXES 55 55 # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ 56 56 , .name = #mutexname, .file = __FILE__, .line = __LINE__ 57 - # define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) 57 + # define rt_mutex_init(mutex) __rt_mutex_init(mutex, __func__) 58 58 extern void rt_mutex_debug_task_free(struct task_struct *tsk); 59 59 #else 60 60 # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname)
+1 -1
include/media/saa7146.h
··· 24 24 25 25 extern unsigned int saa7146_debug; 26 26 27 - //#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__) 27 + //#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__) 28 28 29 29 #ifndef DEBUG_VARIABLE 30 30 #define DEBUG_VARIABLE saa7146_debug
+2 -2
include/net/9p/9p.h
··· 61 61 do { \ 62 62 if ((p9_debug_level & level) == level) \ 63 63 printk(KERN_NOTICE "-- %s (%d): " \ 64 - format , __FUNCTION__, task_pid_nr(current) , ## arg); \ 64 + format , __func__, task_pid_nr(current) , ## arg); \ 65 65 } while (0) 66 66 67 67 #define PRINT_FCALL_ERROR(s, fcall) P9_DPRINTK(P9_DEBUG_ERROR, \ ··· 76 76 #define P9_EPRINTK(level, format, arg...) \ 77 77 do { \ 78 78 printk(level "9p: %s (%d): " \ 79 - format , __FUNCTION__, task_pid_nr(current), ## arg); \ 79 + format , __func__, task_pid_nr(current), ## arg); \ 80 80 } while (0) 81 81 82 82 /**
+2 -2
include/net/bluetooth/bluetooth.h
··· 54 54 #define SOL_RFCOMM 18 55 55 56 56 #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg) 57 - #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg) 58 - #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg) 57 + #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __func__ , ## arg) 58 + #define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg) 59 59 60 60 /* Connection and socket states */ 61 61 enum {
+1 -1
include/net/ieee80211.h
··· 114 114 #define IEEE80211_DEBUG(level, fmt, args...) \ 115 115 do { if (ieee80211_debug_level & (level)) \ 116 116 printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ 117 - in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) 117 + in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) 118 118 static inline bool ieee80211_ratelimit_debug(u32 level) 119 119 { 120 120 return (ieee80211_debug_level & level) && net_ratelimit();
+2 -2
include/net/ip_vs.h
··· 165 165 do { \ 166 166 if (level <= ip_vs_get_debug_level()) \ 167 167 printk(KERN_DEBUG "Enter: %s, %s line %i\n", \ 168 - __FUNCTION__, __FILE__, __LINE__); \ 168 + __func__, __FILE__, __LINE__); \ 169 169 } while (0) 170 170 #define LeaveFunction(level) \ 171 171 do { \ 172 172 if (level <= ip_vs_get_debug_level()) \ 173 173 printk(KERN_DEBUG "Leave: %s, %s line %i\n", \ 174 - __FUNCTION__, __FILE__, __LINE__); \ 174 + __func__, __FILE__, __LINE__); \ 175 175 } while (0) 176 176 #else 177 177 #define EnterFunction(level) do {} while (0)
+1 -1
include/net/irda/irda.h
··· 72 72 #define IRDA_ASSERT(expr, func) \ 73 73 do { if(!(expr)) { \ 74 74 printk( "Assertion failed! %s:%s:%d %s\n", \ 75 - __FILE__,__FUNCTION__,__LINE__,(#expr) ); \ 75 + __FILE__,__func__,__LINE__,(#expr) ); \ 76 76 func } } while (0) 77 77 #define IRDA_ASSERT_LABEL(label) label 78 78 #else
+1 -1
include/net/sctp/sctp.h
··· 303 303 #define SCTP_ASSERT(expr, str, func) \ 304 304 if (!(expr)) { \ 305 305 SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \ 306 - str, (#expr), __FILE__, __FUNCTION__, __LINE__); \ 306 + str, (#expr), __FILE__, __func__, __LINE__); \ 307 307 func; \ 308 308 } 309 309
+1 -1
include/video/cyblafb.h
··· 4 4 #endif 5 5 6 6 #if CYBLAFB_DEBUG 7 - #define debug(f,a...) printk("%s:" f, __FUNCTION__ , ## a); 7 + #define debug(f,a...) printk("%s:" f, __func__ , ## a); 8 8 #else 9 9 #define debug(f,a...) 10 10 #endif