> Date: Tue, 25 May 2021 13:53:57 -0500
> From: Scott Cheloha <[email protected]>
>
> Timeout callback functions should be void (*)(void *). I'd rather not
> cast in order to shove the function pointer into timeout_set(9).
>
> ok?
sure, ok kettenis@
> Index: vga.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/vga.c,v
> retrieving revision 1.73
> diff -u -p -r1.73 vga.c
> --- vga.c 25 May 2020 09:55:48 -0000 1.73
> +++ vga.c 25 May 2021 18:38:59 -0000
> @@ -254,7 +254,7 @@ void vga_scrollback(void *, void *, int)
> void vga_burner(void *v, u_int on, u_int flags);
> int vga_getchar(void *, int, int, struct wsdisplay_charcell *);
>
> -void vga_doswitch(struct vga_config *);
> +void vga_doswitch(void *);
>
> const struct wsdisplay_accessops vga_accessops = {
> .ioctl = vga_ioctl,
> @@ -763,8 +763,7 @@ vga_show_screen(void *v, void *cookie, i
> vc->switchcb = cb;
> vc->switchcbarg = cbarg;
> if (cb) {
> - timeout_set(&vc->vc_switch_timeout,
> - (void(*)(void *))vga_doswitch, vc);
> + timeout_set(&vc->vc_switch_timeout, vga_doswitch, vc);
> timeout_add(&vc->vc_switch_timeout, 0);
> return (EAGAIN);
> }
> @@ -774,8 +773,9 @@ vga_show_screen(void *v, void *cookie, i
> }
>
> void
> -vga_doswitch(struct vga_config *vc)
> +vga_doswitch(void *arg)
> {
> + struct vga_config *vc = arg;
> struct vgascreen *scr, *oldscr;
> struct vga_handle *vh = &vc->hdl;
> const struct wsscreen_descr *type;
>
>