All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: Correct watchdog timeout print message
       [not found] <CGME20231127010544epcas2p195e888cab27c0cbabd2f4b596404f5d8@epcas2p1.samsung.com>
@ 2023-11-27  1:05 ` Chanho Park
  2023-11-30  2:45   ` Simon Glass
  2023-12-01  7:37   ` Stefan Roese
  0 siblings, 2 replies; 5+ messages in thread
From: Chanho Park @ 2023-11-27  1:05 UTC (permalink / raw)
  To: Stefan Roese, u-boot; +Cc: Chanho Park

The wdt_start function takes timeout_ms as a parameter and starts the
watchdog with this value. However, when you output the message, it shows
the default timeout value for the watchdog device.
So this patch fixes that part to output the correct timeout value.

Before -->
StarFive # wdt start 3000
WDT:   Started watchdog@13070000 without servicing  (60s timeout)

After -->
StarFive # wdt start 3000
WDT:   Started watchdog@13070000 without servicing  (3s timeout)

Fixes: c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the cyclic framework")
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
 drivers/watchdog/wdt-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index ed329284decb..65a4bc1f90ed 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -141,7 +141,7 @@ int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
 
 		printf("WDT:   Started %s with%s servicing %s (%ds timeout)\n",
 		       dev->name, IS_ENABLED(CONFIG_WATCHDOG) ? "" : "out",
-		       str, priv->timeout);
+		       str, (u32)(timeout_ms / 1000));
 	}
 
 	return ret;
-- 
2.39.2


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

* Re: [PATCH] watchdog: Correct watchdog timeout print message
  2023-11-27  1:05 ` [PATCH] watchdog: Correct watchdog timeout print message Chanho Park
@ 2023-11-30  2:45   ` Simon Glass
  2023-12-01  7:37   ` Stefan Roese
  1 sibling, 0 replies; 5+ messages in thread
From: Simon Glass @ 2023-11-30  2:45 UTC (permalink / raw)
  To: Chanho Park; +Cc: Stefan Roese, u-boot

On Sun, 26 Nov 2023 at 18:06, Chanho Park <chanho61.park@samsung.com> wrote:
>
> The wdt_start function takes timeout_ms as a parameter and starts the
> watchdog with this value. However, when you output the message, it shows
> the default timeout value for the watchdog device.
> So this patch fixes that part to output the correct timeout value.
>
> Before -->
> StarFive # wdt start 3000
> WDT:   Started watchdog@13070000 without servicing  (60s timeout)
>
> After -->
> StarFive # wdt start 3000
> WDT:   Started watchdog@13070000 without servicing  (3s timeout)
>
> Fixes: c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the cyclic framework")
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
>  drivers/watchdog/wdt-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* Re: [PATCH] watchdog: Correct watchdog timeout print message
  2023-11-27  1:05 ` [PATCH] watchdog: Correct watchdog timeout print message Chanho Park
  2023-11-30  2:45   ` Simon Glass
@ 2023-12-01  7:37   ` Stefan Roese
  2023-12-01 10:38     ` Stefan Roese
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Roese @ 2023-12-01  7:37 UTC (permalink / raw)
  To: Chanho Park, u-boot

On 11/27/23 02:05, Chanho Park wrote:
> The wdt_start function takes timeout_ms as a parameter and starts the
> watchdog with this value. However, when you output the message, it shows
> the default timeout value for the watchdog device.
> So this patch fixes that part to output the correct timeout value.
> 
> Before -->
> StarFive # wdt start 3000
> WDT:   Started watchdog@13070000 without servicing  (60s timeout)
> 
> After -->
> StarFive # wdt start 3000
> WDT:   Started watchdog@13070000 without servicing  (3s timeout)
> 
> Fixes: c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the cyclic framework")
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   drivers/watchdog/wdt-uclass.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
> index ed329284decb..65a4bc1f90ed 100644
> --- a/drivers/watchdog/wdt-uclass.c
> +++ b/drivers/watchdog/wdt-uclass.c
> @@ -141,7 +141,7 @@ int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
>   
>   		printf("WDT:   Started %s with%s servicing %s (%ds timeout)\n",
>   		       dev->name, IS_ENABLED(CONFIG_WATCHDOG) ? "" : "out",
> -		       str, priv->timeout);
> +		       str, (u32)(timeout_ms / 1000));
>   	}
>   
>   	return ret;

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

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

* Re: [PATCH] watchdog: Correct watchdog timeout print message
  2023-12-01  7:37   ` Stefan Roese
@ 2023-12-01 10:38     ` Stefan Roese
  2023-12-03  8:14       ` Chanho Park
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Roese @ 2023-12-01 10:38 UTC (permalink / raw)
  To: Chanho Park, u-boot

On 12/1/23 08:37, Stefan Roese wrote:
> On 11/27/23 02:05, Chanho Park wrote:
>> The wdt_start function takes timeout_ms as a parameter and starts the
>> watchdog with this value. However, when you output the message, it shows
>> the default timeout value for the watchdog device.
>> So this patch fixes that part to output the correct timeout value.
>>
>> Before -->
>> StarFive # wdt start 3000
>> WDT:   Started watchdog@13070000 without servicing  (60s timeout)
>>
>> After -->
>> StarFive # wdt start 3000
>> WDT:   Started watchdog@13070000 without servicing  (3s timeout)
>>
>> Fixes: c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the 
>> cyclic framework")
>> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> 
> Reviewed-by: Stefan Roese <sr@denx.de>
> 
> Thanks,
> Stefan
> 
>> ---
>>   drivers/watchdog/wdt-uclass.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/watchdog/wdt-uclass.c 
>> b/drivers/watchdog/wdt-uclass.c
>> index ed329284decb..65a4bc1f90ed 100644
>> --- a/drivers/watchdog/wdt-uclass.c
>> +++ b/drivers/watchdog/wdt-uclass.c
>> @@ -141,7 +141,7 @@ int wdt_start(struct udevice *dev, u64 timeout_ms, 
>> ulong flags)
>>           printf("WDT:   Started %s with%s servicing %s (%ds timeout)\n",
>>                  dev->name, IS_ENABLED(CONFIG_WATCHDOG) ? "" : "out",
>> -               str, priv->timeout);
>> +               str, (u32)(timeout_ms / 1000));

Unfortunately this commit break CI build - I tested using Azure CI:

test.py for QEMU platforms qemu_m68k:


Successfully installed attrs-23.1.0 jsonschema-4.17.3 pyrsistent-0.20.0 
pyyaml-6.0
+ tools/buildman/buildman -o /tmp/M5208EVBE -w -E -W -e --board 
M5208EVBE -a CONFIG_M68K_QEMU=y -a '~CONFIG_MCFTMR'
Building current source for 1 boards (1 thread, 2 jobs per thread)

Starting build...


     0    0    0 /1       -1      (starting)

       m68k:  +   M5208EVBE
+m68k-linux-ld.bfd: drivers/watchdog/wdt-uclass.o: in function `wdt_start':
+drivers/watchdog/wdt-uclass.c:144:(.text.wdt_start+0xc6): undefined 
reference to `__udivdi3'
+make[1]: *** [Makefile:1765: u-boot] Error 1
+make: *** [Makefile:177: sub-make] Error 2

     0    0    1 /1              M5208EVBE
Completed: 1 total built, 1 newly), duration 0:00:21, rate 0.05
##[error]Bash exited with code '100'.
##[warning]RetryHelper encountered task failure, will retry (attempt #: 
1 out of 2) after 1000 ms
Generating script.

Could you please take a look?

Thanks,
Stefan

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

* RE: [PATCH] watchdog: Correct watchdog timeout print message
  2023-12-01 10:38     ` Stefan Roese
@ 2023-12-03  8:14       ` Chanho Park
  0 siblings, 0 replies; 5+ messages in thread
From: Chanho Park @ 2023-12-03  8:14 UTC (permalink / raw)
  To: 'Stefan Roese', u-boot

> -----Original Message-----
> From: Stefan Roese <sr@denx.de>
> Sent: Friday, December 1, 2023 7:39 PM
> To: Chanho Park <chanho61.park@samsung.com>; u-boot@lists.denx.de
> Subject: Re: [PATCH] watchdog: Correct watchdog timeout print message
> 
> On 12/1/23 08:37, Stefan Roese wrote:
> > On 11/27/23 02:05, Chanho Park wrote:
> >> The wdt_start function takes timeout_ms as a parameter and starts the
> >> watchdog with this value. However, when you output the message, it
> shows
> >> the default timeout value for the watchdog device.
> >> So this patch fixes that part to output the correct timeout value.
> >>
> >> Before -->
> >> StarFive # wdt start 3000
> >> WDT:   Started watchdog@13070000 without servicing  (60s timeout)
> >>
> >> After -->
> >> StarFive # wdt start 3000
> >> WDT:   Started watchdog@13070000 without servicing  (3s timeout)
> >>
> >> Fixes: c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the
> >> cyclic framework")
> >> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> >
> > Reviewed-by: Stefan Roese <sr@denx.de>
> >
> > Thanks,
> > Stefan
> >
> >> ---
> >>   drivers/watchdog/wdt-uclass.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/watchdog/wdt-uclass.c
> >> b/drivers/watchdog/wdt-uclass.c
> >> index ed329284decb..65a4bc1f90ed 100644
> >> --- a/drivers/watchdog/wdt-uclass.c
> >> +++ b/drivers/watchdog/wdt-uclass.c
> >> @@ -141,7 +141,7 @@ int wdt_start(struct udevice *dev, u64 timeout_ms,
> >> ulong flags)
> >>           printf("WDT:   Started %s with%s servicing %s (%ds
> timeout)\n",
> >>                  dev->name, IS_ENABLED(CONFIG_WATCHDOG) ? "" : "out",
> >> -               str, priv->timeout);
> >> +               str, (u32)(timeout_ms / 1000));
> 
> Unfortunately this commit break CI build - I tested using Azure CI:
> 
> test.py for QEMU platforms qemu_m68k:
> 
> 
> Successfully installed attrs-23.1.0 jsonschema-4.17.3 pyrsistent-0.20.0
> pyyaml-6.0
> + tools/buildman/buildman -o /tmp/M5208EVBE -w -E -W -e --board
> M5208EVBE -a CONFIG_M68K_QEMU=y -a '~CONFIG_MCFTMR'
> Building current source for 1 boards (1 thread, 2 jobs per thread)
> 
> Starting build...
> 
> 
>      0    0    0 /1       -1      (starting)
> 
>        m68k:  +   M5208EVBE
> +m68k-linux-ld.bfd: drivers/watchdog/wdt-uclass.o: in function `wdt_start':
> +drivers/watchdog/wdt-uclass.c:144:(.text.wdt_start+0xc6): undefined
> reference to `__udivdi3'
> +make[1]: *** [Makefile:1765: u-boot] Error 1
> +make: *** [Makefile:177: sub-make] Error 2
> 
>      0    0    1 /1              M5208EVBE
> Completed: 1 total built, 1 newly), duration 0:00:21, rate 0.05
> ##[error]Bash exited with code '100'.
> ##[warning]RetryHelper encountered task failure, will retry (attempt #:
> 1 out of 2) after 1000 ms
> Generating script.
> 
> Could you please take a look?

Sure. I'll fix it and post the v2 patch.

Best Regards,
Chanho Park


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

end of thread, other threads:[~2023-12-03  8:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20231127010544epcas2p195e888cab27c0cbabd2f4b596404f5d8@epcas2p1.samsung.com>
2023-11-27  1:05 ` [PATCH] watchdog: Correct watchdog timeout print message Chanho Park
2023-11-30  2:45   ` Simon Glass
2023-12-01  7:37   ` Stefan Roese
2023-12-01 10:38     ` Stefan Roese
2023-12-03  8:14       ` Chanho Park

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.