Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1556834
| From | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 32/62] watchdog: meson_gxbb_wdt: Convert to use device managed functions and other improvements |
| Date | 2017-01-11 19:50 +0100 |
| Message-ID | <sYw8a-1XP-31@gated-at.bofh.it> (permalink) |
| References | <sYebf-7JK-3@gated-at.bofh.it> <sYfgZ-8l2-3@gated-at.bofh.it> <sYfh0-8l2-23@gated-at.bofh.it> |
| Organization | BayLibre |
Guenter Roeck <linux@roeck-us.net> writes:
> Use device managed functions to simplify error handling, reduce
> source code size, improve readability, and reduce the likelyhood 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
>
> - Use devm_add_action_or_reset() for calls to clk_disable_unprepare
> - Check return value from clk_prepare_enable()
> - Replace 'val = e; return val;' with 'return e;'
> - Replace 'if (e) return e; return 0;' with 'return e;'
> - Drop assignments to otherwise unused variables
> - Replace 'if (e) { return expr; }' with 'if (e) return expr;'
> - Drop remove function
> - Use devm_watchdog_register_driver() to register watchdog device
> - Replace shutdown function with call to watchdog_stop_on_reboot()
>
> Cc: Carlo Caione <carlo@caione.org>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Nice, thanks for the cleanup!
Acked-by: Kevin Hilman <khilman@baylibre.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/62] watchdog: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 22/62] watchdog: imx2_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 12/62] watchdog: da9055_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 04/62] watchdog: atlas7_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 15/62] watchdog: davinci_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 29/62] watchdog: max77620_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 08/62] watchdog: bcm_kona_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 30/62] watchdog: mena21_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
Re: [PATCH 30/62] watchdog: mena21_wdt: Convert to use device managed functions and other improvements Johannes Thumshirn <morbidrsa@gmail.com> - 2017-01-13 09:10 +0100
[PATCH 02/62] watchdog: aspeed_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
Re: [PATCH 02/62] watchdog: aspeed_wdt: Convert to use device managed functions Joel Stanley <joel@jms.id.au> - 2017-01-11 06:20 +0100
[PATCH 03/62] watchdog: at91sam9_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 25/62] watchdog: kempld_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 09/62] watchdog: cadence_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:40 +0100
[PATCH 05/62] watchdog: bcm2835_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:50 +0100
Re: [PATCH 05/62] watchdog: bcm2835_wdt: Convert to use device managed functions and other improvements Eric Anholt <eric@anholt.net> - 2017-01-14 07:30 +0100
[PATCH 21/62] watchdog: imgpdc_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:50 +0100
[PATCH 19/62] watchdog: gpio_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:50 +0100
[PATCH 10/62] watchdog: coh901327_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 00:50 +0100
Re: [PATCH 10/62] watchdog: coh901327_wdt: Convert to use device managed functions Linus Walleij <linus.walleij@linaro.org> - 2017-01-11 16:50 +0100
[PATCH 38/62] watchdog: nic7018_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 49/62] watchdog: sama5d4_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 40/62] watchdog: omap_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 39/62] watchdog: of_xilinx_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 36/62] watchdog: mt7621_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 42/62] watchdog: pic32-dmt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 35/62] watchdog: mpc8xxx_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 46/62] watchdog: renesas_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 32/62] watchdog: meson_gxbb_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
Re: [PATCH 32/62] watchdog: meson_gxbb_wdt: Convert to use device managed functions and other improvements Neil Armstrong <narmstrong@baylibre.com> - 2017-01-11 09:50 +0100
Re: [PATCH 32/62] watchdog: meson_gxbb_wdt: Convert to use device managed functions and other improvements Kevin Hilman <khilman@baylibre.com> - 2017-01-11 19:50 +0100
[PATCH 41/62] watchdog: orion_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 34/62] watchdog: moxart_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 47/62] watchdog: retu_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 37/62] watchdog: mtk_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 50/62] watchdog: sbsa_gwdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 43/62] watchdog: pic32-wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 44/62] watchdog: pnx4008_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
Re: [PATCH 44/62] watchdog: pnx4008_wdt: Convert to use device managed functions Vladimir Zapolskiy <vz@mleia.com> - 2017-01-12 01:20 +0100
[PATCH 45/62] watchdog: qcom-wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 31/62] watchdog: menf21bmc_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 48/62] watchdog: rt2880_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 51/62] watchdog: shwdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
[PATCH 33/62] watchdog: meson_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 01:50 +0100
Re: [PATCH 33/62] watchdog: meson_wdt: Convert to use device managed functions and other improvements Kevin Hilman <khilman@baylibre.com> - 2017-01-11 19:50 +0100
[PATCH 53/62] watchdog: st_lpc_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:10 +0100
[PATCH 52/62] watchdog: sirfsoc_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:10 +0100
[PATCH 55/62] watchdog: sunxi_wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:10 +0100
Re: [PATCH 55/62] watchdog: sunxi_wdt: Convert to use device managed functions and other improvements Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-01-11 13:20 +0100
[PATCH 57/62] watchdog: tegra_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:20 +0100
[PATCH 61/62] watchdog: ux500_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:20 +0100
[PATCH 60/62] watchdog: txx9wdt: Convert to use device managed functions and other improvements Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:20 +0100
[PATCH 59/62] watchdog: twl4030_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:20 +0100
[PATCH 62/62] watchdog: wm831x_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:20 +0100
Re: [PATCH 62/62] watchdog: wm831x_wdt: Convert to use device managed functions Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2017-01-12 11:30 +0100
[PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:20 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2017-01-11 10:10 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 12:00 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2017-01-11 13:40 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 15:30 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Måns Rullgård <mans@mansr.com> - 2017-01-11 15:50 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2017-01-11 16:30 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 19:00 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2017-01-12 10:50 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2017-01-12 11:00 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Måns Rullgård <mans@mansr.com> - 2017-01-12 12:30 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2017-01-12 13:20 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2017-01-11 15:40 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> - 2017-01-11 16:00 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 18:30 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-13 06:20 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-12 01:20 +0100
Re: [PATCH 56/62] watchdog: tangox_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-12 02:40 +0100
[PATCH 54/62] watchdog: stmp3xxx_rtc_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:20 +0100
[PATCH 58/62] watchdog: ts4800_wdt: Convert to use device managed functions Guenter Roeck <linux@roeck-us.net> - 2017-01-11 03:20 +0100
csiph-web