From: Laurent Vivier <lvivier@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] altera_timer: fix incorrect memset
Date: Thu, 18 May 2017 17:00:49 +0200 [thread overview]
Message-ID: <b502c8a2-56b5-a526-aa82-0f64ba1d7981@redhat.com> (raw)
In-Reply-To: <20170518103334.8808-1-pbonzini@redhat.com>
On 18/05/2017 12:33, Paolo Bonzini wrote:
> Use sizeof instead of ARRAY_SIZE, fixing -Wmemset-elt-size with recent
> GCC versions.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/timer/altera_timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/timer/altera_timer.c b/hw/timer/altera_timer.c
> index 6d4862661d..c9a0fc5dca 100644
> --- a/hw/timer/altera_timer.c
> +++ b/hw/timer/altera_timer.c
> @@ -204,7 +204,7 @@ static void altera_timer_reset(DeviceState *dev)
>
> ptimer_stop(t->ptimer);
> ptimer_set_limit(t->ptimer, 0xffffffff, 1);
> - memset(t->regs, 0, ARRAY_SIZE(t->regs));
> + memset(t->regs, 0, sizeof(t->regs));
> }
>
> static Property altera_timer_properties[] = {
>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
next prev parent reply other threads:[~2017-05-18 15:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 10:33 [Qemu-devel] [PATCH] altera_timer: fix incorrect memset Paolo Bonzini
2017-05-18 15:00 ` Laurent Vivier [this message]
2017-05-23 14:44 ` Michael Tokarev
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=b502c8a2-56b5-a526-aa82-0f64ba1d7981@redhat.com \
--to=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).