From: Eric Blake <eblake@redhat.com>
To: michelheily@gmail.com, qemu-devel@nongnu.org
Cc: "open list:Stellaris" <qemu-arm@nongnu.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] hw/arm/stellaris: Implement watchdog timer
Date: Sat, 23 Feb 2019 15:52:40 -0600 [thread overview]
Message-ID: <ae330da4-ab5d-1376-f897-0d2e3d5870ce@redhat.com> (raw)
In-Reply-To: <1550878686-23934-1-git-send-email-michelheily@gmail.com>
On 2/22/19 5:38 PM, michelheily@gmail.com wrote:
> From: Michel Heily <michelheily@gmail.com>
>
> Signed-off-by: Michel Heily <michelheily@gmail.com>
This appears to be your first contribution to qemu. Welcome to the
community!
Your commit message doesn't give any details beyond the "what" in the
subject line. The body of the commit message should explain the "why"
(what bug are you fixing, how to reproduce it), so that a reviewer
stands a chance of determining if the code matches the description you
gave, and if the issue you describe really does warrant the inclusion of
your patch. In particular, when implementing a particular piece of
hardware, giving a URL to the datasheet you used as your reference will
let reviewers check if your software appears to match what the actual
hardware would do.
For more patch submission hints, see:
https://wiki.qemu.org/Contribute/SubmitAPatch
I'm not an expert on this hardware, but will at least give a cursory
glance for style issues:
> + case WDT_O_LOCK:
> + return s->locked ? 1 : 0;
> + case WDT_O_PeriphID4: /* fallthrough */
> + case WDT_O_PeriphID5:
I don't think that particular /* fallthrough */ comment is needed. It
matters when you have a case with code, but not for consecutive case labels.
> +
> +static void wdtimer_write(void *opaque, hwaddr offset,
> + uint64_t value, unsigned size)
Alignment looks off.
> +{
> + wdtimer_state *s = (wdtimer_state *)opaque;
This is C, where void* implicitly converts to other types; you don't
need the cast.
> @@ -1243,7 +1478,7 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board)
> * Stellaris LM3S6965 Microcontroller Data Sheet (rev I)
> * http://www.ti.com/lit/ds/symlink/lm3s6965.pdf
> *
> - * 40000000 wdtimer (unimplemented)
> + * 40000000 wdtimer
Okay, so there is a datasheet. But it may still help to mention it in
the commit message in addition to the comment already in the code.
> * 40002000 i2c (unimplemented)
> * 40004000 GPIO
> * 40005000 GPIO
> @@ -1335,6 +1570,12 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board)
> }
> }
>
> + if (board->dc1 & (1 << 3)) { /* watchdog present */
Spacing looks off.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2019-02-23 21:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 23:38 [Qemu-devel] [PATCH] hw/arm/stellaris: Implement watchdog timer michelheily
2019-02-23 21:52 ` Eric Blake [this message]
2019-02-26 17:54 ` 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=ae330da4-ab5d-1376-f897-0d2e3d5870ce@redhat.com \
--to=eblake@redhat.com \
--cc=michelheily@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).