From 0f0be7f75153923afb3241b07b89773c97f92022 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sat, 28 Jan 2023 01:02:25 -0500 Subject: Fix compiler warnings * i386/xen/xen.c: Move failsafe_callback_regs to header file and include xen/xen.h * xen/block.c: `name` must be const. Fix format string. * xen/console.c: Move hyp_console_write and inline it in the header. Use static qualifier whenever possible. Cast to interrupt_handler_fn. * xen/console.h: Define hyp_console_write as inline function. * xen/evt.c: Avoid old style declaration and use interrupt_handler_fn. * xen/evt.h: Use interrupt_handler_fn. * xen/net.c: Use static. Use correct format and make `name` const. * xen/time.c: Avoid old style declarations by adding void to the parameter list. * xen/xen.c: Use static. Use interrupt_handler_fn. Delete `_hyp_halt` and `_hyp_todo`. * xen/xen.h: Define hyp_failsafe_c_callback here to make sure we have the prototype. Message-Id: --- xen/console.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'xen/console.c') diff --git a/xen/console.c b/xen/console.c index 4907903e..0bf2f712 100644 --- a/xen/console.c +++ b/xen/console.c @@ -35,13 +35,7 @@ static struct xencons_interface *console; static int kd_pollc; int kb_mode; /* XXX: actually don't care. */ -#undef hyp_console_write -void hyp_console_write(const char *str, int len) -{ - hyp_console_io (CONSOLEIO_write, len, kvtolin(str)); -} - -int hypputc(int c) +static int hypputc(int c) { if (!console) { char d = c; @@ -142,7 +136,7 @@ int hypcnwrite(dev_t dev, io_req_t ior) return char_write(&hypcn_tty, ior); } -void hypcnstart(struct tty *tp) +static void hypcnstart(struct tty *tp) { spl_t o_pri; int ch; @@ -166,7 +160,7 @@ void hypcnstart(struct tty *tp) } } -void hypcnstop() +static void hypcnstop(struct tty *t, int n) { } @@ -235,6 +229,6 @@ int hypcninit(struct consdev *cp) #ifdef MACH_PV_PAGETABLES pmap_set_page_readwrite(console); #endif /* MACH_PV_PAGETABLES */ - hyp_evt_handler(boot_info.console_evtchn, hypcnintr, 0, SPL6); + hyp_evt_handler(boot_info.console_evtchn, (interrupt_handler_fn)hypcnintr, 0, SPL6); return 0; } -- cgit v1.2.3