Commit 0a9d6e7cb0d1e5acc61d481d7a1ea25c294c3dff
Committed by
Linus Torvalds
1 parent
39bf6270f5
frv: gdb: use __maybe_unused
Replace function instances of __attribute__((unused)) with __maybe_unused to suppress warnings. Cc: David Howells <dhowells@redhat.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 6 additions and 6 deletions Side-by-side Diff
arch/frv/kernel/gdb-stub.c
... | ... | @@ -1195,7 +1195,7 @@ |
1195 | 1195 | /* |
1196 | 1196 | * |
1197 | 1197 | */ |
1198 | -static void __attribute__((unused)) gdbstub_show_regs(void) | |
1198 | +static void __maybe_unused gdbstub_show_regs(void) | |
1199 | 1199 | { |
1200 | 1200 | unsigned long *reg; |
1201 | 1201 | int loop; |
... | ... | @@ -1223,7 +1223,7 @@ |
1223 | 1223 | /* |
1224 | 1224 | * dump debugging regs |
1225 | 1225 | */ |
1226 | -static void __attribute__((unused)) gdbstub_dump_debugregs(void) | |
1226 | +static void __maybe_unused gdbstub_dump_debugregs(void) | |
1227 | 1227 | { |
1228 | 1228 | gdbstub_printk("DCR %08lx ", __debug_status.dcr); |
1229 | 1229 | gdbstub_printk("BRR %08lx\n", __debug_status.brr); |
1230 | 1230 | |
1231 | 1231 | |
1232 | 1232 | |
... | ... | @@ -2079,25 +2079,25 @@ |
2079 | 2079 | * GDB wants to call malloc() and free() to allocate memory for calling kernel |
2080 | 2080 | * functions directly from its command line |
2081 | 2081 | */ |
2082 | -static void *malloc(size_t size) __attribute__((unused)); | |
2082 | +static void *malloc(size_t size) __maybe_unused; | |
2083 | 2083 | static void *malloc(size_t size) |
2084 | 2084 | { |
2085 | 2085 | return kmalloc(size, GFP_ATOMIC); |
2086 | 2086 | } |
2087 | 2087 | |
2088 | -static void free(void *p) __attribute__((unused)); | |
2088 | +static void free(void *p) __maybe_unused; | |
2089 | 2089 | static void free(void *p) |
2090 | 2090 | { |
2091 | 2091 | kfree(p); |
2092 | 2092 | } |
2093 | 2093 | |
2094 | -static uint32_t ___get_HSR0(void) __attribute__((unused)); | |
2094 | +static uint32_t ___get_HSR0(void) __maybe_unused; | |
2095 | 2095 | static uint32_t ___get_HSR0(void) |
2096 | 2096 | { |
2097 | 2097 | return __get_HSR(0); |
2098 | 2098 | } |
2099 | 2099 | |
2100 | -static uint32_t ___set_HSR0(uint32_t x) __attribute__((unused)); | |
2100 | +static uint32_t ___set_HSR0(uint32_t x) __maybe_unused; | |
2101 | 2101 | static uint32_t ___set_HSR0(uint32_t x) |
2102 | 2102 | { |
2103 | 2103 | __set_HSR(0, x); |