linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/23] watchdog: Expand use of device managed functions (series 2 of 3)
@ 2019-04-09 17:23 Guenter Roeck
  2019-04-09 17:23 ` [PATCH 01/23] watchdog: max77620_wdt: Convert to use device managed functions and other improvements Guenter Roeck
                   ` (22 more replies)
  0 siblings, 23 replies; 31+ messages in thread
From: Guenter Roeck @ 2019-04-09 17:23 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 function
- 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 second of (at least) three series of similar patches for watchdog
drivers.

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

end of thread, other threads:[~2019-04-11  7:18 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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