From: "Andreas Färber" <afaerber@suse.de>
To: Evgeny Voevodin <e.voevodin@samsung.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, kyungmin.park@samsung.com,
d.solodkiy@samsung.com, m.kozlov@samsung.com,
jehyung.lee@samsung.com
Subject: Re: [Qemu-devel] [PATCH v5 05/11] ARM: exynos4210: PWM support.
Date: Tue, 10 Jan 2012 14:46:16 +0100 [thread overview]
Message-ID: <4F0C4128.7070304@suse.de> (raw)
In-Reply-To: <CAFEAcA_mhq8MNWg9tD=wO-_VMx7UABk=6yFvVB4haidXEZvdDA@mail.gmail.com>
Am 10.01.2012 13:40, schrieb Peter Maydell:
> On 23 December 2011 11:40, Evgeny Voevodin <e.voevodin@samsung.com> wrote:
>> +
>> +#define TCNTB(x) (0xC*x)
>> +#define TCMPB(x) (0xC*x+1)
>> +#define TCNTO(x) (0xC*x+2)
>> +
>> +#define GET_PRESCALER(reg, x) ((reg&(0xFF<<(8*x)))>>8*x)
>> +#define GET_DIVIDER(reg, x) (1<<((0xF<<(4*x))>>(4*x)))
>
> These macros (and the ones below) brackets around arguments (ie "(x)")
> to avoid operator precedence issues.
And add the usual spaces around operators for readability, please.
>> +static SysBusDeviceInfo exynos4210_pwm_info = {
>> + .qdev.name = "exynos4210.pwm",
>> + .qdev.size = sizeof(struct Exynos4210PWMState),
>> + .qdev.reset = exynos4210_pwm_reset,
>> + .qdev.vmsd = &VMState_Exynos4210PWMState,
>> + .init = exynos4210_pwm_init,
>> + .qdev.props = (Property[]) {
>> + DEFINE_PROP_END_OF_LIST(),
>> + }
>
> If you don't have any properties, you don't need to set .qdev.props
> at all -- there's no need to explicitly write out an empty list like this.
For qdev, that's a matter of taste (I usually add empty lists myself).
With QOM that leads to a named static array with one NULL entry that can
be avoided by following Peter's suggestion.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-01-10 13:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 11:40 [Qemu-devel] [PATCH v5 00/11] ARM: Samsung Exynos4210-based boards support Evgeny Voevodin
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 01/11] ARM: Samsung exynos4210-based boards emulation Evgeny Voevodin
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 02/11] ARM: exynos4210: UART support Evgeny Voevodin
2012-01-10 12:11 ` Peter Maydell
2012-01-11 5:28 ` Evgeny Voevodin
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 03/11] hw/sysbus.h: Increase maximum number of device IRQs Evgeny Voevodin
2012-01-10 12:40 ` Peter Maydell
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 04/11] ARM: exynos4210: IRQ subsystem support Evgeny Voevodin
2012-01-10 12:35 ` Peter Maydell
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 05/11] ARM: exynos4210: PWM support Evgeny Voevodin
2012-01-10 12:40 ` Peter Maydell
2012-01-10 13:46 ` Andreas Färber [this message]
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 06/11] hw/arm_boot.c: Extend secondary CPU bootloader Evgeny Voevodin
2012-01-10 15:32 ` Peter Maydell
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 07/11] ARM: exynos4210: MCT support Evgeny Voevodin
2012-01-10 16:13 ` Peter Maydell
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 08/11] hw/exynos4210.c: Boot secondary CPU Evgeny Voevodin
2012-01-10 16:16 ` Peter Maydell
2012-01-11 6:13 ` Evgeny Voevodin
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 09/11] hw/lan9118: Add basic 16-bit mode support Evgeny Voevodin
2012-01-10 16:29 ` Peter Maydell
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 10/11] hw/exynos4210.c: Add LAN support for SMDKC210 Evgeny Voevodin
2012-01-10 16:30 ` Peter Maydell
2011-12-23 11:40 ` [Qemu-devel] [PATCH v5 11/11] Exynos4210: added display controller implementation Evgeny Voevodin
2012-01-10 16:51 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F0C4128.7070304@suse.de \
--to=afaerber@suse.de \
--cc=d.solodkiy@samsung.com \
--cc=e.voevodin@samsung.com \
--cc=jehyung.lee@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=m.kozlov@samsung.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.