Re: [PATCH v6 11/17] static_call: Simple self-test

From: Steven Rostedt
Date: Mon Jul 13 2020 - 16:26:49 EST


On Sat, 11 Jul 2020 12:27:02 +0200
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> > static int __init test_static_call_init(void)
> > {
> > int i;
> >
> > for (i = 0; i < ARRAY_SIZE(static_call_data); i++ ) {
> > if (static_call_data[i].func)
> > static_call_update(sc_selftest, static_call_data[i].func);
> > WARN_ON(run_static_call(static_call_data[i].val) != static_call_data[i].expect);
> > }
> >
> > return 0;
> > }
>
> Lots of compile errors with that, fixed them all :-)

Hey, I wrote that all without compiling it. I would have been surprised
if it was clean.

-- Steve