[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH next v2 35/74] armv7m: Use cpu_arm_init() to obt

From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH next v2 35/74] armv7m: Use cpu_arm_init() to obtain ARMCPU
Date: Fri, 11 May 2012 15:34:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0

Am 11.05.2012 13:18, schrieb Peter Maydell:
> On 10 May 2012 01:14, Andreas Färber <address@hidden> wrote:
>> Needed for armv7m_reset().
>> Signed-off-by: Andreas Färber <address@hidden>
> Acked-by: Peter Maydell <address@hidden>

Thanks, applied to 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.


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

[Prev in Thread] Current Thread [Next in Thread]