提交 0a9d6e7c 编写于 作者: D David Rientjes 提交者: Linus Torvalds

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: NDavid Rientjes <rientjes@google.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 39bf6270
...@@ -1195,7 +1195,7 @@ static void gdbstub_check_breakpoint(void) ...@@ -1195,7 +1195,7 @@ static void gdbstub_check_breakpoint(void)
/* /*
* *
*/ */
static void __attribute__((unused)) gdbstub_show_regs(void) static void __maybe_unused gdbstub_show_regs(void)
{ {
unsigned long *reg; unsigned long *reg;
int loop; int loop;
...@@ -1223,7 +1223,7 @@ static void __attribute__((unused)) gdbstub_show_regs(void) ...@@ -1223,7 +1223,7 @@ static void __attribute__((unused)) gdbstub_show_regs(void)
/* /*
* dump debugging regs * dump debugging regs
*/ */
static void __attribute__((unused)) gdbstub_dump_debugregs(void) static void __maybe_unused gdbstub_dump_debugregs(void)
{ {
gdbstub_printk("DCR %08lx ", __debug_status.dcr); gdbstub_printk("DCR %08lx ", __debug_status.dcr);
gdbstub_printk("BRR %08lx\n", __debug_status.brr); gdbstub_printk("BRR %08lx\n", __debug_status.brr);
...@@ -2079,25 +2079,25 @@ void gdbstub_exit(int status) ...@@ -2079,25 +2079,25 @@ void gdbstub_exit(int status)
* GDB wants to call malloc() and free() to allocate memory for calling kernel * GDB wants to call malloc() and free() to allocate memory for calling kernel
* functions directly from its command line * functions directly from its command line
*/ */
static void *malloc(size_t size) __attribute__((unused)); static void *malloc(size_t size) __maybe_unused;
static void *malloc(size_t size) static void *malloc(size_t size)
{ {
return kmalloc(size, GFP_ATOMIC); return kmalloc(size, GFP_ATOMIC);
} }
static void free(void *p) __attribute__((unused)); static void free(void *p) __maybe_unused;
static void free(void *p) static void free(void *p)
{ {
kfree(p); kfree(p);
} }
static uint32_t ___get_HSR0(void) __attribute__((unused)); static uint32_t ___get_HSR0(void) __maybe_unused;
static uint32_t ___get_HSR0(void) static uint32_t ___get_HSR0(void)
{ {
return __get_HSR(0); return __get_HSR(0);
} }
static uint32_t ___set_HSR0(uint32_t x) __attribute__((unused)); static uint32_t ___set_HSR0(uint32_t x) __maybe_unused;
static uint32_t ___set_HSR0(uint32_t x) static uint32_t ___set_HSR0(uint32_t x)
{ {
__set_HSR(0, x); __set_HSR(0, x);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册