Skip to content

watchdog: Convert to use device managed functions and other improvements

Guenter Roeck linux-watchdog lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22watchdog: armada_37xx_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/armada_37xx_wdt.c+14 -290 replies
2/22watchdog: asm9260_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/asm9260_wdt.c+29 -440 replies
3/22watchdog: aspeed_wdt: Use 'dev' instead of dereferencing it repeatedlydrivers/watchdog/aspeed_wdt.c+11 -103 replies
4/22watchdog: atlas7_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/atlas7_wdt.c+19 -420 replies
5/22watchdog: bcm2835_wdt: drop platform_set_drvdatadrivers/watchdog/bcm2835_wdt.c+0 -11 reply
6/22watchdog: bcm7038_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/bcm7038_wdt.c+13 -250 replies
7/22watchdog: bcm_kona_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/bcm_kona_wdt.c+4 -101 reply
8/22watchdog: cadence_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/cadence_wdt.c+27 -560 replies
9/22watchdog: da9052_wdt: Use 'dev' instead of dereferencing it repeatedlydrivers/watchdog/da9052_wdt.c+6 -71 reply
10/22watchdog: da9055_wdt: Use 'dev' instead of dereferencing it repeatedlydrivers/watchdog/da9055_wdt.c+6 -61 reply
11/22watchdog: da9062_wdt: Use 'dev' instead of dereferencing it repeatedlydrivers/watchdog/da9062_wdt.c+8 -121 reply
12/22watchdog: da9063_wdt: Use 'dev' instead of dereferencing it repeatedlydrivers/watchdog/da9063_wdt.c+6 -52 replies
13/22watchdog: davinci_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/davinci_wdt.c+16 -250 replies
14/22watchdog: ep93xx_wdt: Use 'dev' instead of dereferencing it repeatedlydrivers/watchdog/ep93xx_wdt.c+7 -60 replies
15/22watchdog: ftwdt010_wdt: Use 'dev' consistentlydrivers/watchdog/ftwdt010_wdt.c+1 -10 replies
16/22watchdog: gpio_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/gpio_wdt.c+2 -140 replies
17/22watchdog: iTCO_wdt: Various improvementsdrivers/watchdog/iTCO_wdt.c+1 -120 replies
18/22watchdog: imgpdc_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/imgpdc_wdt.c+36 -550 replies
19/22watchdog: intel-mid_wdt: Use 'dev' instead of dereferencing it repeatedlydrivers/watchdog/intel-mid_wdt.c+11 -110 replies
20/22watchdog: kempld_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/kempld_wdt.c+4 -240 replies
21/22watchdog: lpc18xx_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/lpc18xx_wdt.c+17 -260 replies
22/22watchdog: max63xx_wdt: Convert to use device managed functions and other improvementsdrivers/watchdog/max63xx_wdt.c+6 -140 replies

Reviews trailers per patch

7 of 22 patches have a Reviewed-by or Acked-by.

PatchAndrew JefferyStefan WahrenRay JuiSteve Twiss
1/22
2/22
3/22R-b
4/22
5/22A-b
6/22
7/22R-b
8/22
9/22A-b
10/22A-b
11/22A-b
12/22A-b
13/22
14/22
15/22
16/22
17/22
18/22
19/22
20/22
21/22
22/22

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 00/22] watchdog: Convert to use device managed functions and other improvements

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

This is the first of (at least) three series of similar patches for watchdog drivers.