From: Wolfgang Denk Date: Sun, 16 Oct 2011 22:31:59 +0200 Subject: [U-Boot] [PATCH v2 1/2] Introduce generic TPM support in u-boot In-Reply-To: References: <20111015033850.74AD5419FF@eskimo.mtv.corp.google.com> <201110152309.55400.marek.vasut@gmail.com> <201110160531.34424.marek.vasut@gmail.com> <20111016073501.5315913B6F5C@gemini.denx.de> <20111016200428.4C982140436D@gemini.denx.de> Message-ID: <20111016203159.E183F1208DCB@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Vadim Bendebury, In message 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 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Alan Turing thought about criteria to settle the question of whether machines can think, a question of which we now know that it is about as relevant as the question of whether submarines can swim. -- Edsger Dijkstra