Received: by 10.223.176.46 with SMTP id f43csp959286wra; Sat, 20 Jan 2018 08:02:02 -0800 (PST) X-Google-Smtp-Source: AH8x224ScQ+6WDpW03vliiIQTtV8g4mJEED7HWrfYNVpcDL4Cc/FGrbm3deegvBjtRB68lzdTQJO X-Received: by 2002:a17:902:2cc3:: with SMTP id n61-v6mr1109624plb.440.1516464122513; Sat, 20 Jan 2018 08:02:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516464122; cv=none; d=google.com; s=arc-20160816; b=HApONujVhAOPMvfLv36JzfxOqI2MyWkavT17clu67ZwK8Y7BJdp92cmVjqoy+pVgqC vp36QHdJeETrSUgwfDUH28tUJOir9QecrTa6zbeWniEO72gA/tbu32cD5SVUld74N462 GRuMf2bBJQlCjc3nuLK19jOmANf8XEsKODl/OKVYzMWApy5WXt60x4Kd3g+dnoT+97K/ J+c/fsP8cUT9nUWv9+b/esaB6Dys7wSZHL6TxFdVZ4WK2B0T7SNQWcTwHC/v8aX/0x0l en8pn57zVPgCAZuVLH0D9y8Ev/kL65wpwTAsyrWqKmdyzHDFrDNi4FZKPxialMMasBLs gbeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=yhAGoMNTJ78K6NWBaeMCqRMDXJ5FhzjeGArJqWSv4sQ=; b=OKhs+h4bqnjU0UTgut4w62I/9rJDYBTo8jArHTxwEy1ejA2SP1Gf83xozKmGrIev9o r+h4mpsyq0Qu+1Im7qztHdIH8H091GqOrloPCj8PyajycWNh8ou/ZuCw9eDudD5ArsOA Mb+9DeOTYBzFhqOa7Dh4EACak2kCyx1tsWJiFv0F66BxNe1y5NW/7iF22rLiSpXX/5ws 2ng0NUyTyPnBZ4WjScuTQK/n9205vJ5NheH7Jrp5id+d+K2EvJfXnW2OJ8cNxxKAoELx e87kwqsT8t2wfqiS8I86corN9kntG0pgSAPITOg2UWKmrE++4R2l7ZVt/nnRSJbStO6e 32nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VxlgJLR7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si10284698pgn.121.2018.01.20.08.01.46; Sat, 20 Jan 2018 08:02:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VxlgJLR7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756279AbeATP7w (ORCPT + 99 others); Sat, 20 Jan 2018 10:59:52 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:43777 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754301AbeATP7p (ORCPT ); Sat, 20 Jan 2018 10:59:45 -0500 Received: by mail-io0-f196.google.com with SMTP id 72so5204848iom.10; Sat, 20 Jan 2018 07:59:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yhAGoMNTJ78K6NWBaeMCqRMDXJ5FhzjeGArJqWSv4sQ=; b=VxlgJLR7SuZboxCBVMNAv8rC3FkqknfqO+G7+6oAsDsuJsuBwxTmqUY8e8LfTgfCIr ixsE/n70iZ/cAdRAQtQ1nmxluQPqZphn7n/LdrlQbLC2RBT1N7gPxvdY4xak6n4UVzNb FIbbLGQq7zSMn7Xiyia+XH0M907H1+P/O5A+6pofZdEFMZ4SYhK+Qo6AfyLBBfTBOtCj YGIbNRmRpUnCdYfgjyz4LVQuMPOqa/jhBeS7cZfxdmNLEibxBzRTtUQ+D5ZlxtL42OIA 9+9AIWnmFC+xD77mlgHwayk35gMXZ930JMlOJW4sFxweN/IL8/72g92tI9UQcAx7SRm1 caUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yhAGoMNTJ78K6NWBaeMCqRMDXJ5FhzjeGArJqWSv4sQ=; b=Ueed3N6z4NIzWE5vZKiUDkPu2WZSh8VzbSR6Xxv7Bjfsuy2DPdRA4t3iCYau24bRyA UZTqNDNbmQIM0GVhH7F/FSKtP4BQPPczJCanBj2Rmy/iTKjUO8GgYaZQxisbrZLXeNq5 inJkF7CdKe6ArAiSsiBGxUALzQKW3WqgIQBWA+vtpzggoQhCKFG7pd5Od5VrMPEN2hqA AsvmfdZWr61VpwyO/U7EtRaQn8v8Qyama1+XFUyvZIRQMjI0Xhs49a/EpczjVAjPaYZB w4GEMKzkVJ/sTUUDSZYonhlD07KAzddn4lEfdP11cpblMc0D8xVcdNlo3fDzGjtgnVKf 6Yrg== X-Gm-Message-State: AKwxytfZqlhj7gX89XTX9mS3VbqlsaHmzGYUQNVtw9Nu6XXk+w86+oQv N+1cWGbYH5WOOWk9PikB+VEDfcjB877/CSHVXfs= X-Received: by 10.107.79.19 with SMTP id d19mr2061064iob.263.1516463984590; Sat, 20 Jan 2018 07:59:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.165.9 with HTTP; Sat, 20 Jan 2018 07:59:43 -0800 (PST) In-Reply-To: <71845801-7edf-9e49-8591-2a4caf11c45b@roeck-us.net> References: <20171228162939.3928-2-paul@crapouillou.net> <20171230135108.6834-1-paul@crapouillou.net> <20171230135108.6834-4-paul@crapouillou.net> <71845801-7edf-9e49-8591-2a4caf11c45b@roeck-us.net> From: PrasannaKumar Muralidharan Date: Sat, 20 Jan 2018 21:29:43 +0530 Message-ID: Subject: Re: [PATCH v2 4/8] watchdog: JZ4740: Drop module remove function To: Guenter Roeck Cc: Paul Cercueil , Ralf Baechle , Rob Herring , Mark Rutland , Wim Van Sebroeck , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-MIPS , open list , linux-watchdog@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guenter, On 20 January 2018 at 21:20, Guenter Roeck wrote: > On 01/19/2018 11:41 PM, PrasannaKumar Muralidharan wrote: >> >> Hi Paul, >> >> On 30 December 2017 at 19:21, Paul Cercueil wrote: >>> >>> When the watchdog was configured for nowayout, and after the >>> userspace watchdog daemon closed the dev node without sending the >>> magic character, unloading this module stopped the watchdog >>> hardware, which was clearly a problem. >>> >>> Besides, unloading the module is not possible when the userspace >>> watchdog daemon is running, so it's safe to assume that we don't >>> need to stop the watchdog hardware in the jz4740_wdt_remove() >>> function. >>> >>> For this reason, the jz4740_wdt_remove() function can then be >>> dropped alltogether. >>> >>> Signed-off-by: Paul Cercueil >>> --- >>> drivers/watchdog/jz4740_wdt.c | 8 -------- >>> 1 file changed, 8 deletions(-) >>> >>> v2: New patch in this series >>> >>> diff --git a/drivers/watchdog/jz4740_wdt.c >>> b/drivers/watchdog/jz4740_wdt.c >>> index fa7f49a3212c..02b9b8e946a2 100644 >>> --- a/drivers/watchdog/jz4740_wdt.c >>> +++ b/drivers/watchdog/jz4740_wdt.c >>> @@ -205,16 +205,8 @@ static int jz4740_wdt_probe(struct platform_device >>> *pdev) >>> return 0; >>> } >>> >>> -static int jz4740_wdt_remove(struct platform_device *pdev) >>> -{ >>> - struct jz4740_wdt_drvdata *drvdata = platform_get_drvdata(pdev); >>> - >>> - return jz4740_wdt_stop(&drvdata->wdt); >>> -} >>> - >>> static struct platform_driver jz4740_wdt_driver = { >>> .probe = jz4740_wdt_probe, >>> - .remove = jz4740_wdt_remove, >>> .driver = { >>> .name = "jz4740-wdt", >>> .of_match_table = of_match_ptr(jz4740_wdt_of_matches), >>> -- >>> 2.11.0 >>> >>> >> >> As ".remove" is removed and wdt is required for restarting the system >> I am thinking that stop callback is also not required. If so does it >> makes sense to remove the stop callback? I can submit a patch for the >> same once this patch series goes in. >> > The remove function was removed because it would otherwise be an empty > function. Since it is optional, it can and should be removed if it does not > do anything. If the stop function is removed, it is no longer possible > to stop the watchdog. Why would this make sense, and why would it make sense > to drop the stop function if there is no remove function ? > > Guenter > I missed the fact that stopping is watchdog is possible. Sorry for the noise. Thanks, PrasannaKumar