diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-02-12 18:01:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-12 21:54:13 -0500 |
commit | 02f1f2170d2831b3233e91091c60a66622f29e82 (patch) | |
tree | 6a107ef6615aa9d3c3275b477a4d1b408366a4ad | |
parent | 4be1b29795d692d512bb67b770665d6f8ea5cb0b (diff) |
kernel.h: remove ancient __FUNCTION__ hack
__FUNCTION__ hasn't been treated as a string literal since gcc 3.4, so
this only helps people who only test-compile using 3.3 (compiler-gcc3.h
barks at anything older than that). Besides, there are almost no
occurrences of __FUNCTION__ left in the tree.
[akpm@linux-foundation.org: convert remaining __FUNCTION__ references]
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/x86/kernel/hpet.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/rtc.c | 4 | ||||
-rw-r--r-- | arch/x86/platform/intel-mid/intel_mid_vrtc.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/utdebug.c | 4 | ||||
-rw-r--r-- | drivers/block/xen-blkfront.c | 2 | ||||
-rw-r--r-- | include/acpi/acoutput.h | 6 | ||||
-rw-r--r-- | include/linux/kernel.h | 3 |
7 files changed, 10 insertions, 13 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 319bcb9372fe..3acbff4716b0 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -168,7 +168,7 @@ static void _hpet_print_config(const char *function, int line) | |||
168 | #define hpet_print_config() \ | 168 | #define hpet_print_config() \ |
169 | do { \ | 169 | do { \ |
170 | if (hpet_verbose) \ | 170 | if (hpet_verbose) \ |
171 | _hpet_print_config(__FUNCTION__, __LINE__); \ | 171 | _hpet_print_config(__func__, __LINE__); \ |
172 | } while (0) | 172 | } while (0) |
173 | 173 | ||
174 | /* | 174 | /* |
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index fe3dbfe0c4a5..cd9685235df9 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c | |||
@@ -49,11 +49,11 @@ int mach_set_rtc_mmss(const struct timespec *now) | |||
49 | retval = set_rtc_time(&tm); | 49 | retval = set_rtc_time(&tm); |
50 | if (retval) | 50 | if (retval) |
51 | printk(KERN_ERR "%s: RTC write failed with error %d\n", | 51 | printk(KERN_ERR "%s: RTC write failed with error %d\n", |
52 | __FUNCTION__, retval); | 52 | __func__, retval); |
53 | } else { | 53 | } else { |
54 | printk(KERN_ERR | 54 | printk(KERN_ERR |
55 | "%s: Invalid RTC value: write of %lx to RTC failed\n", | 55 | "%s: Invalid RTC value: write of %lx to RTC failed\n", |
56 | __FUNCTION__, nowtime); | 56 | __func__, nowtime); |
57 | retval = -EINVAL; | 57 | retval = -EINVAL; |
58 | } | 58 | } |
59 | return retval; | 59 | return retval; |
diff --git a/arch/x86/platform/intel-mid/intel_mid_vrtc.c b/arch/x86/platform/intel-mid/intel_mid_vrtc.c index 4762cff7facd..32947ba0f62d 100644 --- a/arch/x86/platform/intel-mid/intel_mid_vrtc.c +++ b/arch/x86/platform/intel-mid/intel_mid_vrtc.c | |||
@@ -110,7 +110,7 @@ int vrtc_set_mmss(const struct timespec *now) | |||
110 | spin_unlock_irqrestore(&rtc_lock, flags); | 110 | spin_unlock_irqrestore(&rtc_lock, flags); |
111 | } else { | 111 | } else { |
112 | pr_err("%s: Invalid vRTC value: write of %lx to vRTC failed\n", | 112 | pr_err("%s: Invalid vRTC value: write of %lx to vRTC failed\n", |
113 | __FUNCTION__, now->tv_sec); | 113 | __func__, now->tv_sec); |
114 | retval = -EINVAL; | 114 | retval = -EINVAL; |
115 | } | 115 | } |
116 | return retval; | 116 | return retval; |
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c index 57078e3ea9b7..4f3f888d33bb 100644 --- a/drivers/acpi/acpica/utdebug.c +++ b/drivers/acpi/acpica/utdebug.c | |||
@@ -111,8 +111,8 @@ void acpi_ut_track_stack_ptr(void) | |||
111 | * RETURN: Updated pointer to the function name | 111 | * RETURN: Updated pointer to the function name |
112 | * | 112 | * |
113 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. | 113 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. |
114 | * This allows compiler macros such as __FUNCTION__ to be used | 114 | * This allows compiler macros such as __func__ to be used with no |
115 | * with no change to the debug output. | 115 | * change to the debug output. |
116 | * | 116 | * |
117 | ******************************************************************************/ | 117 | ******************************************************************************/ |
118 | 118 | ||
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 2236c6f31608..d2cae5fc211a 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -1391,7 +1391,7 @@ static int blkfront_probe(struct xenbus_device *dev, | |||
1391 | if (major != XENVBD_MAJOR) { | 1391 | if (major != XENVBD_MAJOR) { |
1392 | printk(KERN_INFO | 1392 | printk(KERN_INFO |
1393 | "%s: HVM does not support vbd %d as xen block device\n", | 1393 | "%s: HVM does not support vbd %d as xen block device\n", |
1394 | __FUNCTION__, vdevice); | 1394 | __func__, vdevice); |
1395 | return -ENODEV; | 1395 | return -ENODEV; |
1396 | } | 1396 | } |
1397 | } | 1397 | } |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 9318a87ee39a..a8f344363e77 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
@@ -240,7 +240,7 @@ | |||
240 | /* | 240 | /* |
241 | * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, | 241 | * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, |
242 | * define it now. This is the case where there the compiler does not support | 242 | * define it now. This is the case where there the compiler does not support |
243 | * a __FUNCTION__ macro or equivalent. | 243 | * a __func__ macro or equivalent. |
244 | */ | 244 | */ |
245 | #ifndef ACPI_GET_FUNCTION_NAME | 245 | #ifndef ACPI_GET_FUNCTION_NAME |
246 | #define ACPI_GET_FUNCTION_NAME _acpi_function_name | 246 | #define ACPI_GET_FUNCTION_NAME _acpi_function_name |
@@ -249,12 +249,12 @@ | |||
249 | * The Name parameter should be the procedure name as a quoted string. | 249 | * The Name parameter should be the procedure name as a quoted string. |
250 | * The function name is also used by the function exit macros below. | 250 | * The function name is also used by the function exit macros below. |
251 | * Note: (const char) is used to be compatible with the debug interfaces | 251 | * Note: (const char) is used to be compatible with the debug interfaces |
252 | * and macros such as __FUNCTION__. | 252 | * and macros such as __func__. |
253 | */ | 253 | */ |
254 | #define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name; | 254 | #define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name; |
255 | 255 | ||
256 | #else | 256 | #else |
257 | /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ | 257 | /* Compiler supports __func__ (or equivalent) -- Ignore this macro */ |
258 | 258 | ||
259 | #define ACPI_FUNCTION_NAME(name) | 259 | #define ACPI_FUNCTION_NAME(name) |
260 | #endif /* ACPI_GET_FUNCTION_NAME */ | 260 | #endif /* ACPI_GET_FUNCTION_NAME */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e42e7dc34c68..d6d630d31ef3 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -800,9 +800,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
800 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ | 800 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ |
801 | (type *)( (char *)__mptr - offsetof(type,member) );}) | 801 | (type *)( (char *)__mptr - offsetof(type,member) );}) |
802 | 802 | ||
803 | /* Trap pasters of __FUNCTION__ at compile-time */ | ||
804 | #define __FUNCTION__ (__func__) | ||
805 | |||
806 | /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ | 803 | /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ |
807 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 804 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
808 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD | 805 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD |