qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/3] hw/net: Add npcm7xx emc model


From: Peter Maydell
Subject: Re: [PATCH v2 1/3] hw/net: Add npcm7xx emc model
Date: Tue, 9 Feb 2021 09:44:16 +0000

On Tue, 9 Feb 2021 at 01:26, Doug Evans <dje@google.com> wrote:
> On Mon, Feb 8, 2021 at 9:17 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>> Don't put local variable declarations in the middle of functions,
>> please. Coding style says they should be at the start of a
>> block (so, here, the start of the function). It looks like you've
>> got middle-of-function declarations in several places in other
>> functions too, so could you fix them all up please?
>
>
> Fixed in v3.
> Maybe now's a good time though to revisit this rule.
> QEMU uses C99, and mixed decls/statements is an easy improvement to the 
> coding standards.
> I'm guessing this is an uncontroversial request. Is there just inertia behind 
> not making the change thus far?

My personal opinion is that having declarations in the
middle of functions is uglier. CODING_STYLE.rst already
notes that we have an occasional-exception if there are
#ifdefs involved, so we don't have the style rule because
we're trying to work with compilers that don't accept
middle-of-block declarations.

thanks
-- PMM



reply via email to

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