Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5119313yba; Wed, 10 Apr 2019 11:45:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqww8eevBFAC0APvClNcqnfYcpA0GC5Qh/p5pSEMH3OHwLaf5lMGg15IbLa9bKThPbzA7t1/ X-Received: by 2002:a62:3892:: with SMTP id f140mr44788621pfa.128.1554921930821; Wed, 10 Apr 2019 11:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554921930; cv=none; d=google.com; s=arc-20160816; b=QrLuqaSw237BrFsdO7HwXSf6NajS1raF3eDw+Ex8o7dYZVjj6Kog+nPrFDyrWsVLzc XxVpwPh0gKFylCJUalgixrUsE1EqhfZFqxqc1qcjyZ6YHsA+JFUjC0WqbwRUnkje17Gq 0NvlJxD7sg2/46+VWd5z5C3AC2tfQ/OsXapUP+s0x+rxQlSjzoefDonzYG2sD76M2bR8 0Mn+N6LR0C6KzBahSZCthBk3ZsCaQQEAe3ZC2XtO3YADzJifOGdSHz8Kx/4ewOThZ5WN 6dUEnP7Rq8tyxEoLSGjGv/RUHabAI6EMy7duGhUP4TIHWMixcR6feImrLwzW447PT/2A +nfw== 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=SCRoPbtosM1WAc1OWsOBc3b3uYjt4rYcPlO+7y22AmU=; b=l6ZnhcTvktUSxO2kJkEaLzX7R0waSWgrHxzCntDF64eU5Ier+BKe5//Y2lNp9xZ6gc jyBDifSJN5/GAZbpFZULZaGWkv3iUQuD8quMHM9PGQdYSXniLNH6GU2HRKQH7cV8zM1x FepG9utrq00zRuWz1OJoFBTqbfRRrlh0FgFb6V8hUzdwNLVphr4CTauE4Iw4Y+rw6Ln+ hY9ddlnT5TK1svr8wOHdKopG7J1hnCfmyK/s2Cbwg4BoDozB3i2F8CYpjx1Wq8n3HhMo a61Wo19Px+xktV9gPr2nrL8kq4gfN9VXB4mqUL9giVGZzqe5jW1Yti3hEplbZxMvWyUq ksAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=uc4pt87P; 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 a9si3303566pls.395.2019.04.10.11.45.14; Wed, 10 Apr 2019 11:45:30 -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=uc4pt87P; 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 S1731926AbfDJQ2J (ORCPT + 99 others); Wed, 10 Apr 2019 12:28:09 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42516 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728875AbfDJQ2I (ORCPT ); Wed, 10 Apr 2019 12:28:08 -0400 Received: by mail-pg1-f194.google.com with SMTP id p6so1853676pgh.9; Wed, 10 Apr 2019 09:28:08 -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=SCRoPbtosM1WAc1OWsOBc3b3uYjt4rYcPlO+7y22AmU=; b=uc4pt87PXEuMmA/OkxmrFbXIuhyh4MFCTqT09mqjL67iN6ASZi/OIT7O0BoPNhDD60 9IBBcbrC5iQoeaAqwv/HqiYbrLp6IyX+E73CGZTqHAlRJewxMpes1fkm1uvqDmm0oUcG S9y96LrtJvQ55HgFsu1uI1U/7xEQjEe4sxcgz9PQ5daqwPy81M0TewIseeDhJI7XfmXG leW9ZpPzM7mEo3eMRrqjDSd/C3tKU4zx+12yNF72SB0mrSyIp2NxYiA/N5ww8hTc+G6k ANQasiHnGOtx3tJKomezitXJXog8uGGNSAh2t22Aamka98P+a3vSKRjKeSRlJ+kTyV3N 4XEw== 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=SCRoPbtosM1WAc1OWsOBc3b3uYjt4rYcPlO+7y22AmU=; b=Eu+lciDY2l6vEWsgAFSKIJ+JYlnIm4Undli7cRlWicV6CM4KtP9kS05MGW5S1fOtZ9 elbJqtJBZ4QvfmZtK8RVdCaHOGW79fbz2umUUeikRPlW36++H//Ti0l9bEQNzLbV6uyE dHwCoTpgvqQsr8VX1r1zMw8G+Q85imSml0KbH7O+gNgu2aWcl/5Dwnh160QqsUaPVfRe V4Y+bN7Q3T2NLxGtKrPcRUCU1PmeSjiUQ4Qa2D571wA1hhBOpC12WVTlXlk1JXY3Hkmh keLtfW5nf7EzAPxIq3U2uVTmgeYoCLwXhT+NBfFJkaWjjKV/vnP1wo/lhZ8vDFuNkVPj YyXQ== X-Gm-Message-State: APjAAAXUs9EBRMCsrYPvFjkpcNQ43VVl6t73l646Rltubivt+841RbKh QW9MzHr/Td8KzyFuPkhAfck6t19j X-Received: by 2002:a63:1d4f:: with SMTP id d15mr14944477pgm.347.1554913687994; Wed, 10 Apr 2019 09:28:07 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id q11sm50968208pgs.94.2019.04.10.09.28.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 09:28:07 -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: Expand use of device managed functions (series 3 of 3) Date: Wed, 10 Apr 2019 09:27:41 -0700 Message-Id: <1554913683-25454-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 functions - Replace shutdown function with call to watchdog_stop_on_reboot() - Replace stop on remove with call to watchdog_stop_on_unregister() - 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. All patches were compile tested and manually reviewed. This is the third of three series of similar patches for watchdog drivers. More patches may follow over time.