Received: by 10.223.176.46 with SMTP id f43csp950738wra; Sat, 20 Jan 2018 07:52:53 -0800 (PST) X-Google-Smtp-Source: AH8x224iDXFOmRxWsthn3v1jkKtKUp39z/RM9rpNYEeWsQXN5bVyQzdQCXzGu5DVj+K2E30JhgHp X-Received: by 10.98.68.91 with SMTP id r88mr2834498pfa.52.1516463573180; Sat, 20 Jan 2018 07:52:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516463573; cv=none; d=google.com; s=arc-20160816; b=F6AvVSulgqt6lF+hRW8pVeipCRcNMwbk6enPDfbXC+zt3XQHrJNjbRaAaTMqHCQ0r+ bG/IKqPxBTlVkQN6AH7qs6q9PJONLlQ1EcixAv4KuQ+MJEn94snMRwWp465DyB5Rtwne +x/XQNHAuKT1bG5cix8OhB75Tf0BpzgsP9zi8uWJH18iGtMsQYreWq4sheMLlyNGNoJ/ stJga6H5kllOIA8fXXUzmAaG9a6JMaDL9M/KCIUOtjyXhW0xLgdqdFbdyyQTj6DZGmuu y85pVmHqZx5pi0ejQ/HgysslnJF1mXbTgFET/3oghCcmFuw8a5VVVm+4OD8Q/ZSeRYnM c2OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=/a2ZpdEwhBQiWQPo0dyRRux/M+g+ubK4t/gvWq+qUxg=; b=CO7pX4RCT/dwl0m86DOPRVU5sOHbHFLWj+Gw3bsr33S90yqb+IYdR5bCijJykGuvka vXXnVKUBX5gADHON4rPoXQqP7ZrBI0uYeIRID2PdEbRt3vW1dYCSDNPNu6y5zyhhIv2J /h32yMAXstSM3C3xSbMLGqq6sKcsDTVPTn2BvWfpPcdkQi/lQltvD76esTSrLQl9iOfn ecWgLigAaXjTGkzdS7RSfUpCYF55Nk6K9g83W4P7U5IgD/6O8MJFQx2sq/6rg/d63/il vnVO5gMuW9CeO/HmX+FCnFOJ/YJ79VUDHAAxPbXUxBiT2UmFaJICbvXwdeDTwtvheJEt z+Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Ik3LXIYj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3-v6si1801191plp.487.2018.01.20.07.52.38; Sat, 20 Jan 2018 07:52:53 -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=fail header.i=@gmail.com header.s=20161025 header.b=Ik3LXIYj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756420AbeATPu5 (ORCPT + 99 others); Sat, 20 Jan 2018 10:50:57 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:47008 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754301AbeATPuv (ORCPT ); Sat, 20 Jan 2018 10:50:51 -0500 Received: by mail-pf0-f193.google.com with SMTP id y5so3683165pff.13; Sat, 20 Jan 2018 07:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/a2ZpdEwhBQiWQPo0dyRRux/M+g+ubK4t/gvWq+qUxg=; b=Ik3LXIYj4oxJ/6JzbU+hpasapHY21Zr9DB7TJHhhHBYic5xEEW0euMCjsECUNOvoTZ 5ZuoyiRGwHXH1DxmpArEbIko/87mPSK4YSFr+/E1469nkkTXa7Y7wIUqP9HimwNPa6dg 9c9JgIpegtX2v8iVC6nNv6t+pOaG63EvdiJmK0+tbl66aCFy1KPz5wcdNLVs644L62NY FwJA6NSFTk+eTqDfH21O7fh131EhPnKqpn4x5RDFr+AtG25mazkSBmK/RXP542916DAw e7tgr8FuNbk0P/aUje0OzqT6iPGDhWHDsJCgQv/sfllH4wzA+JSiWbwnjzNFdXKkHH06 WpRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/a2ZpdEwhBQiWQPo0dyRRux/M+g+ubK4t/gvWq+qUxg=; b=Wwxrtp6oNrXjJfkAb5v0SOV9ylnpQ2qcE/miEaj8HD1r1V/mMgobmhULnt1BvV9QQf WhP5r7pN4WHm5ypOE7x0CK67+LCwRUHKB60YMe5nmOngd9Avi2EqQuWqtL9Dgcp8l+yi s86uF26eD+LFxXbfAbJ2RqMp2gKELbj69Ke6MBP9BGXlzNhq7UMIB/XOwQgboHEXSRa2 /H+55zc7NSLqhbiBnAZcTK36Gjqi4NtrcLFr4fgaVtnwIxoOKwdFjCIuk6UIWYhnsQXc i9T6vt5+uhLjHrJQRAEhNsaUxMDappP4Arakk/i0/jLULLZzDmL2hKASRqBulleKPDFV O7Dg== X-Gm-Message-State: AKwxyte7rLsnShW4AKucUF8bfCpqd3NtBJzEOwwOXx7DgHeMLh4jAxJD kb2n1nPMX+pK0pHABGCRyBClrg== X-Received: by 10.99.62.10 with SMTP id l10mr2305838pga.288.1516463450570; Sat, 20 Jan 2018 07:50:50 -0800 (PST) Received: from server.roeck-us.net (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id 14sm19907592pga.12.2018.01.20.07.50.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Jan 2018 07:50:50 -0800 (PST) Subject: Re: [PATCH v2 4/8] watchdog: JZ4740: Drop module remove function To: PrasannaKumar Muralidharan , Paul Cercueil Cc: 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 References: <20171228162939.3928-2-paul@crapouillou.net> <20171230135108.6834-1-paul@crapouillou.net> <20171230135108.6834-4-paul@crapouillou.net> From: Guenter Roeck Message-ID: <71845801-7edf-9e49-8591-2a4caf11c45b@roeck-us.net> Date: Sat, 20 Jan 2018 07:50:47 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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