From: Marc Gonzalez <marc.w.gonzalez@free.fr>
To: Guenter Roeck <linux@roeck-us.net>,
Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Mans Rullgard <mans@mansr.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH 23/23] watchdog: tangox_wdt: Convert to use device managed functions and other improvements
Date: Wed, 10 Apr 2019 16:09:05 +0200 [thread overview]
Message-ID: <6f8ec860-42ff-d33a-9a58-626d2fa4e7c8@free.fr> (raw)
In-Reply-To: <c875ddd9-13f4-c6d4-4537-21b80000b9b5@roeck-us.net>
On 10/04/2019 15:37, Guenter Roeck wrote:
> On 4/10/19 6:04 AM, Marc Gonzalez wrote:
>
>> On 09/04/2019 19:24, Guenter Roeck wrote:
>>
>>> Use device managed functions to simplify error handling, reduce
>>> source code size, improve readability, and reduce the likelihood of bugs.
>>> Other improvements as listed below.
>>>
>>> The conversion was done automatically with coccinelle using the
>>> following semantic patches. The semantic patches and the scripts
>>> used to generate this commit log are available at
>>> https://github.com/groeck/coccinelle-patches
>>>
>>> - Drop assignments to otherwise unused variables
>>> - Drop unnecessary braces around conditional return statements
>>> - Drop empty remove function
>>> - Use devm_add_action_or_reset() for calls to clk_disable_unprepare
>>> - Replace stop on remove with call to watchdog_stop_on_unregister()
>>> - Use devm_watchdog_register_driver() to register watchdog device
>>
>> No devm_clk_prepare() in mainline? :-(
>>
>> https://lore.kernel.org/patchwork/patch/755487/
>
> We went through that several times and never succeeded. This was the major
> reason why I didn't submit this series earlier since I was hoping for it
> to appear at some point. Unfortunately, someone always objected, typically
> with comments along the line that it could be misused, or citing individual
> examples where the current code in some driver is wrong and should be fixed
> instead.
>
> This isn't really a technical argument: Everything can be misused, and all
> code has bugs. Neither is a reason to reject a new useful API. As such, one
> has to assume that after refuting such arguments, and even after fixing all
> bugs in existing code, the opponents of the new API will come up with other
> reasons to reject it.
>
> At the end, I gave up trying. Feel free to try yourself; I most definitely
> won't try it anymore. Using devm_add_action_or_reset() is a bit more clumsy,
> but works just as well.
Hello Guenter,
I am saddened to read about your frustration. I might give it a try, if Dmitry
doesn't feel like giving it another shot.
Regards.
prev parent reply other threads:[~2019-04-10 14:09 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 17:23 [PATCH 00/23] watchdog: Expand use of device managed functions (series 2 of 3) Guenter Roeck
2019-04-09 17:23 ` [PATCH 01/23] watchdog: max77620_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-09 17:23 ` [PATCH 02/23] watchdog: mena21_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-11 7:18 ` Johannes Thumshirn
2019-04-09 17:23 ` [PATCH 03/23] watchdog: menf21bmc_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-09 17:23 ` [PATCH 04/23] watchdog: meson_gxbb_wdt: " Guenter Roeck
2019-04-09 17:23 ` [PATCH 05/23] watchdog: meson_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-09 17:23 ` [PATCH 06/23] watchdog: mlx_wdt: " Guenter Roeck
2019-04-09 17:23 ` [PATCH 07/23] watchdog: moxart_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-09 17:23 ` [PATCH 08/23] watchdog: mtk_wdt: " Guenter Roeck
2019-04-09 17:23 ` [PATCH 09/23] watchdog: npcm_wdt: Use local variable 'dev' consistently Guenter Roeck
2019-04-09 17:23 ` [PATCH 10/23] watchdog: of_xilinx_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-10 6:38 ` Michal Simek
2019-04-10 12:09 ` Guenter Roeck
2019-04-09 17:23 ` [PATCH 11/23] watchdog: pm8916_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-09 17:23 ` [PATCH 12/23] watchdog: qcom-wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-09 17:23 ` [PATCH 13/23] watchdog: rn5t618_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-09 17:23 ` [PATCH 14/23] watchdog: rtd119x_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-09 17:23 ` [PATCH 15/23] watchdog: rza_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-09 17:23 ` [PATCH 16/23] watchdog: sama5d4_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-09 17:23 ` [PATCH 17/23] watchdog: sirfsoc_wdt: " Guenter Roeck
2019-04-09 17:23 ` [PATCH 18/23] watchdog: 1: " Guenter Roeck
2019-04-09 17:38 ` Guenter Roeck
2019-04-09 17:23 ` [PATCH 19/23] watchdog: st_lpc_wdt: Convert to use device managed functions Guenter Roeck
2019-04-10 7:26 ` Patrice CHOTARD
2019-04-09 17:23 ` [PATCH 20/23] watchdog: stmp3xxx_rtc_wdt: " Guenter Roeck
2019-04-09 17:23 ` [PATCH 21/23] watchdog: stpmic1_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-09 17:24 ` [PATCH 22/23] watchdog: sunxi_wdt: " Guenter Roeck
2019-04-10 7:06 ` Maxime Ripard
2019-04-09 17:24 ` [PATCH 23/23] watchdog: tangox_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-10 11:20 ` Måns Rullgård
2019-04-10 13:04 ` Marc Gonzalez
2019-04-10 13:37 ` Guenter Roeck
2019-04-10 14:09 ` Marc Gonzalez [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=6f8ec860-42ff-d33a-9a58-626d2fa4e7c8@free.fr \
--to=marc.w.gonzalez@free.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mans@mansr.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®