Re: [PATCH v2] lib/test_bitops: Do the full test during module init

From: Geert Uytterhoeven
Date: Mon Jul 06 2020 - 07:41:27 EST


Hi Andy,

On Mon, Jul 6, 2020 at 1:34 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> On Mon, Jul 06, 2020 at 01:29:00PM +0200, Geert Uytterhoeven wrote:
> > Currently, the bitops test consists of two parts: one part is executed
> > during module load, the second part during module unload. This is
> > cumbersome for the user, as he has to perform two steps to execute all
> > tests, and is different from most (all?) other tests.
> >
> > Merge the two parts, so both are executed during module load.
>
> I think it's right way to go, sorry, I didn't notice this during module
> submission.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Thanks!

> One question though, is compiler barrier enough to prevent potential ordering issues?

I think so, that's why I used barrier().
You may still be subject to CPU instruction reordering, though :-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds