Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3172601yba; Mon, 8 Apr 2019 12:43:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUUPjLiETNyJ3FF87bjCiHpSO0qOvbzUK2qdeF9y4cYpKLTKW3yoO9Dcd92i/AkektN3Tz X-Received: by 2002:a17:902:3a5:: with SMTP id d34mr32376001pld.174.1554752639296; Mon, 08 Apr 2019 12:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554752639; cv=none; d=google.com; s=arc-20160816; b=HUaDdqbIg3Yz+xLWLPfhmxxRU+IHztv9h8KobYaqRRx+4Ae9JHfyJ8N75dEun0eTVh JH5dg6ramRk6tPSskkQVlw97btoOuNReuR8kC3P56drMMarmQjHw7kaLHkVjHoQGoWUW Qu9t75xl9aSKzKkGSoh3h1CluvfJsbDg3i3oRK2wlM/Rn7vSgzvNZ0eUvReWzq8xbHFR h2ZA18EygDoMjHLaeoSt8En87ivn4PWTQ6Tttq2fzs1UnDdGSpzjxYuZVt9kpBLpHlOl Kevs+bDPbmiS3rrnsf4k90Wa+obcWbXhRDhilEikzdMoxW+zsDmXZUyYAceGM7uuvf4C T/Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=NvIQQiGUUqMq2n4rD+U/QDSFSbC0cU9WmZgqSLRuhSU=; b=ABU5GDFEI4Fk5LLsWRIFV1+bxBNmNBS1YB3DLL/nk9hfKBxudOvt8+kAgZsnUxVrD7 LD3GhRjxS8dM3MAKdpWA6FAg3DtS4uC1IMXw38M0N50pV8zqy4GjxM0WI4VmX9fPX3RF v5vPlIfskI44r0AU9lCOcfI8Ty9Hjh5MJ5rbVo7okwgh3pTIPBs3F6uWHNkgY06W563F x7ebSNdF51seRcnUOWzt3Wby0hEYKDb8crszsM/svEWwfPuC7thti+TNp5Fmb8dGGJVc DdUgxr0Ptx9Sd+opLkow4UJzdClT2D4O0eWjS0SJg03V75RDQkot3AcTJLM3g+rdUWYD huPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=QGodJ5Dp; 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 d3si14607655pgc.472.2019.04.08.12.43.44; Mon, 08 Apr 2019 12:43:59 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=QGodJ5Dp; 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 S1727608AbfDHTji (ORCPT + 99 others); Mon, 8 Apr 2019 15:39:38 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:32961 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbfDHTji (ORCPT ); Mon, 8 Apr 2019 15:39:38 -0400 Received: by mail-pf1-f196.google.com with SMTP id h5so3600718pfo.0; Mon, 08 Apr 2019 12:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=NvIQQiGUUqMq2n4rD+U/QDSFSbC0cU9WmZgqSLRuhSU=; b=QGodJ5DpLvDXR+YRurVP3T5OVo/DZox3K83UfNn9ugcYTvYVnsqlErSnU/6bC05mCB aOZJEzfjk1DWy72KHY3b2OwSKvxVqYsAWKJPIhP7riHqCTo38bTycFnXPBgsjXkzTT8O sn9YVwZFwbqbNiD/FbHPIBu9+0srzqa/PJMb8Gba2DO1eGU2OSzA96DFe8DAgQRbOLYo vJB/UuODg1wqmYskqGTsW6VmcXHKpeLTU72kzsK4Rk44EEGKZer8zB6u0uP5qYO/bDvq Nkw12H12CEaKa1R2pGrHSepd5qC5nHw7ZKtRHkvfjp+TIewgalwShBnAZTmrop3BVwLb au7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=NvIQQiGUUqMq2n4rD+U/QDSFSbC0cU9WmZgqSLRuhSU=; b=kfo1MVg2/VyhJ6phop7vJxBw11xiDRGTQ/JxANTsETe6LLqrnX6kiH1wR9ES8xv1A7 yDk/vtpZfoWDYsEppPgIZaV68kMh6FIFpGrvDguP1WbT3ngSSBRlHig6eL/VRUnY0hYX OLKCsZU4T0H369XA25bRxq/I9q9Llc7VaMJy3zoJtyT5iXjdXduK/jYMu5I5hjYFc10S Vp99PcG+7YRhmnfunLcYE0ENXrlczZkCN9qU1U9tsw8RiAE1gIiBg1EoT4tFudYxzDXv OHDSolYsztfMxtSEEMFAnLF7AUMsb/V4rqwuqbkjkeUbXaGBc2MS0SZ8Sw5/O0lmDkHd K6Jg== X-Gm-Message-State: APjAAAUiPWzzi6Gj2pMhjpxxE5cHOPxhHFL6Uo01jg7NOVi5C3QSyowU 82CP2qRDYB/E56OZeCQvxxzhClMx X-Received: by 2002:a65:51c5:: with SMTP id i5mr29429658pgq.189.1554752377332; Mon, 08 Apr 2019 12:39:37 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id p2sm29184342pfb.80.2019.04.08.12.39.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 12:39:36 -0700 (PDT) From: Guenter Roeck To: Wim Van Sebroeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH 00/22] watchdog: Convert to use device managed functions and other improvements Date: Mon, 8 Apr 2019 12:38:24 -0700 Message-Id: <1554752326-13319-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use device managed functions and other changes to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The changes made in this series can be summarized to - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Use devm_watchdog_register_driver() to register watchdog device - Replace 'of_clk_get(np, 0)' with 'devm_clk_get(dev, NULL)' - Drop assignments to otherwise unused variables - Drop unnecessary braces around conditional return statements - Drop empty remove function - Replace shutdown function with call to watchdog_stop_on_reboot() - Replace 'goto l; ... l: return e;' with 'return e;' - Replace 'ret = e; return ret;' with 'return e;'. - Use local variable 'struct device *dev' consistently - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Drop unnecessary calls to platform_set_drvdata() Conversions were performed automatically with coccinelle using a number of semantic patches. The semantic patches and the scripts used to generate commit logs are available at https://github.com/groeck/coccinelle-patches. This is the first of (at least) three series of similar patches for watchdog drivers.