06 May, 2019
40 commits
-
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.This patch fixes the following warnings:
drivers/watchdog/machzwd.c: In function ‘zf_set_timer’:
./arch/x86/include/asm/io.h:355:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
#define outw outw
drivers/watchdog/machzwd.c:80:53: note: in expansion of macro ‘outw’
#define zf_writew(port, data) { outb(port, INDEX); outw(data, DATA_W); }
^~~~
drivers/watchdog/machzwd.c:179:3: note: in expansion of macro ‘zf_writew’
zf_writew(COUNTER_1, new);
^~~~~~~~~
drivers/watchdog/machzwd.c:180:2: note: here
case WD2:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.Signed-off-by: Gustavo A. R. Silva
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop empty remove function
- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Vladimir Zapolskiy
Cc: Sylvain Lemieux
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
This also drops the inaccurate message on remove; the driver won't be
removed if the hardware watchdog is running, no matter if the watchdog
device is open or not.
- Use local variable 'struct device *dev' consistently
- Use devm_watchdog_register_driver() to register watchdog deviceSigned-off-by: Guenter Roeck
Reviewed-by: Christophe Leroy
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly. Also, there is no call to dev_get_drvdata()
or platform_get_drvdata() in the driver, so drop the unnecessary
call to platform_set_drvdata().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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop empty remove function
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog device
- Replace shutdown function with call to watchdog_stop_on_reboot()Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesCc: Matthias Brugger
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- 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
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Keguang Zhang
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop empty remove function
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Maxime Coquelin
Cc: Alexandre Torgue
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Use local variable 'struct device *dev' consistently
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Jun Nie
Cc: Shawn Guo
Signed-off-by: Guenter Roeck
Acked-by: Shawn Guo
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Use local variable 'struct device *dev' consistently
- Use devm_watchdog_register_driver() to register watchdog device
- Replace shutdown function with call to watchdog_stop_on_reboot()Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesCc: Shawn Guo
Cc: Sascha Hauer
Cc: Pengutronix Kernel Team
Cc: Fabio Estevam
Cc: NXP Linux Team
Signed-off-by: Guenter Roeck
Acked-by: Shawn Guo
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
There is no call to dev_get_drvdata() or platform_get_drvdata() in the
driver. Drop the unnecessary call to platform_set_drvdata().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-patchesCc: Masahiro Yamada
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Use watchdog_stop_on_unregister() in probe instead of calling
tegra_wdt_stop() in the remove function. Also introduce local variable
'struct device *dev' and use it instead of dereferencing it repeatedly.
Finally, drop the now empty remove function.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-patchesCc: Thierry Reding
Cc: Jonathan Hunter
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
The get_timeleft call for wdat_wdt was using ACPI_WDAT_GET_COUNTDOWN
when running an action on the device, which would return the configured
countdown, instead of ACPI_WDAT_GET_CURRENT_COUNTDOWN, which returns the
time left before the watchdog will fire. This change corrects that.Signed-off-by: Bryan Tan
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- 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 deviceCc: Marc Gonzalez
Cc: Mans Rullgard
Signed-off-by: Guenter Roeck
Acked-by: Mans Rullgard
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesCc: Maxime Ripard
Cc: Chen-Yu Tsai
Signed-off-by: Guenter Roeck
Acked-by: Maxime Ripard
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Use device managed functions to simplify error handling, reduce
source code size, improve readability, and reduce the likelyhood of bugs.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- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Maxime Coquelin
Cc: Alexandre Torgue
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Use device managed functions to simplify error handling, reduce
source code size, improve readability, and reduce the likelyhood of bugs.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
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Patrice Chotard
Signed-off-by: Guenter Roeck
Acked-by: Patrice Chotard
Signed-off-by: Wim Van Sebroeck -
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- Replace devm_add_action() followed by failure action with
devm_add_action_or_reset()
- Replace 'val = e; return val;' with 'return e;'
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop empty remove function
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Replace shutdown function with call to watchdog_stop_on_reboot()
- Replace stop on remove with call to watchdog_stop_on_unregister()
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Barry Song
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Replace stop on remove with call to watchdog_stop_on_unregister()
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Nicolas Ferre
Cc: Alexandre Belloni
Cc: Ludovic Desroches
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- 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 'of_clk_get(np, 0)' with 'devm_clk_get(dev, NULL)'
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Andy Gross
Cc: David Brown
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.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-patchesSigned-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Michal Simek
Signed-off-by: Guenter Roeck
Acked-by: Michal Simek
Signed-off-by: Wim Van Sebroeck -
Use local variable 'struct device *dev' consistently.
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-patchesCc: Avi Fishman
Cc: Tomer Maimon
Cc: Patrick Venture
Cc: Nancy Yuen
Cc: Brendan Higgins
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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- Drop assignments to otherwise unused variables
- Drop empty remove function
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog device
- Replace shutdown function with call to watchdog_stop_on_reboot()Cc: Matthias Brugger
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck