linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Sangwook Shin <sw617.shin@samsung.com>
Cc: krzk@kernel.org, alim.akhtar@samsung.com, wim@linux-watchdog.org,
	semen.protsenko@linaro.org, dongil01.park@samsung.com,
	khwan.seo@samsung.com, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/5] watchdog: s3c2410_wdt: Replace hardcoded values with macro definitions
Date: Thu, 21 Aug 2025 08:34:10 -0700	[thread overview]
Message-ID: <c9306682-6f99-488e-bfc9-4552a06cdce9@roeck-us.net> (raw)
In-Reply-To: <20250818021826.623830-2-sw617.shin@samsung.com>

On Mon, Aug 18, 2025 at 11:18:22AM +0900, Sangwook Shin wrote:
> Modify the code to utilize macro-defined values instead of hardcoded
> values. The value 0x100 in the s3c2410wdt_set_heartbeat function represents
> S3C2410_WTCON_PRESCALE_MAX + 1, but it is hardcoded, making its meaning
> difficult to understand and reducing code readability.
> 
> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
> Signed-off-by: Sangwook Shin <sw617.shin@samsung.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/s3c2410_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> index 40901bdac426..95f7207e390a 100644
> --- a/drivers/watchdog/s3c2410_wdt.c
> +++ b/drivers/watchdog/s3c2410_wdt.c
> @@ -587,7 +587,7 @@ static int s3c2410wdt_set_heartbeat(struct watchdog_device *wdd,
>  	if (count >= 0x10000) {
>  		divisor = DIV_ROUND_UP(count, 0xffff);
>  
> -		if (divisor > 0x100) {
> +		if (divisor > S3C2410_WTCON_PRESCALE_MAX + 1) {
>  			dev_err(wdt->dev, "timeout %d too big\n", timeout);
>  			return -EINVAL;
>  		}
> -- 
> 2.25.1
> 
> 

  reply	other threads:[~2025-08-21 15:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250818022433epcas2p37fe2cdc20b32b23ee894ceb636717a53@epcas2p3.samsung.com>
2025-08-18  2:18 ` [PATCH v6 0/5] Increase max timeout value of s3c2410 watchdog Sangwook Shin
     [not found]   ` <CGME20250818022433epcas2p2a14d0a2ebe8c421dc63ddc8371f8bc50@epcas2p2.samsung.com>
2025-08-18  2:18     ` [PATCH v6 1/5] watchdog: s3c2410_wdt: Replace hardcoded values with macro definitions Sangwook Shin
2025-08-21 15:34       ` Guenter Roeck [this message]
     [not found]   ` <CGME20250818022433epcas2p3fc48febfa6729645af6ebd088937c80c@epcas2p3.samsung.com>
2025-08-18  2:18     ` [PATCH v6 2/5] watchdog: s3c2410_wdt: Fix max_timeout being calculated larger Sangwook Shin
2025-08-18 22:27       ` Sam Protsenko
2025-08-21 15:34       ` Guenter Roeck
     [not found]   ` <CGME20250818022433epcas2p1bf8e6a335be945822721b8db1e9571e9@epcas2p1.samsung.com>
2025-08-18  2:18     ` [PATCH v6 3/5] watchdog: s3c2410_wdt: Increase max timeout value of watchdog Sangwook Shin
2025-08-21 15:35       ` Guenter Roeck
     [not found]   ` <CGME20250818022433epcas2p4fec1cccd280fc73dccc5b00e2236f836@epcas2p4.samsung.com>
2025-08-18  2:18     ` [PATCH v6 4/5] watchdog: s3c2410_wdt: exynosautov920: Enable QUIRK_HAS_32BIT_CNT Sangwook Shin
2025-08-21 15:35       ` Guenter Roeck
     [not found]   ` <CGME20250818022433epcas2p15ec2e45f26f6ff5fb69f0b1e377616f4@epcas2p1.samsung.com>
2025-08-18  2:18     ` [PATCH v6 5/5] watchdog: s3c2410_wdt: exynosautov9: Enable supported features Sangwook Shin
2025-08-21 15:35       ` Guenter Roeck

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=c9306682-6f99-488e-bfc9-4552a06cdce9@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=alim.akhtar@samsung.com \
    --cc=dongil01.park@samsung.com \
    --cc=khwan.seo@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=semen.protsenko@linaro.org \
    --cc=sw617.shin@samsung.com \
    --cc=wim@linux-watchdog.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).