From: Guenter Roeck <linux@roeck-us.net>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-watchdog@vger.kernel.org,
Wim Van Sebroeck <wim@linux-watchdog.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] watchdog: orion_wdt: Use devm APIs for clock and watchdog management
Date: Tue, 19 May 2026 17:39:00 -0700 [thread overview]
Message-ID: <ad3215f7-e4d5-413e-982f-efd859be1580@roeck-us.net> (raw)
In-Reply-To: <CAKxU2N-2rA7GQZGoBQdkJLvWeSZNbfUqzNvEOoBskzc1FjcH=A@mail.gmail.com>
On 5/19/26 16:19, Rosen Penev wrote:
> On Tue, May 19, 2026 at 4:10 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> On 5/19/26 15:44, Rosen Penev wrote:
>>> On Tue, May 19, 2026 at 3:34 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>>>
>>>> On Tue, May 19, 2026 at 02:42:29PM -0700, Rosen Penev wrote:
>>>>> Replace clk_get/clk_prepare_enable/clk_put with devm_clk_get_enabled
>>>>> and devm_clk_get_optional_enabled so the clock lifecycle is managed
>>>>> automatically. Switch to devm_watchdog_register_device to eliminate
>>>>> the manual remove callback and the disable_clk error path.
>>>>>
>>>>> Switching to devm in these functions is fine as the proper
>>>>> platform_device is passed in.
>>>>>
>>>>> Assisted-by: Claude:Sonnet-4.6
>>>>> Signed-off-by: Rosen Penev <rosenp@gmail.com>
>>>>
>>>> drivers/watchdog/orion_wdt.c: In function 'orion_wdt_clock_init':
>>>> drivers/watchdog/orion_wdt.c:82:13: error: unused variable 'ret' [-Werror=unused-variable]
>>>> 82 | int ret;
>>>> | ^~~
>>>> drivers/watchdog/orion_wdt.c: In function 'armada370_wdt_clock_init':
>>>> drivers/watchdog/orion_wdt.c:95:13: error: unused variable 'ret' [-Werror=unused-variable]
>>>> 95 | int ret;
>>>> | ^~~
>>>> drivers/watchdog/orion_wdt.c: In function 'armada375_wdt_clock_init':
>>>> drivers/watchdog/orion_wdt.c:113:13: error: unused variable 'ret' [-Werror=unused-variable]
>>>> 113 | int ret;
>>>> | ^~~
>>>> drivers/watchdog/orion_wdt.c: In function 'armadaxp_wdt_clock_init':
>>>> drivers/watchdog/orion_wdt.c:144:13: error: unused variable 'ret' [-Werror=unused-variable]
>>>> 144 | int ret;
>>>>
>>>> On top of that, the APIs are not 1:1 replaceable.
>>>>
>>>> I am so tired of this. Please stop. I am no longer going to accept any "cleanup"
>>>> patches.
>>> If I don't, the bot yells at me. If I do, you yell at me. It seems I
>>> am at an impasse.
>>
>> The above is the compiler yelling at you.
> No I mean my watchdog: orion: Use of_device_get_match_data() patch
> resulted in the AI complaining about clock code that I didn't touch.
>
Problems with your patch:
- It was not identified as bug fix
- It explains what was changed, but not the underlying reason.
"so the clock lifecycle is managed automatically" is not an
explanation and does not explain _why_ the change is necessary.
- It has no Reported-by: tag
- It does not compile
- The APIs are not 1:1 replaceable. At the very least, replacing
of_clk_get_by_name with devm_clk_get_optional_enabled() in one
function and with devm_clk_get_enabled() in another is very suspicious
and asks for a detailed explanation.
- Given that you tried to compile it on ppc very much suggests that it
wasn't tested, and the limited test status was not mentioned in the
patch (not that testing would be easy, given the different means
used to get the clock).
In such a situation it is much better to respond to the agent e-mail
and tell it (and me) that you understand that there is an unrelated
problem, but that you don't have the knowledge/understanding of the
driver and its requirements to submit a fix.
Guenter
next prev parent reply other threads:[~2026-05-20 0:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 21:42 Rosen Penev
2026-05-19 22:33 ` Guenter Roeck
2026-05-19 22:44 ` Rosen Penev
2026-05-19 23:10 ` Guenter Roeck
2026-05-19 23:19 ` Rosen Penev
2026-05-20 0:39 ` Guenter Roeck [this message]
2026-05-20 5:10 ` kernel test robot
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=ad3215f7-e4d5-413e-982f-efd859be1580@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=rosenp@gmail.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®