Re: [tip:WIP.sched/core 19/22] kernel/sched/core.c:2836:18: error: passing argument 1 of 'mips_install_watch_registers' from incompatible pointer type
From: Ingo Molnar
Date: Mon Mar 05 2018 - 02:13:05 EST
* Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
> > kernel//sched/core.c:2836:2: note: in expansion of macro 'switch_to'
> > switch_to(prev, next, prev);
> > ^~~~~~~~~
> > arch/mips/include/asm/watch.h:15:6: note: expected 'struct task_struct *' but argument is of type 'struct task_struct *'
> > void mips_install_watch_registers(struct task_struct *t);
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: some warnings being treated as errors
>
> I don't have a tip git repo, but it looks like this would fix it (based on most
> recent -next):
>
> --- linux-next-20180302.orig/arch/mips/include/asm/watch.h
> +++ linux-next-20180302/arch/mips/include/asm/watch.h
> @@ -12,6 +12,8 @@
>
> #include <asm/mipsregs.h>
>
> +struct task_struct;
> +
> void mips_install_watch_registers(struct task_struct *t);
> void mips_read_watch_registers(void);
> void mips_clear_watch_registers(void);
Yeah, so MIPS wasn't the only arch affected - so I fixed it by restoring the
original header order.
Thanks,
Ingo