Am 11.05.2012 13:18, schrieb Peter Maydell:
> On 10 May 2012 01:14, Andreas Färber <afaer...@suse.de> wrote:
>> Needed for armv7m_reset().
>>
>> Signed-off-by: Andreas Färber <afaer...@suse.de>
> 
> Acked-by: Peter Maydell <peter.mayd...@linaro.org>
Thanks, applied to qom-next:
http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/qom-next

> I'd have preferred it if you hadn't made the style change
> from "if (!foo)" to "if (foo == NULL)", incidentally, but I'm
> not going to insist on a respin for it.

For the record, Peter's request here was to not propagate such stylistic
changes unneccessarily throughout old code. In these two cases on one
line I added the missing opening brace and on the other I had to change
the variable name so it does not add to the patch.

Both styles are valid C and can be expected to produce identical machine
code with an optimizing compiler.

What we might do though is assist the compiler in determining which code
paths are likely() vs. unlikely(). For stylistic reasons I prefer to
have the unlikely error case in the if, e.g. in cpu_sh4_init(). These
are not hot paths though so it shouldn't matter much.

/-F

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to