Skip to content

Commit d5c003b

Browse files
hharrisontorvalds
authored andcommitted
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>
1 parent 8e9c771 commit d5c003b

21 files changed

Lines changed: 35 additions & 35 deletions

File tree

‎include/acpi/acmacros.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,20 +467,20 @@ struct acpi_integer_overlay {
467467
/*
468468
* If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
469469
* 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.
471471
*/
472472
#ifndef ACPI_GET_FUNCTION_NAME
473473
#define ACPI_GET_FUNCTION_NAME _acpi_function_name
474474
/*
475475
* The Name parameter should be the procedure name as a quoted string.
476476
* The function name is also used by the function exit macros below.
477477
* Note: (const char) is used to be compatible with the debug interfaces
478-
* and macros such as __FUNCTION__.
478+
* and macros such as __func__.
479479
*/
480480
#define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name;
481481

482482
#else
483-
/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
483+
/* Compiler supports __func__ (or equivalent) -- Ignore this macro */
484484

485485
#define ACPI_FUNCTION_NAME(name)
486486
#endif

‎include/acpi/platform/acgcc.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
/* Function name is used for debug output. Non-ANSI, compiler-dependent */
4848

49-
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
49+
#define ACPI_GET_FUNCTION_NAME __func__
5050

5151
/*
5252
* This macro is used to tag functions as "printf-like" because

‎include/asm-generic/bug.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct bug_entry {
2222

2323
#ifndef HAVE_ARCH_BUG
2424
#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__); \
2626
panic("BUG!"); \
2727
} while (0)
2828
#endif

‎include/asm-x86/es7000/apic.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
171171
int new_apicid = cpu_to_logical_apicid(cpu);
172172
if (apicid_cluster(apicid) !=
173173
apicid_cluster(new_apicid)){
174-
printk ("%s: Not a valid mask!\n",__FUNCTION__);
174+
printk ("%s: Not a valid mask!\n", __func__);
175175
#if defined CONFIG_ES7000_CLUSTERED_APIC
176176
return 0xFF;
177177
#else

‎include/asm-x86/summit/apic.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
160160
int new_apicid = cpu_to_logical_apicid(cpu);
161161
if (apicid_cluster(apicid) !=
162162
apicid_cluster(new_apicid)){
163-
printk ("%s: Not a valid mask!\n",__FUNCTION__);
163+
printk ("%s: Not a valid mask!\n", __func__);
164164
return 0xFF;
165165
}
166166
apicid = apicid | new_apicid;

‎include/linux/ext2_fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#ifdef EXT2FS_DEBUG
4848
# define ext2_debug(f, a...) { \
4949
printk ("EXT2-fs DEBUG (%s, %d): %s:", \
50-
__FILE__, __LINE__, __FUNCTION__); \
50+
__FILE__, __LINE__, __func__); \
5151
printk (f, ## a); \
5252
}
5353
#else

‎include/linux/ext3_fs.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#define ext3_debug(f, a...) \
4444
do { \
4545
printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", \
46-
__FILE__, __LINE__, __FUNCTION__); \
46+
__FILE__, __LINE__, __func__); \
4747
printk (KERN_DEBUG f, ## a); \
4848
} while (0)
4949
#else
@@ -871,7 +871,7 @@ extern void ext3_update_dynamic_rev (struct super_block *sb);
871871
#define ext3_std_error(sb, errno) \
872872
do { \
873873
if ((errno)) \
874-
__ext3_std_error((sb), __FUNCTION__, (errno)); \
874+
__ext3_std_error((sb), __func__, (errno)); \
875875
} while (0)
876876

877877
/*

‎include/linux/ext3_jbd.h‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,17 @@ int __ext3_journal_dirty_metadata(const char *where,
137137
handle_t *handle, struct buffer_head *bh);
138138

139139
#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))
141141
#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))
143143
#define ext3_journal_revoke(handle, blocknr, bh) \
144-
__ext3_journal_revoke(__FUNCTION__, (handle), (blocknr), (bh))
144+
__ext3_journal_revoke(__func__, (handle), (blocknr), (bh))
145145
#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))
147147
#define ext3_journal_dirty_metadata(handle, bh) \
148-
__ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh))
148+
__ext3_journal_dirty_metadata(__func__, (handle), (bh))
149149
#define ext3_journal_forget(handle, bh) \
150-
__ext3_journal_forget(__FUNCTION__, (handle), (bh))
150+
__ext3_journal_forget(__func__, (handle), (bh))
151151

152152
int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh);
153153

@@ -160,7 +160,7 @@ static inline handle_t *ext3_journal_start(struct inode *inode, int nblocks)
160160
}
161161

162162
#define ext3_journal_stop(handle) \
163-
__ext3_journal_stop(__FUNCTION__, (handle))
163+
__ext3_journal_stop(__func__, (handle))
164164

165165
static inline handle_t *ext3_journal_current_handle(void)
166166
{

‎include/linux/jbd.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern u8 journal_enable_debug;
6161
do { \
6262
if ((n) <= journal_enable_debug) { \
6363
printk (KERN_DEBUG "(%s, %d): %s: ", \
64-
__FILE__, __LINE__, __FUNCTION__); \
64+
__FILE__, __LINE__, __func__); \
6565
printk (f, ## a); \
6666
} \
6767
} while (0)
@@ -984,7 +984,7 @@ extern int cleanup_journal_tail(journal_t *);
984984

985985
#define jbd_ENOSYS() \
986986
do { \
987-
printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \
987+
printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \
988988
current->state = TASK_UNINTERRUPTIBLE; \
989989
schedule(); \
990990
} while (1)

‎include/linux/jbd2.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern u8 jbd2_journal_enable_debug;
6161
do { \
6262
if ((n) <= jbd2_journal_enable_debug) { \
6363
printk (KERN_DEBUG "(%s, %d): %s: ", \
64-
__FILE__, __LINE__, __FUNCTION__); \
64+
__FILE__, __LINE__, __func__); \
6565
printk (f, ## a); \
6666
} \
6767
} while (0)
@@ -1143,7 +1143,7 @@ extern int jbd2_cleanup_journal_tail(journal_t *);
11431143

11441144
#define jbd_ENOSYS() \
11451145
do { \
1146-
printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \
1146+
printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \
11471147
current->state = TASK_UNINTERRUPTIBLE; \
11481148
schedule(); \
11491149
} while (1)

0 commit comments

Comments
 (0)