Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5016140yba; Wed, 10 Apr 2019 09:31:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/nQw06QOd+k2k3I749zV6OE5dEgLto57evzb2ixFKT/woNDh7yjnQKBje/pYnBoxNGI+A X-Received: by 2002:a63:e915:: with SMTP id i21mr41711425pgh.297.1554913905369; Wed, 10 Apr 2019 09:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554913905; cv=none; d=google.com; s=arc-20160816; b=rE0b/wTi4FxhAUm3qQ5AnAeCqF9e0Mhtn0T+N8VPSJHbA8ppR7ahQAqiYPLgGQJtAk TWDulPTksTICr2LEv2neJfHe+8gOWA6nEZp+njSVsY+xqZX1CELQhbe1co2vlH2c/U6s Vd5g4MxbRhranGF34HajJbVRxq6xdb9ai7gc8RjEFhWzA/ddC4ynSt63QgwPnYMJ+otw pYe+fkS9Qbb4xfEqeBa0YARcAozBSzgPXFPSPM+nBEyWna3FSoV/Ip37SieMiZ8OpIYs LCfVYW18CsAMLZ7+cazUS6oB27xhVlDPVi9UXK/dyBjbhYmOaowRXsf/2YZJJzwFJEQi taZQ== 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; bh=yiSRJ2dK83GhKQ5xjKODF+hCW8RnfJQXV5mP8PrlrPU=; b=lrdQAF33BpsPk5DGx8CdOupVOviVLm624GQtUVhUIrP9e4cfkPsbuGEYN+fb6DAF50 18reyfOit8znIu33bRUGytHfoKIomXpBtQtR8/rmHHJjcrUJYZlkOX//KFlbzS5pfjOw 83kXDpQiAy+R1AtR2SwxBUXmFIAgRssKQfjmTPeWD4b1s7h9F19K8BnUxyPpnfYFCqDu 9GGTfIrMov+GJ0ORlLU513kt0s3+E/50vRXmCD9XBCJRhfo2NpYJoq6Gfz28LBtWfrRB mg6+967/66SSLlF+Gwac63shHmxEGzIwhhFK7+nWTn3R17Ds1jhk+gxfHMbzMPD38HLd GEhA== ARC-Authentication-Results: i=1; mx.google.com; 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 77si20614862pft.72.2019.04.10.09.31.28; Wed, 10 Apr 2019 09:31:45 -0700 (PDT) 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; 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 S1732571AbfDJOJI (ORCPT + 99 others); Wed, 10 Apr 2019 10:09:08 -0400 Received: from ns.iliad.fr ([212.27.33.1]:58866 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731448AbfDJOJH (ORCPT ); Wed, 10 Apr 2019 10:09:07 -0400 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id CBDCD20777; Wed, 10 Apr 2019 16:09:05 +0200 (CEST) Received: from [192.168.108.8] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id B3061202B9; Wed, 10 Apr 2019 16:09:05 +0200 (CEST) Subject: Re: [PATCH 23/23] watchdog: tangox_wdt: Convert to use device managed functions and other improvements To: Guenter Roeck , Wim Van Sebroeck Cc: LKML , Mans Rullgard , Dmitry Torokhov References: <1554830641-9247-1-git-send-email-linux@roeck-us.net> <1554830641-9247-24-git-send-email-linux@roeck-us.net> <6ebee4d6-c650-c322-a966-4269d54da9be@free.fr> From: Marc Gonzalez Message-ID: <6f8ec860-42ff-d33a-9a58-626d2fa4e7c8@free.fr> Date: Wed, 10 Apr 2019 16:09:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Wed Apr 10 16:09:05 2019 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/04/2019 15:37, Guenter Roeck wrote: > On 4/10/19 6:04 AM, Marc Gonzalez wrote: > >> On 09/04/2019 19:24, Guenter Roeck wrote: >> >>> Use device managed functions to simplify error handling, reduce >>> source code size, improve readability, and reduce the likelihood 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 device >> >> No devm_clk_prepare() in mainline? :-( >> >> https://lore.kernel.org/patchwork/patch/755487/ > > We went through that several times and never succeeded. This was the major > reason why I didn't submit this series earlier since I was hoping for it > to appear at some point. Unfortunately, someone always objected, typically > with comments along the line that it could be misused, or citing individual > examples where the current code in some driver is wrong and should be fixed > instead. > > This isn't really a technical argument: Everything can be misused, and all > code has bugs. Neither is a reason to reject a new useful API. As such, one > has to assume that after refuting such arguments, and even after fixing all > bugs in existing code, the opponents of the new API will come up with other > reasons to reject it. > > At the end, I gave up trying. Feel free to try yourself; I most definitely > won't try it anymore. Using devm_add_action_or_reset() is a bit more clumsy, > but works just as well. Hello Guenter, I am saddened to read about your frustration. I might give it a try, if Dmitry doesn't feel like giving it another shot. Regards.