Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1692360 > unrolled thread

[PATCH] watchdog: imx2_wdt: use new_timeout value to override the old

Started by<yanjiang.jin@windriver.com>
First post2017-07-20 04:50 +0200
Last post2017-07-20 05:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old <yanjiang.jin@windriver.com> - 2017-07-20 04:50 +0200
    Re: [PATCH] watchdog: imx2_wdt: use new_timeout value to override the  old Guenter Roeck <linux@roeck-us.net> - 2017-07-20 05:20 +0200
      Re: [PATCH] watchdog: imx2_wdt: use new_timeout value to override the  old yjin <yanjiang.jin@windriver.com> - 2017-07-20 05:30 +0200

#1692360 — [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old

From<yanjiang.jin@windriver.com>
Date2017-07-20 04:50 +0200
Subject[PATCH] watchdog: imx2_wdt: use new_timeout value to override the old
Message-ID<u59Hk-Sh-15@gated-at.bofh.it>
From: Yanjiang Jin <yanjiang.jin@windriver.com>

Without this patch we couldn't change the timeout value of imx2_wdt.

Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
---
 drivers/watchdog/imx2_wdt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 4874b0f..6cfeee6 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -178,6 +178,9 @@ static int imx2_wdt_set_timeout(struct watchdog_device *wdog,
 
 	regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT,
 			   WDOG_SEC_TO_COUNT(new_timeout));
+
+	wdog->timeout = new_timeout;
+
 	return 0;
 }
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1692368 — Re: [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old

FromGuenter Roeck <linux@roeck-us.net>
Date2017-07-20 05:20 +0200
SubjectRe: [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old
Message-ID<u5aam-1kU-5@gated-at.bofh.it>
In reply to#1692360
On 07/19/2017 07:45 PM, yanjiang.jin@windriver.com wrote:
> From: Yanjiang Jin <yanjiang.jin@windriver.com>
> 
> Without this patch we couldn't change the timeout value of imx2_wdt.
> 
> Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
> ---
>   drivers/watchdog/imx2_wdt.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 4874b0f..6cfeee6 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -178,6 +178,9 @@ static int imx2_wdt_set_timeout(struct watchdog_device *wdog,
>   
>   	regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT,
>   			   WDOG_SEC_TO_COUNT(new_timeout));
> +
> +	wdog->timeout = new_timeout;
> +

I must be missing something. That very same code is already in line 177,
added with commit 30dd4a8f08b57 ("watchdog: imx2_wdt: also set wdog->timeout
to new_timeout") back in 2015.

Did you see this in an older kernel, maybe ?

Guenter

[toc] | [prev] | [next] | [standalone]


#1692371 — Re: [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old

Fromyjin <yanjiang.jin@windriver.com>
Date2017-07-20 05:30 +0200
SubjectRe: [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old
Message-ID<u5ak1-1ov-5@gated-at.bofh.it>
In reply to#1692368

On 2017年07月20日 11:18, Guenter Roeck wrote:
> On 07/19/2017 07:45 PM, yanjiang.jin@windriver.com wrote:
>> From: Yanjiang Jin <yanjiang.jin@windriver.com>
>>
>> Without this patch we couldn't change the timeout value of imx2_wdt.
>>
>> Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
>> ---
>>   drivers/watchdog/imx2_wdt.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
>> index 4874b0f..6cfeee6 100644
>> --- a/drivers/watchdog/imx2_wdt.c
>> +++ b/drivers/watchdog/imx2_wdt.c
>> @@ -178,6 +178,9 @@ static int imx2_wdt_set_timeout(struct 
>> watchdog_device *wdog,
>>         regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT,
>>                  WDOG_SEC_TO_COUNT(new_timeout));
>> +
>> +    wdog->timeout = new_timeout;
>> +
>
> I must be missing something. That very same code is already in line 177,
> added with commit 30dd4a8f08b57 ("watchdog: imx2_wdt: also set 
> wdog->timeout
> to new_timeout") back in 2015.
>
> Did you see this in an older kernel, maybe ?

Oh, I missed this. I did use the older kernel to validate it. Thanks for 
your reminder, please ignore my patch.
Thanks again!

Regards!
Yanjiang
>
> Guenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web