Re: [PATCH 2/2] ibmaem: New driver for power/energy meters in IBMSystem X hardware

From: Darrick J. Wong
Date: Thu Apr 24 2008 - 18:17:30 EST


On Mon, Mar 31, 2008 at 10:05:25PM -0500, Anthony Liguori wrote:

> It really shouldn't be necessary to have all of these macro functions.
> In this above macro, you would just have to pass the ro and rw
> structures along with a remove function pointer. Since all of your
> types have common members, you could just have a common substructure and
> pass that around.

Hmm... it isn't too difficult to refactor the registration function to
make it easier to look at, though I'd rather keep the AEM1 and AEM2 guts
separate rather than aggressively eliminating macros by making the AEM1
structs a subset of the AEM2 structs.

--D
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/