qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] watchdog/aspeed: fix variable type to store reload value
@ 2017-09-20  6:49 Cédric Le Goater
  2017-10-08 23:45 ` Andrew Jeffery
  0 siblings, 1 reply; 3+ messages in thread
From: Cédric Le Goater @ 2017-09-20  6:49 UTC (permalink / raw)
  To: Peter Maydell
  Cc: qemu-devel, Richard Henderson, Andrew Jeffery, Anton D . Kachalov,
	Cédric Le Goater

Initially from Anton D. Kachalov" <mouse@yandex-team.ru> but the SoB was
missing.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
[clg: change commit log and subject
      replace UL suffix by ULL ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/watchdog/wdt_aspeed.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
index 22bce364d7b5..95f6ad186d72 100644
--- a/hw/watchdog/wdt_aspeed.c
+++ b/hw/watchdog/wdt_aspeed.c
@@ -100,13 +100,13 @@ static uint64_t aspeed_wdt_read(void *opaque, hwaddr offset, unsigned size)
 
 static void aspeed_wdt_reload(AspeedWDTState *s, bool pclk)
 {
-    uint32_t reload;
+    uint64_t reload;
 
     if (pclk) {
         reload = muldiv64(s->regs[WDT_RELOAD_VALUE], NANOSECONDS_PER_SECOND,
                           s->pclk_freq);
     } else {
-        reload = s->regs[WDT_RELOAD_VALUE] * 1000;
+        reload = s->regs[WDT_RELOAD_VALUE] * 1000ULL;
     }
 
     if (aspeed_wdt_is_enabled(s)) {
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] watchdog/aspeed: fix variable type to store reload value
  2017-09-20  6:49 [Qemu-devel] [PATCH v2] watchdog/aspeed: fix variable type to store reload value Cédric Le Goater
@ 2017-10-08 23:45 ` Andrew Jeffery
  2017-10-09 18:34   ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Jeffery @ 2017-10-08 23:45 UTC (permalink / raw)
  To: Cédric Le Goater, Peter Maydell
  Cc: qemu-devel, Richard Henderson, Anton D . Kachalov

[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]

On Wed, 2017-09-20 at 08:49 +0200, Cédric Le Goater wrote:
> Initially from Anton D. Kachalov" <mouse@yandex-team.ru> but the SoB was
> missing.
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> [clg: change commit log and subject
>       replace UL suffix by ULL ]
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

Acked-by: Andrew Jeffery <andrew@aj.id.au>

> ---
>  hw/watchdog/wdt_aspeed.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
> index 22bce364d7b5..95f6ad186d72 100644
> --- a/hw/watchdog/wdt_aspeed.c
> +++ b/hw/watchdog/wdt_aspeed.c
> @@ -100,13 +100,13 @@ static uint64_t aspeed_wdt_read(void *opaque, hwaddr offset, unsigned size)
>  
>  static void aspeed_wdt_reload(AspeedWDTState *s, bool pclk)
>  {
> -    uint32_t reload;
> +    uint64_t reload;
>  
>      if (pclk) {
>          reload = muldiv64(s->regs[WDT_RELOAD_VALUE], NANOSECONDS_PER_SECOND,
>                            s->pclk_freq);
>      } else {
> -        reload = s->regs[WDT_RELOAD_VALUE] * 1000;
> +        reload = s->regs[WDT_RELOAD_VALUE] * 1000ULL;
>      }
>  
>      if (aspeed_wdt_is_enabled(s)) {

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] watchdog/aspeed: fix variable type to store reload value
  2017-10-08 23:45 ` Andrew Jeffery
@ 2017-10-09 18:34   ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-10-09 18:34 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: Cédric Le Goater, QEMU Developers, Richard Henderson,
	Anton D . Kachalov

On 9 October 2017 at 00:45, Andrew Jeffery <andrew@aj.id.au> wrote:
> On Wed, 2017-09-20 at 08:49 +0200, Cédric Le Goater wrote:
>> Initially from Anton D. Kachalov" <mouse@yandex-team.ru> but the SoB was
>> missing.
>>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>> [clg: change commit log and subject
>>       replace UL suffix by ULL ]
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>
> Acked-by: Andrew Jeffery <andrew@aj.id.au>



Applied to target-arm.next, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-09 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-20  6:49 [Qemu-devel] [PATCH v2] watchdog/aspeed: fix variable type to store reload value Cédric Le Goater
2017-10-08 23:45 ` Andrew Jeffery
2017-10-09 18:34   ` Peter Maydell

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).