On Mon, 15 Aug 2011 22:40:58 +0200 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
Am 03.08.2011 13:40 schrieb Stefan Tauner:
On Wed, 03 Aug 2011 09:02:52 +0200 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
Suggestion: struct board_pciid_enable -> struct board_match board_match_coreboot_name() -> board_match_cbname()
What do you think?
looks fine imo. board_match_pci_card_ids could also be renamed to board_match_pci_ids and if you are at it please change the comment of it:
Done.
oh my. now that i see the code, i think renaming the board enables to board_match is really a bad idea. mainly because we use "match" as verb in other places, but here as substantive. e.g. static const struct board_match *board_match_cbname a function that matches boards according to their cbname should return a board, not a "board match". it is just a question of taste, but i find it awful :)
the wiki table is named board_info hmhm maybe board_detail, but that's long.. :/ what about just "board"? another way to mitigate "my" problem would be to no use match as a verb for the method names, but using "get" or "find" instead.
/*
- Match boards on PCI IDs and subsystem IDs.
- Second set of IDs can be main only or missing completely.
*/ const static struct board_pciid_enable *board_match_pci_card_ids(enum board_match_phase phase)
- Second set of IDs can be main only or missing completely.
- Second set of IDs can contain primary IDs only or be missing completely.
I tried to find an alternate wording.
that's good, because i obviously missed the point of the whole sentence/method ;)
aaaand if we change board_match_pci_card_ids we should also change pci_card_find to pci_dev_find or something like that... :)
Well, if we rename that one, we'd have to call it pci_dev_subsys_find, and that's a net loss from the 80 column perspective, but it may indeed clarify the code. Further input is appreciated.
why do we have to? we find pci devs, not pci dev subsystems ;) hm maybe it should be find_pci_dev? or maybe no... still dizzy from sleeping sorry :)