
Dear Vadim Bendebury,
In message CAC3GErH1GpLTEfH3ELi5ebtJPz0HLcJxj3YX3GGUU9HgcHErGA@mail.gmail.com you wrote:
Yes, I consider this weird, too. And you failed to provide a good explanation why you think this would be needed so far.
My explanation is that it is better readable when the entire information about a chip is contained in one type, as opposed to having the size separate and needed to be carried around (instead of using ARRAY_SIZE() when needed). When the pointer to the chip structure is passed around, the recipient does not have to be aware of a separate definition, all information about the chip is contained in a structure.
I read your explanation, but I still fail to uinderstand why we need an additinal wrapper around the internal strcut, which is the only element.
Sorry, I am restating the reasons here because I am not sure if you wrote your previous reply before seeing them.
I did. That's why I wrote you failed to provide a _good_ explanation.
Please let me know if you don't find this explanation convincing, I will change the code as you suggest.
Are macros acceptable to wrap input output with debug messages, as was suggested earlier on this list, or should I replace each macro with two inline functions?
Sorry, I don't remember which code you are referring to here.
I am referring to this message:
http://lists.denx.de/pipermail/u-boot/2011-October/104780.html
Yes, I know that. But why would one macro turn into two inline functions?
Best regards,
Wolfgang Denk