public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
From: ben.hutchings@codethink.co.uk (Ben Hutchings)
To: cip-dev@lists.cip-project.org
Subject: [cip-dev] [PATCH 24/42] watchdog: renesas_wdt: Add restart handler
Date: Fri, 24 Aug 2018 19:17:13 +0100	[thread overview]
Message-ID: <1535134633.2902.41.camel@codethink.co.uk> (raw)
In-Reply-To: <1532626980-17190-25-git-send-email-fabrizio.castro@bp.renesas.com>

On Thu, 2018-07-26 at 18:42 +0100, Fabrizio Castro wrote:
> On iWave's boards iwg20d and iwg22d the only way to reboot the system is
> by means of the watchdog.
> This patch adds a restart handler to rwdt_ops, and also makes sure we
> keep its priority to the lowest level, in order to not override other
> more effective handlers.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
> (cherry picked from commit 089bcaa87e772beb005068a5ef28c71bb895d01d)
> (changed restart handler implementation as .restart is not available
> from struct watchdog_ops)
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das@bp.renesas.com>
> ---
> ?drivers/watchdog/renesas_wdt.c | 26 ++++++++++++++++++++++++++
> ?1 file changed, 26 insertions(+)
[...]
> @@ -205,6 +229,8 @@ static int rwdt_remove(struct platform_device *pdev)
> ?{
> ?	struct rwdt_priv *priv = platform_get_drvdata(pdev);
> ?
> +	if (priv->restart_handler.notifier_call);

There is a rogue semi-colon at the end of the line, so this if-
statement doesn't have any effect!

gcc 6 warns about this:

drivers/watchdog/renesas_wdt.c: In function ?rwdt_remove?:
drivers/watchdog/renesas_wdt.c:234:2: warning: this ?if? clause does not guard... [-Wmisleading-indentation]
  if (priv->restart_handler.notifier_call);
  ^~
drivers/watchdog/renesas_wdt.c:235:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ?if?
   unregister_restart_handler(&priv->restart_handler);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~

but perhaps you are using an older compiler?

I'll fix this up since it's obvious what you intended.

Ben.

> +		unregister_restart_handler(&priv->restart_handler);
> ?	watchdog_unregister_device(&priv->wdev);
> ?	pm_runtime_disable(&pdev->dev);
> ?
-- 
Ben Hutchings, Software Developer                ?        Codethink Ltd
https://www.codethink.co.uk/                 Dale House, 35 Dale Street
                                     Manchester, M1 2HF, United Kingdom

  reply	other threads:[~2018-08-24 18:17 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 17:42 [cip-dev] [PATCH 00/42] Add watchdog support to iwg20m and iwg22m Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 01/42] ARM: shmobile: Remove shmobile_boot_arg Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 02/42] ARM: shmobile: Remove shmobile_boot_arg from shmobile_smp_apmu_setup_boot Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 03/42] ARM: shmobile: r8a7779: Remove remainings of removed SCU boot setup code Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 04/42] ARM: shmobile: Add watchdog support Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 05/42] soc: renesas: Add R-Car RST driver Fabrizio Castro
2018-08-18  2:07   ` Ben Hutchings
2018-08-20  9:57     ` Fabrizio Castro
2018-08-20 14:42     ` [cip-dev] [PATCH v2 " Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 06/42] reset: Add renesas,rst DT bindings Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 07/42] clk: shmobile: rcar-gen2: Init R-Car reset IP Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 08/42] clk: Allow clocks to be marked as CRITICAL Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 09/42] clk: WARN_ON about to disable a critical clock Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 10/42] clk: fix critical clock locking Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 11/42] clk: renesas: mstp: Make INTC-SYS a critical clock Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 12/42] ARM: dts: r8a7743: Register rwdt and intc-sys clocks Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 13/42] ARM: dts: r8a7745: " Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 14/42] watchdog: renesas-wdt: add driver Fabrizio Castro
2018-08-18  2:20   ` Ben Hutchings
2018-08-20 10:19     ` Fabrizio Castro
2018-08-22 15:58       ` Ben Hutchings
2018-08-20 14:43     ` [cip-dev] [PATCH v2 " Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 15/42] watchdog: renesas_wdt: avoid (theoretical) type overflow Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 16/42] watchdog: renesas_wdt: check rate also for upper limit Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 17/42] watchdog: renesas_wdt: don't round closest with get_timeleft Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 18/42] watchdog: renesas_wdt: apply better precision Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 19/42] watchdog: renesas_wdt: add another divider option Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 20/42] watchdog: renesas_wdt: consistently use RuntimePM for clock management Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 21/42] watchdog: renesas_wdt: make 'clk' a variable local to probe() Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 22/42] watchdog: renesas_wdt: update copyright dates Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 23/42] watchdog: renesas_wdt: Add suspend/resume support Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 24/42] watchdog: renesas_wdt: Add restart handler Fabrizio Castro
2018-08-24 18:17   ` Ben Hutchings [this message]
2018-08-28  9:00     ` Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 25/42] watchdog: renesas-wdt: Add support for WDIOF_CARDRESET Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 26/42] ARM: shmobile: rcar-gen2: Add more register documentation Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 27/42] ARM: shmobile: rcar-gen2: Use ICRAM1 for jump stub on all SoCs Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 28/42] ARM: shmobile: rcar-gen2: Obtain jump stub region from DT Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 29/42] ARM: shmobile: rcar-gen2: Add watchdog support Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 30/42] ARM: dts: r8a7743: Add Inter Connect RAM Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 31/42] ARM: dts: r8a7743: Reserve SRAM for the SMP jump stub Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 32/42] ARM: dts: r8a7743: Adjust SMP routine size Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 33/42] ARM: dts: r8a7745: Add Inter Connect RAM Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 34/42] ARM: dts: r8a7745: Reserve SRAM for the SMP jump stub Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 35/42] ARM: dts: r8a7745: Adjust SMP routine size Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 36/42] ARM: dts: r8a7743: initial SoC device tree Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 37/42] ARM: dts: r8a7745: " Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 38/42] ARM: dts: r8a7743: Add watchdog support to SoC dtsi Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 39/42] ARM: dts: r8a7745: " Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 40/42] ARM: dts: iwg20m: Add watchdog support to SoM dtsi Fabrizio Castro
2018-07-26 17:42 ` [cip-dev] [PATCH 41/42] ARM: dts: iwg22m: " Fabrizio Castro
2018-07-26 17:43 ` [cip-dev] [PATCH 42/42] ARM: shmobile: defconfig: Enable RENESAS_WDT_GEN Fabrizio Castro
2018-08-24 19:07 ` [cip-dev] [PATCH 00/42] Add watchdog support to iwg20m and iwg22m Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1535134633.2902.41.camel@codethink.co.uk \
    --to=ben.hutchings@codethink.co.uk \
    --cc=cip-dev@lists.cip-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox