On 08/02/16 22:31, Michael Ellerman wrote:
Pulling the memcons out of the bin_attr here is not all that nice. This routine
should really stand on its own without reference to the bin_attr. In theory I
might want to disable building sysfs but still have this routine available.

Yeah it's a bit ugly, though does disabling sysfs actually break it? I can separate it out anyway - there's no reason for the memcons to be tied to the sysfs entry.

It's also a bit fishy if it's called before the bin_attr is initialised or when
the memcons initialisation fails. In both cases it should be OK, because the
structs in question are static and so the private pointer will be NULL, but
that's a bit fragile.

I think the solution is simply to create a:

   static struct memcons *opal_memcons;

And use that in opal_msglog_copy() and so on.

Will respin.

--
Andrew Donnellan              Software Engineer, OzLabs
[email protected]  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to