Re: [RFC PATCH] Unexport do_machine_check() and machine_check_poll()

From: Luck, Tony
Date: Mon Mar 14 2016 - 12:56:18 EST


On Mon, Mar 14, 2016 at 05:38:54PM +0100, Borislav Petkov wrote:
> Hey Tony,
>
> how about the below, untested change?
>
> Some backporting work to SLE11 got me pondering over why we're exporting
> all those MCA-internal things to modules. Modules don't have any
> business calling those so how about hiding them behind a single point
> mce_call() function which gets a command what to do? This way, we're
> free to change stuff later too, if we decide to do so.

It doesn't seem like a very natural fit ... the three routines
take very different arguments which you bundle into a "void *".

I'm also not sure what we gain. Now we have one, complicated,
exported function that still lets modules do all the things
they could do with the three separate functions. Is there some
benefit to having fewer exports?

What am I missing?

-Tony