Since Edward started hijacking patches on gerrit to push his agenda of getting rid of device_t without prior discussion, I would like to start a poll on how people think about this, and maybe find reasons for why it might be a good idea.
Edward wrote:
The issue of 'device_t' has many heads. The primary issue I have here is that these patches introduce many more 'device_t' instances that make the job of sorting out which 'device_t' are 'uint32_t' and which are 'struct device *' significantly harder as this sort of thing progresses.
If the author would just use 'struct device *' and there is (for some wrapped reasoning) a consensus to only use 'device_t' then it is trivial to go do 's/struct device * /device_t /g'. There is actually no reason needed here to use a opaque type which was invented to solve a particular issue however has now spilled over to becoming rampant though the tree.
The reality here is that device_t was a concept used ever since coreboot v2 (LinuxBIOS v2 from 2003 actually) existed. It is indeed the use of struct device that has accidently spilled over.
The reason this was done was to use the same driver code in romstage and ramstage. While this can be achieved by other means, no doubt, I don't think that this churn on the code base is particularly useful.
Before we continue on this path I would like to see a reason for not using device_t or why the difference between the type has to be sorted out. The whole idea is that it does not matter, and the code does not have to know.
Check out the poll at https://doodle.com/vvqtyhdxr9yhvqci
Stefan
one counter-question: is romcc ever going away, or at least is the usage gong to change such that no code would ever use the uint32 version of device_t?
If it's *never* going away then I think the change makes no sense. If romcc is going away, then I would favor the change.
ron