From: Guenter Roeck <linux@roeck-us.net>
To: Paul Louvel <paul.louvel@bootlin.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 9/9] watchdog: w83627hf_wdt: Use dev_* logging instead of pr_*
Date: Sat, 25 Jul 2026 07:30:10 -0700 [thread overview]
Message-ID: <281bda77-e1ff-48c2-bb27-2706c735e361@roeck-us.net> (raw)
In-Reply-To: <20260725-w83627hf_wdt-improvements-v1-9-4e9a1b4e8297@bootlin.com>
On 7/25/26 03:29, Paul Louvel wrote:
> The pr_* logging functions do not identify which device generated a
> message. Use dev_* logging functions instead.
> Since the device name is printed with this family of function, remove
> the duplicate name in the initialization message.
>
> Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
Please combine this patch with the patch introducing the probe function,
and, as mentioned, do not use goto() and do not generate a message for
memory allocation failures.
Thanks,
Guenter
> ---
> drivers/watchdog/w83627hf_wdt.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
> index cf1a3fb3a6fd..83c5d8b52b13 100644
> --- a/drivers/watchdog/w83627hf_wdt.c
> +++ b/drivers/watchdog/w83627hf_wdt.c
> @@ -471,12 +471,13 @@ static int wdt_probe(struct platform_device *pdev)
> const struct platform_device_id *id = platform_get_device_id(pdev);
> const struct wdt_pdata *pdata = pdev->dev.platform_data;
> enum chips chip = id->driver_data;
> + struct device *dev = &pdev->dev;
> struct watchdog_device *wdd;
> struct w83627hf_data *data;
> struct resource *res;
> int ret;
>
> - pr_info("WDT driver for %s Super I/O chip initialising\n", id->name);
> + dev_info(dev, "WDT driver initialising\n");
>
> res = platform_get_resource(pdev, IORESOURCE_IO, 0);
> if (!res) {
> @@ -533,11 +534,11 @@ static int wdt_probe(struct platform_device *pdev)
>
> if (data->early_timer_val) {
> if (early_disable) {
> - pr_warn("Stopping previously enabled watchdog until userland kicks in\n");
> + dev_warn(dev, "Stopping previously enabled watchdog until userland kicks in\n");
> ret = wdt_stop(wdd);
> } else {
> - pr_info("Watchdog already running. Resetting timeout to %d sec\n",
> - wdd->timeout);
> + dev_info(dev, "Watchdog already running. Resetting timeout to %d sec\n",
> + wdd->timeout);
> ret = wdt_start(wdd);
> set_bit(WDOG_HW_RUNNING, &wdd->status);
> }
> @@ -550,13 +551,12 @@ static int wdt_probe(struct platform_device *pdev)
> if (ret)
> goto fail;
>
> - pr_info("initialized. timeout=%d sec (nowayout=%d)\n", wdd->timeout,
> - nowayout);
> + dev_info(dev, "initialized. timeout=%d sec (nowayout=%d)\n",
> + wdd->timeout, nowayout);
>
> return 0;
> fail:
> - pr_err("failed to initialize watchdog (err=%d)\n", ret);
> - return ret;
> + return dev_err_probe(dev, ret, "failed to initialize watchdog\n");
> }
>
> /*
>
prev parent reply other threads:[~2026-07-25 14:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 10:29 [PATCH 0/9] watchdog: w83627hf_wdt: Convert driver to the driver model and add minute support Paul Louvel
2026-07-25 10:29 ` [PATCH 1/9] watchdog: w83627hf_wdt: Replace magic numbers with descriptive macros Paul Louvel
2026-07-25 14:44 ` Guenter Roeck
2026-07-25 10:29 ` [PATCH 2/9] watchdog: w83627hf_wdt: Convert to platform driver model Paul Louvel
2026-07-25 14:48 ` Guenter Roeck
2026-07-25 10:29 ` [PATCH 3/9] watchdog: w83627hf_wdt: Use private driver data structure Paul Louvel
2026-07-25 10:29 ` [PATCH 4/9] watchdog: w83627hf_wdt: Move register offsets into driver data Paul Louvel
2026-07-25 10:29 ` [PATCH 5/9] watchdog: w83627hf_wdt: Add Super I/O configuration port as a platform device resource Paul Louvel
2026-07-25 10:29 ` [PATCH 6/9] watchdog: w83627hf_wdt: Store Super I/O unlocking sequence in platform data Paul Louvel
2026-07-25 10:29 ` [PATCH 7/9] watchdog: w83627hf_wdt: Add minute mode counting Paul Louvel
2026-07-25 10:29 ` [PATCH 8/9] watchdog: w83627hf_wdt: Report all initialization failures in probe Paul Louvel
2026-07-25 14:28 ` Guenter Roeck
2026-07-25 10:29 ` [PATCH 9/9] watchdog: w83627hf_wdt: Use dev_* logging instead of pr_* Paul Louvel
2026-07-25 14:30 ` Guenter Roeck [this message]
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=281bda77-e1ff-48c2-bb27-2706c735e361@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=paul.louvel@bootlin.com \
--cc=thomas.petazzoni@bootlin.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
all inboxes | Powered by JetHome®