Dear coreboot folks,
to make the output of `diff` for `mainboard.c` smaller, Jens Rottmann submitted a patch, to unify the name of the device enable function for AMD Family14 boards [1].
struct chip_operations mainboard_ops = { .enable_dev = inagua_enable, };
Naming this function is not uniform between the boards in the tree. AMD based boards, seem to use *boardname*_enable, Intel boards `mainboard_enable`. There is for example also `mb_enable` in the tree and Jens proposed `enable_dev`.
If there are no objections to unification, what should the name for the function be? I like Jens’ proposal as `enable_dev` is shorter than `mainboard_enable` and it is clear that the struct member `.enable_dev` gets set to it.
Please comment on this, so a patch can be submitted.
Thanks,
Paul
[1] http://review.coreboot.org/#/c/2464/1/src/mainboard/amd/inagua/mainboard.c
Paul Menzel wrote:
struct chip_operations mainboard_ops = { .enable_dev = inagua_enable, };
Naming this function is not uniform between the boards in the tree.
Depending on how mainboard_ops is used in all the boards maybe we want to simply remove it completely.
If there are no objections to unification, what should the name for the function be?
Function names should try to be descriptive. "enable_dev" is not very descriptive. I like "mainboard_enable" because it makes output such as
printk("%s: foo", __func__);
useful.
Please comment on this, so a patch can be submitted.
I'd +2 a commit which renames all to mainboard_enable. It would be very nice to also add a test for this to the Jenkins build.
//Peter
Am Freitag, den 22.02.2013, 02:17 +0100 schrieb Peter Stuge:
Paul Menzel wrote:
struct chip_operations mainboard_ops = { .enable_dev = inagua_enable, };
Naming this function is not uniform between the boards in the tree.
Depending on how mainboard_ops is used in all the boards maybe we want to simply remove it completely.
If there are no objections to unification, what should the name for the function be?
Function names should try to be descriptive. "enable_dev" is not very descriptive. I like "mainboard_enable" because it makes output such as
printk("%s: foo", __func__);
useful.
Please comment on this, so a patch can be submitted.
I'd +2 a commit which renames all to mainboard_enable.
http://review.coreboot.org/2493
It would be very nice to also add a test for this to the Jenkins build.
Indeed.
Thanks,
Paul