15 Jul, 2019
1 commit
-
clang warns:
drivers/watchdog/digicolor_wdt.c:121:6: warning: unused variable 'ret'
[-Wunused-variable]
int ret;
^
1 warning generated.It's unused now, remove it.
Fixes: cdad26977e3f ("watchdog: digicolor_wdt: drop warning after registering device")
Link: https://github.com/ClangBuiltLinux/linux/issues/591
Reported-by: kernelci.org bot
Signed-off-by: Nathan Chancellor
Reviewed-by: Guenter Roeck
Link: https://lore.kernel.org/r/20190709203409.117123-1-natechancellor@gmail.com
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
08 Jul, 2019
1 commit
-
The core will print out details now.
Signed-off-by: Wolfram Sang
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
06 May, 2019
1 commit
-
Use devm_platform_ioremap_resource to reduce source code size,
improve readability, and reduce the likelyhood of bugs.The conversion was done automatically with coccinelle using the
following semantic patch.@r@
identifier res, pdev;
expression a;
expression index;
expression e;
@@@depends on r@
identifier r.res;
@@
- struct resource *res;
... when != res@@
identifier res, pdev;
expression index;
expression a;
@@
- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index);
- a = devm_ioremap_resource(&pdev->dev, res);
+ a = devm_platform_ioremap_resource(pdev, index);Cc: Joel Stanley
Cc: Nicolas Ferre
Cc: Alexandre Belloni
Cc: Florian Fainelli
Cc: Linus Walleij
Cc: Baruch Siach
Cc: Keguang Zhang
Cc: Vladimir Zapolskiy
Cc: Kevin Hilman
Cc: Matthias Brugger
Cc: Avi Fishman
Cc: Nancy Yuen
Cc: Brendan Higgins
Cc: Wan ZongShun
Cc: Michal Simek
Cc: Sylvain Lemieux
Cc: Kukjin Kim
Cc: Barry Song
Cc: Orson Zhai
Cc: Patrice Chotard
Cc: Maxime Coquelin
Cc: Maxime Ripard
Cc: Chen-Yu Tsai
Cc: Marc Gonzalez
Cc: Thierry Reding
Cc: Shawn Guo
Signed-off-by: Guenter Roeck
Acked-by: Alexandre Belloni
Tested-by: Alexandre Belloni
Acked-by: Joel Stanley
Reviewed-by: Linus Walleij
Acked-by: Maxime Ripard
Acked-by: Michal Simek (cadence/xilinx wdts)
Acked-by: Thierry Reding
Reviewed-by: Florian Fainelli
Acked-by: Patrice Chotard
Acked-by: Vladimir Zapolskiy
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
24 Mar, 2018
1 commit
-
- Add SPDX identifier
- Remove boiler plate license text
- If MODULE_LICENSE and boiler plate does not match, go for boiler plate
licenseSigned-off-by: Marcus Folkesson
Acked-by: Adam Thomson
Acked-by: Baruch Siach
Acked-by: Charles Keepax
Acked-by: Keiji Hayashibara
Acked-by: Johannes Thumshirn
Acked-by: Florian Fainelli
Acked-by: Mans Rullgard
Acked-by: Matthias Brugger
Acked-by: Michal Simek
Acked-by: Neil Armstrong
Acked-by: Nicolas Ferre
Acked-by: Thierry Reding
Acked-by: Tomas Winkler
Acked-by: Patrice Chotard
Acked-by: William Breathitt Gray
Reviewed-by: Eric Anholt
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
25 Feb, 2017
3 commits
-
Declare watchdog_ops structures as const as they are only stored in the
ops field of a watchdog_device structure. This field is of type const, so
watchdog_ops structures having this property can be made const too.
Done using Coccinelle:@r disable optional_qualifier@
identifier x;
position p;
@@
static struct watchdog_ops x@p={...};@ok@
struct watchdog_device w;
identifier r.x;
position p;
@@
w.ops=&x@p;@bad@
position p != {r.p,ok.p};
identifier r.x;
@@
x@p@depends on !bad disable optional_qualifier@
identifier r.x;
@@
+const
struct watchdog_ops x;File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.text data bss dec hex filename
1340 544 0 1884 75c drivers/watchdog/bcm_kona_wdt.o
1436 440 0 1876 754 drivers/watchdog/bcm_kona_wdt.o1176 544 4 1724 6bc drivers/watchdog/digicolor_wdt.o
1272 440 4 1716 6b4 drivers/watchdog/digicolor_wdt.o925 580 89 1594 63a drivers/watchdog/ep93xx_wdt.o
1021 476 89 1586 632 drivers/watchdog/ep93xx_wdt.o4932 288 17 5237 1475 drivers/watchdog/s3c2410_wdt.o
5028 192 17 5237 1475 drivers/watchdog/s3c2410_wdt.o1977 292 1 2270 8de drivers/watchdog/sama5d4_wdt.o
2073 196 1 2270 8de drivers/watchdog/sama5d4_wdt.o1375 484 1 1860 744 drivers/watchdog/sirfsoc_wdt.o
1471 380 1 1852 73c drivers/watchdog/sirfsoc_wdt.oSize remains the same for the files drivers/watchdog/diag288_wdt.o
drivers/watchdog/asm9260_wdt.o and drivers/watchdog/atlas7_wdt.oThe following .o files did not compile:
drivers/watchdog/sun4v_wdt.o, drivers/watchdog/sbsa_gwdt.o,
drivers/watchdog/rt2880_wdt.o, drivers/watchdog/booke_wdt.o
drivers/watchdog/mt7621_wdt.oSigned-off-by: Bhumika Goyal
Signed-off-by: Guenter Roeck -
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 'goto l; ... l: return e;' with 'return e;'
- Replace 'val = e; return val;' with 'return e;'
- Drop assignments to otherwise unused variables
- Replace 'if (e) { return expr; }' with 'if (e) return expr;'
- Drop remove function
- Replace of_iomap() with platform_get_resource() followed by
devm_ioremap_resource()
- Drop platform_set_drvdata()
- Replace &pdev->dev with dev if 'struct device *dev' is a declared
variable
- Use devm_watchdog_register_driver() to register watchdog device
- Replace shutdown function with call to watchdog_stop_on_reboot()Acked-by: Baruch Siach
Tested-by: Baruch Siach
Signed-off-by: Guenter Roeck -
Declare watchdog_info structures as const as they are only stored in the
info field of watchdog_device structures. This field is of type const
struct watchdog_info *, so watchdog_info structures having this property
can be declared const too.
Done using Coccinelle:@r1 disable optional_qualifier@
identifier i;
position p;
@@
static struct watchdog_info i@p={...};@ok@
identifier r1.i;
position p;
struct watchdog_device obj;
@@
obj.info=&i@p;@bad@
position p!={r1.p,ok.p};
identifier r1.i;
@@
i@p@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct watchdog_info i;Signed-off-by: Bhumika Goyal
Acked-by: Florian Fainelli
Acked-by: Baruch Siach
Reviewed-by: Guenter Roeck
Acked-by: Adam Thomson
Signed-off-by: Guenter Roeck
01 Mar, 2016
1 commit
-
The 'action' (or restart mode) and data parameters may be used by restart
handlers, so they should be passed to the restart callback functions.Cc: Sylvain Lemieux
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
13 Dec, 2015
1 commit
-
Get rid of the custom restart handler by using the one provided by the
watchdog core.Signed-off-by: Damien Riegel
Reviewed-by: Guenter Roeck
Reviewed-by: Vivien Didelot
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
10 Sep, 2015
1 commit
-
/sys/class/watchdog/watchdogn/device/modalias can help to identify the
driver/module for a given watchdog node. However, many wdt devices do not
set their parent and so, we do not see an entry for device in sysfs for
such devices.This patch fixes parent of watchdog_device so that
/sys/class/watchdog/watchdogn/device is populated.Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not
have any parent. Not sure, how we can identify driver for these devices.Signed-off-by: Pratyush Anand
Reviewed-by: Johannes Thumshirn
Acked-by: Guenter Roeck
Acked-by: H Hartley Sweeten
Acked-by: Lee Jones
Acked-by: Lubomir Rintel
Acked-by: Maxime Coquelin
Acked-by: Thierry Reding
Acked-by: Viresh Kumar
Acked-by: Linus Walleij
Signed-off-by: Wim Van Sebroeck
22 Jun, 2015
1 commit
-
This commit add a driver for the watchdog functionality of the Conexant CX92755
SoC, from the Digicolor series of SoCs. Of 8 system timers provided by the
CX92755, the first one, timer A, can reset the chip when its counter reaches
zero. This driver uses this capability to provide userspace with a standard
watchdog, using the watchdog timer driver core framework. This driver also
implements a reboot handler for the reboot(2) system call.The watchdog driver shares the timer registers with the CX92755 timer driver
(drivers/clocksource/timer-digicolor.c). The timer driver, however, uses only
timers other than A, so both drivers should coexist.Signed-off-by: Baruch Siach
Reviewed-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck