linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] watchdog: Expand use of device managed functions (series 3 of 3)
@ 2019-04-10 16:27 Guenter Roeck
  2019-04-10 16:27 ` [PATCH 01/22] watchdog: tegra_wdt: Use watchdog_stop_on_unregister and other improvements Guenter Roeck
                   ` (21 more replies)
  0 siblings, 22 replies; 32+ messages in thread
From: Guenter Roeck @ 2019-04-10 16:27 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: linux-watchdog, linux-kernel, Guenter Roeck

Use device managed functions and other changes to simplify error handling,
reduce source code size, improve readability, and reduce the likelyhood
of bugs.

The changes made in this series can be summarized to

- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Use devm_watchdog_register_driver() to register watchdog device
- Replace 'of_clk_get(np, 0)' with 'devm_clk_get(dev, NULL)'
- Drop assignments to otherwise unused variables
- Drop unnecessary braces around conditional return statements
- Drop empty remove functions
- Replace shutdown function with call to watchdog_stop_on_reboot()
- Replace stop on remove with call to watchdog_stop_on_unregister()
- Replace 'goto l; ... l: return e;' with 'return e;'
- Replace 'ret = e; return ret;' with 'return e;'.
- Use local variable 'struct device *dev' consistently
- Introduce local variable 'struct device *dev' and use it instead of
  dereferencing it repeatedly
- Drop unnecessary calls to platform_set_drvdata()

Conversions were performed automatically with coccinelle using a number
of semantic patches. The semantic patches and the scripts used to generate
commit logs are available at https://github.com/groeck/coccinelle-patches.
All patches were compile tested and manually reviewed.

This is the third of three series of similar patches for watchdog drivers.
More patches may follow over time.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2019-04-23 13:28 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10 16:27 [PATCH 00/22] watchdog: Expand use of device managed functions (series 3 of 3) Guenter Roeck
2019-04-10 16:27 ` [PATCH 01/22] watchdog: tegra_wdt: Use watchdog_stop_on_unregister and other improvements Guenter Roeck
2019-04-10 16:27 ` [PATCH 02/22] watchdog: tqmx86_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-10 16:27 ` [PATCH 03/22] watchdog: ts4800_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-10 16:27 ` [PATCH 04/22] watchdog: ts72xx_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-10 16:27 ` [PATCH 05/22] watchdog: twl4030_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-10 16:27 ` [PATCH 06/22] watchdog: uniphier_wdt: drop platform_set_drvdata Guenter Roeck
2019-04-10 16:27 ` [PATCH 07/22] watchdog: wdat_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-10 16:27 ` [PATCH 08/22] watchdog: wm831x_wdt: " Guenter Roeck
2019-04-10 16:27 ` [PATCH 09/22] watchdog: xen_wdt: " Guenter Roeck
2019-04-10 16:27 ` [PATCH 10/22] watchdog: imx_sc_wdt: " Guenter Roeck
2019-04-11  8:48   ` Shawn Guo
2019-04-10 16:27 ` [PATCH 11/22] watchdog: sbsa_gwdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-10 16:27 ` [PATCH 12/22] watchdog: zx2967_wdt: " Guenter Roeck
2019-04-11  8:53   ` Shawn Guo
2019-04-10 16:27 ` [PATCH 13/22] watchdog: stm32_iwdg: " Guenter Roeck
2019-04-10 16:27 ` [PATCH 14/22] watchdog: ux500_wdt: " Guenter Roeck
2019-04-10 16:27 ` [PATCH 15/22] watchdog: pic32-dmt: " Guenter Roeck
2019-04-10 16:27 ` [PATCH 16/22] watchdog: pic32-wdt: " Guenter Roeck
2019-04-10 16:27 ` [PATCH 17/22] watchdog: loongson1_wdt: " Guenter Roeck
2019-04-10 16:27 ` [PATCH 18/22] watchdog: mt7621_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-10 18:46   ` Joe Perches
2019-04-10 19:54     ` Guenter Roeck
2019-04-10 22:10       ` Joe Perches
2019-04-10 22:15         ` Guenter Roeck
2019-04-10 16:28 ` [PATCH 19/22] watchdog: rt2880_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-10 16:28 ` [PATCH 20/22] watchdog: jz4740_wdt: Use 'dev' instead of dereferencing it repeatedly Guenter Roeck
2019-04-10 16:52   ` Joe Perches
2019-04-10 17:47     ` Guenter Roeck
2019-04-10 16:28 ` [PATCH 21/22] watchdog: mpc8xxx_wdt: Convert to use device managed functions and other improvements Guenter Roeck
2019-04-23 13:28   ` Christophe Leroy
2019-04-10 16:28 ` [PATCH 22/22] watchdog: pnx4008_wdt: " Guenter Roeck

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).