From patchwork Fri Oct 4 20:03:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 833326 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50CA61AA787 for ; Fri, 4 Oct 2024 20:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072213; cv=none; b=Li2P+RutARxUr2AvWBghXUesvbFfKWeH48uDiDsvh+T2lUTZFfxda/CUUahfNCm5h6mkFzW0iCcmkphb4HhFXJvNr2x5puyLEXvDnaPUUfhJol5a4HpOiOPJsom6dJM9AQc/ZcPAy0ThhRD0eRKLFCCQGFNw8KeK5yKN5EjSjyo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072213; c=relaxed/simple; bh=IX+b0LghnDfcnrdNO78F3Jdizxh79eWxQpGF0Her+rE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fqKNnEkwahu29feAIVnkU3CqGHcaroFsXYcQvU2w44fSWFyBx/e/SoaRJBNPE73HSzc7qRVB305D4XHIbLjnL2ldbz2lAh96g+CdxKG91PwMHwwox0LfPnjs29weGf//jjEBz29a0EG3pxvAKzEHR+NBu3PB3uo+reReVd2C8Qo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=QteVaGyT; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="QteVaGyT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=37DtN53WqYeQDmLHrgDa9J8oqi3XKqR9P5WZSkrQflo=; b=QteVaG yT13HXwrKOI9EAU7FY5oprSrhuLFp+rQUCrX1V2wwqPwBKPvJpD0uiuIpRfYZcAu 0veU6/4dIHcR/fyUq/wk1mrgPQi+mFBXBhTyNSQX03evc+f5Y93HzAPQttImXKbO 1l/R/KIoE1QM8vxbx6zwdDJwv4v6+PMhLRLZkAYrFQJ8a7vpWZHehjlSGmwC6Zzl HTv5k8ZcE4T32cyX7nlG7vLi7mmhDED7pkEbEyiEKhHdSl3sCpOu4CljxzCRGGGJ w7Mgik3jdaQBPp6TmIWsOx7x9Svy6vw8PVtIrY49E2CYGJFlfh2IUaFMX3d6+EMy M3PPNr13zvjOCKiw== Received: (qmail 3546544 invoked from network); 4 Oct 2024 22:03:29 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:29 +0200 X-UD-Smtp-Session: l3s3148p1@E0wqKqwjXtdQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 1/9] watchdog: always print when registering watchdog fails Date: Fri, 4 Oct 2024 22:03:04 +0200 Message-ID: <20241004200314.5459-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 So far, only 'watchdog_register_device' prints an error if registering the watchdog driver fails. '__watchdog_register_device' doesn't. Refactor the code so that both print out. Drivers can then rely on that and skip their own error messages. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck --- drivers/watchdog/watchdog_core.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c index aff2c3912ead..d46d8c8c01f2 100644 --- a/drivers/watchdog/watchdog_core.c +++ b/drivers/watchdog/watchdog_core.c @@ -237,7 +237,7 @@ void watchdog_set_restart_priority(struct watchdog_device *wdd, int priority) } EXPORT_SYMBOL_GPL(watchdog_set_restart_priority); -static int __watchdog_register_device(struct watchdog_device *wdd) +static int ___watchdog_register_device(struct watchdog_device *wdd) { int ret, id = -1; @@ -337,6 +337,22 @@ static int __watchdog_register_device(struct watchdog_device *wdd) return 0; } +static int __watchdog_register_device(struct watchdog_device *wdd) +{ + const char *dev_str; + int ret; + + ret = ___watchdog_register_device(wdd); + if (ret) { + dev_str = wdd->parent ? dev_name(wdd->parent) : + (const char *)wdd->info->identity; + pr_err("%s: failed to register watchdog device (err = %d)\n", + dev_str, ret); + } + + return ret; +} + /** * watchdog_register_device() - register a watchdog device * @wdd: watchdog device @@ -350,7 +366,6 @@ static int __watchdog_register_device(struct watchdog_device *wdd) int watchdog_register_device(struct watchdog_device *wdd) { - const char *dev_str; int ret = 0; mutex_lock(&wtd_deferred_reg_mutex); @@ -360,13 +375,6 @@ int watchdog_register_device(struct watchdog_device *wdd) watchdog_deferred_registration_add(wdd); mutex_unlock(&wtd_deferred_reg_mutex); - if (ret) { - dev_str = wdd->parent ? dev_name(wdd->parent) : - (const char *)wdd->info->identity; - pr_err("%s: failed to register watchdog device (err = %d)\n", - dev_str, ret); - } - return ret; } EXPORT_SYMBOL_GPL(watchdog_register_device); From patchwork Fri Oct 4 20:03:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 832930 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E5A71C831A for ; Fri, 4 Oct 2024 20:03:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072214; cv=none; b=bsOIExyUveOyQecyGmYwbzPI8oFv3NJDcYvdoOe6A6a7IIOac7KrjRdWtxFoEi2fQOi2q1FT4AWv+UeZNS37BFt9SVxDOdNlDGg83SgpPCgCxEZf4rU4hUCywrvhO0zE1UWbfrDBP66r5+Sq6BcmDl48YuSGdnENDbhSWMSuMV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072214; c=relaxed/simple; bh=CJj1on5dHU/Cnn9BRe9vNc8ialwCOZPXU8zqwRmJgO0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SQdogxjFPvpW40T/VOHBJdkukBslQJmcnHMFdKbecLfP1HyW8/eyVCHj6/u20g7b/6F9Ng4RgnWxeFcbxqCEeEYEMNMRQUib970x4UcVs3j1C5467nprerzNnkYhJ+MQ1gpJYbKDkqth8zRof04xVUasXa9+hwvvUcgLMFzQctU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=XTrM7T73; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="XTrM7T73" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=m+CVovgccu/Vsyu6hyJJY2uIKsvQGgdbownhHRDgcTE=; b=XTrM7T 736PodLQzA2Yctw0L3S+GRARFpZlBxRX7pZAkUMyl9vifvIe5CprqP2As4CsqPrQ Fe983Zq6EKIhwqs2thph7Ek2sXFshnHEiKPdGoSc3XUgtsuEuSgn7lu6045yTdnk oCsQeKPMRn9N7b1gt3MMekCuxIrF6BboM7d9zFxrB0h7+vVUTlVsjzGsHgE7+p23 GLsmNNiE8N0JES613lcQgRX5KJacjH9lHJaf1zyoG2uOPqC7tT2Vn61IeYIFZ6Oh 3Ile76zG1OB7eeFZ+sluU9Pl3m/r4oBhIqYMlSwhldmP0IeKZuLWYsg5zNNV7/fd skq7q+gJHvuwfgew== Received: (qmail 3546579 invoked from network); 4 Oct 2024 22:03:30 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:30 +0200 X-UD-Smtp-Session: l3s3148p1@whM3KqwjaNdQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Support Opensource , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 2/9] watchdog: da9055_wdt: don't print out if registering watchdog fails Date: Fri, 4 Oct 2024 22:03:05 +0200 Message-ID: <20241004200314.5459-3-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core will do this already. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck --- drivers/watchdog/da9055_wdt.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/watchdog/da9055_wdt.c b/drivers/watchdog/da9055_wdt.c index 389a4bdd208c..9d5a2009466f 100644 --- a/drivers/watchdog/da9055_wdt.c +++ b/drivers/watchdog/da9055_wdt.c @@ -146,12 +146,7 @@ static int da9055_wdt_probe(struct platform_device *pdev) return ret; } - ret = devm_watchdog_register_device(dev, &driver_data->wdt); - if (ret != 0) - dev_err(da9055->dev, "watchdog_register_device() failed: %d\n", - ret); - - return ret; + return devm_watchdog_register_device(dev, &driver_data->wdt); } static struct platform_driver da9055_wdt_driver = { From patchwork Fri Oct 4 20:03:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 833325 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 933231ADFED for ; Fri, 4 Oct 2024 20:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072221; cv=none; b=TEPG6Sq5kBe5fHubVv2HJk2+5c4faVldZSiGe1Hc0DTiBNsJPLuhAZ2DUUOSrHPmkSPdqXPKyPSe9b4OYc3uY4AYexRN+yy7DXH4vL5UWaRyIxo+6KxXs2zb69gGgEBJ5xq+P5rW2jTeAI6G01bYvLt542Y6iZKsb1bsRQwYCpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072221; c=relaxed/simple; bh=1VbOuVrBLoDitWvbPcMb+uJr0WI3nfXPQ8KbpuuU8GQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UvY/yQ3pms1OBWXR9LjbWLHWmx1/cVqsG8rsiok+ldr9ozKr/anA4dn4LSStEweMHIuo2hKtiRiLRqZ7NY5MjzJw/5ck/EaP2GWHv8gvD6yVhCw5Okx2OaYVMJA4wct5UFEM/z0y59BfwgrCZXqB6qWcUi618y39Oxw9qVlJqpM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=YGjug7l9; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="YGjug7l9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=DSs5rskZIk4QJWwLq5RQTfcN84JZcFb1gGId9SdmcMg=; b=YGjug7 l9Mss9duq+4o6Z6bbPletEFvt0VtXqpssggQ8/82wTEFCHSyVmvVU4wTrMJCaEE8 du/MwAcsz3x2EpA8GasGqUW3x4Hn2AsFLp90HtZcJJOFg40/0XpFxO7g06Cc5NfE n2BWwyGUEiLoGZxBo/JY5wumz9A+K6FhX3/ifX54s9noiy//Lrza9qA1MhG+yVdN sPQJxbp2RkCzFSFhm/KuUdZK9MBu3dAMFoI2Hl7alPiBeqQGOfHjei9YYulMR+gx tooRJZgmrt0WG4hCrKFWm5JGfPuFHi4ITBn+56ULkWF66upt8Xgwp6yu6K4Di85V 0Bd+Pf2JvKnXHGzg== Received: (qmail 3546629 invoked from network); 4 Oct 2024 22:03:37 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:37 +0200 X-UD-Smtp-Session: l3s3148p1@uT6gKqwjRpdQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Jean-Marie Verdun , Nick Hawkins , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 3/9] watchdog: hpe-wdt: don't print out if registering watchdog fails Date: Fri, 4 Oct 2024 22:03:06 +0200 Message-ID: <20241004200314.5459-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core will do this already. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck --- drivers/watchdog/gxp-wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/gxp-wdt.c b/drivers/watchdog/gxp-wdt.c index 2fd85be88278..f2c236160266 100644 --- a/drivers/watchdog/gxp-wdt.c +++ b/drivers/watchdog/gxp-wdt.c @@ -151,10 +151,8 @@ static int gxp_wdt_probe(struct platform_device *pdev) watchdog_stop_on_reboot(&drvdata->wdd); err = devm_watchdog_register_device(dev, &drvdata->wdd); - if (err) { - dev_err(dev, "Failed to register watchdog device"); + if (err) return err; - } dev_info(dev, "HPE GXP watchdog timer"); From patchwork Fri Oct 4 20:03:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 832929 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CFF71DDA3F for ; Fri, 4 Oct 2024 20:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072227; cv=none; b=EGs+HgBrpa4SdJIkoDggOhsD9jpCGZ+8G3Tj1FvnJWPlS3LiOjKqHcqHYYL+nLwVTyDBO8/B4cwUiZNUGFqMlRUpdYATRsTAOucTLFNKlv+UhcH5XfSYmUbkU3ih+aWxuyBTiuLeeZrbP/SUttyZyg++Wq1N8kuSSc+/6+E9hSw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072227; c=relaxed/simple; bh=pUWXX1eEh0bHkVgo5GPCA8FvemlxuFmoYSsmgQaoquk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tV6xhhtGIMfpCoyc3mKHOTV82iQQYGNI61xlnMRMIJeDSnssfDwUckjl7NWECu5TJGeiCggkzJiMp3aMtnPau3InXlQgyWblMiAjoViIp2kEg0xoKj2gUWHXv3RKTmfTOgq7kOiLYR8RFuWIImb5zt8KxmedCRjx4IvsdfMtPE0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=lQw4bbhc; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="lQw4bbhc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=8Cg6dqgREWhM8nhZTwIK4zog/oTVaoavkF88FB1RjZw=; b=lQw4bb hcRLZWFApxlVL7SZMBQ9eeIPN2MjGNd+YwwU6oyket8szWDTHeWP27qfc1tcjjKc gTo+3mpb7bwdjqcS+F/rYJHhh94Ck7p9UEMmZI/lLGMKDOOREEn6bkMWrTRKBO1b OcIR6O90p8/C80dC8w9OHYOBz2PgZYz/YpDh7FPBRPC8aJ4LCzQ3QMgil5WApaeZ 4COrNJWqO8vf0nOV0hk2qXAwvRDIeZa9McMJnRb2zt4YVX23KZ2dwPGRTt+RjOfb /TZrNHFGIzfas4+ma7GT/sBrlJgdj4w2hqzKye17gD+jYiQ/biraveMUnrzTTuSo 4tHeLcHdnxi9WtHA== Received: (qmail 3546673 invoked from network); 4 Oct 2024 22:03:43 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:43 +0200 X-UD-Smtp-Session: l3s3148p1@yS0FK6wjMupQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 4/9] watchdog: iTCO_wdt: don't print out if registering watchdog fails Date: Fri, 4 Oct 2024 22:03:07 +0200 Message-ID: <20241004200314.5459-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core will do this already. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck --- drivers/watchdog/iTCO_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index 35b358bcf94c..0d3c09a82f4f 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c @@ -592,10 +592,8 @@ static int iTCO_wdt_probe(struct platform_device *pdev) watchdog_stop_on_reboot(&p->wddev); watchdog_stop_on_unregister(&p->wddev); ret = devm_watchdog_register_device(dev, &p->wddev); - if (ret != 0) { - dev_err(dev, "cannot register watchdog device (err=%d)\n", ret); + if (ret != 0) return ret; - } dev_info(dev, "initialized. heartbeat=%d sec (nowayout=%d)\n", heartbeat, nowayout); From patchwork Fri Oct 4 20:03:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 833324 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8146D1ADFEA for ; Fri, 4 Oct 2024 20:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072228; cv=none; b=Z7+wFGLM48bryl4kSYid95flKjQr8oqjw8bxMCzsYN1aO94AoNEek6rUKOnsui1PeMjrdsfRPamDJZWANlhc6hwE4odgHFTIH64V2efsLjGIWbkWdHLS3/8Zn0TY2JyLoAzrRn+Ej1l/dIivEnaEqxZ+NqHovOBtNIq9+Jr4ZyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072228; c=relaxed/simple; bh=m3VCMQ/U1FEvwdKAaBIXtcP4IcR4tq5vJkX2/sMfcD4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nOuy9eH30ALEN8qG78D1+oS4fAbbGDvHjqr0VCCmmM048R5M+7xrfn5JilhRrqZsO+3hBWZmVii2DeAouGag4y7FU0/KQjDQJBrRq5GBdDSZBrt8s2v+o1ZC0tiXDz/1i+KdtBrML0OshkhPMqOuI6a2GUxkspM1ObJ80N4ntos= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=QGpIqVNr; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="QGpIqVNr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=pTdZzF/9LfC8RZByD3JQpP/YAG+/UGBGUduKxb+sEnQ=; b=QGpIqV NrnJUE7foMNfFuoxZJl1xMG1aJVRVLm0tcQmhFU4JqBNxVUDo6aKWgftv4TftcLS o0MvmRLbr6wV3pJeu78DsNvv1DBXWDuH1YDuDtKYTH5Zu/VLy8KDhzdCWNQ2h3xw YOos6f2+4py/41rZtEEmgNtYzBn109KHrfiYKKYvUrqkPdPSIR+U2gBcaLUrZWt4 HgblNACc782Hsqkb/u5rCaEReGzgGpqa+7FgGxfMR34JC0HBd3mzpcCHNe0iFEFW S8ZXi/pkcJx0MZ5o18T1+c5AKkHMvlW2XoApwd/1rNq3+lLQ7cslav/vk5qOlUIG mZXN4oNEbEPadmXw== Received: (qmail 3546701 invoked from network); 4 Oct 2024 22:03:44 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:44 +0200 X-UD-Smtp-Session: l3s3148p1@GuUPK6wjNOpQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 5/9] watchdog: it87_wdt: don't print out if registering watchdog fails Date: Fri, 4 Oct 2024 22:03:08 +0200 Message-ID: <20241004200314.5459-6-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core will do this already. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck --- drivers/watchdog/it87_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c index 3e8c15138edd..676cd134e677 100644 --- a/drivers/watchdog/it87_wdt.c +++ b/drivers/watchdog/it87_wdt.c @@ -349,10 +349,8 @@ static int __init it87_wdt_init(void) watchdog_stop_on_reboot(&wdt_dev); rc = watchdog_register_device(&wdt_dev); - if (rc) { - pr_err("Cannot register watchdog device (err=%d)\n", rc); + if (rc) return rc; - } pr_info("Chip IT%04x revision %d initialized. timeout=%d sec (nowayout=%d testmode=%d)\n", chip_type, chip_rev, timeout, nowayout, testmode); From patchwork Fri Oct 4 20:03:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 832928 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6EDE1ADFF4 for ; Fri, 4 Oct 2024 20:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072228; cv=none; b=iaTXNgygxXpIffhQ2NMFHVqR9ecyHq2lLYdNKHsXgcN3hDqXKylhlGj0xRYGiNdvm2Iu630zfqbZHKXv0uJoE2XeKI2A4Lj7HCJ2tXyYm3XSdwfvEcRn9H4pCbK5yxwqRvC3ednuu4/MNmCdCT2OMB8bizx6EJP03P3qOlv1D6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072228; c=relaxed/simple; bh=pC6VSE7Ezqb4qpzLlYhltXzbrzqA4rvvcj8dFsvAcvE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HXKpXa3y+K1OJFvzeedAsI4ahEZLay3dAioZ2RCv8QnBHv0izoUFVReR7TCoSAhrbOHAiAtg3bXTjyQz4fCg+P/O5Bp9wfaN6sieRmb9HJuK7M8Jk9kSU6ElfvXuNuI2HzckF626POqgXwhKjw1qD+djItpTYwSqv9RaxgknI5U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=PfIfqBEd; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="PfIfqBEd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=7Cl0ml2N+Rtmf0IfKup4DEXUq9XLNUQAyEK4zAJaKug=; b=PfIfqB EdnBsELoUU4LJrkXuBH6yqAHtAbbfjGnnCnZakZmhmUFv8aWS0tJ/fAZ7z5V+IVq /ywwZnz/9KWv3+v9+Yb5ENFfq7BZ0AzxBB0Jz1LFmJbT8wi33wImSFayeCr0pOdt lGkSPd1boamjLEcFh8u/q085aS2WmpZssuSiX06NzHPgbcji5j50xkxG6BnYmFWY tn/3vPzJt9xEBvOkPk36bqajVOHSvaYHuW4pM59DszgYNuirt0yQ0EhJH1R5NiG7 oEesMPVccMaIi58X7Tt/I+g2dEBqOFU7UGeTVDcm3I0pqogCYIATlSxoA7+hMB+G /9Aik9Y8Nj5wu/xw== Received: (qmail 3546729 invoked from network); 4 Oct 2024 22:03:45 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:45 +0200 X-UD-Smtp-Session: l3s3148p1@+u8aK6wjPupQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 6/9] watchdog: octeon-wdt: don't print out if registering watchdog fails Date: Fri, 4 Oct 2024 22:03:09 +0200 Message-ID: <20241004200314.5459-7-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core will do this already. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck --- drivers/watchdog/octeon-wdt-main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/octeon-wdt-main.c b/drivers/watchdog/octeon-wdt-main.c index 52d49e4e35a0..0615bb816082 100644 --- a/drivers/watchdog/octeon-wdt-main.c +++ b/drivers/watchdog/octeon-wdt-main.c @@ -559,10 +559,8 @@ static int __init octeon_wdt_init(void) watchdog_set_nowayout(&octeon_wdt, nowayout); ret = watchdog_register_device(&octeon_wdt); - if (ret) { - pr_err("watchdog_register_device() failed: %d\n", ret); + if (ret) return ret; - } if (disable) { pr_notice("disabled\n"); From patchwork Fri Oct 4 20:03:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 833323 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC0B21DDA3D for ; Fri, 4 Oct 2024 20:03:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072229; cv=none; b=frl7kMC9cZajpHNZoKoHZxeX7u1x7XQ6pAp2Ng11RJpeGG5SX7MjZc/8oBlti5NiIdEJFAtJpQ34GzcsX88S7TJuj2oQrEVAKZ7vYrdHKkZVfGT6nn3BWAcjf2B0gHQ3sk4MQuBE6kboyr3EMKEYnnEq+NZV81u90tvRsrpNySk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072229; c=relaxed/simple; bh=GGpzR4li786PN5PUE3f4cZLEni1LVNkbHAKggrlJcDg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BJGVSosDAWi+mrry7gygSi3Gh8Z+V5Vg52HHkFf38r7p+dU7EOOK2vgxlR4iPo46rxfS3B/Oq8xKNtX8Mikqzxqw0e3uuhMLFycEWZbosxNNDR81mBnsTfAp10GnxXOGmVOkgvoh3j4YjWk/qfzBuetZamrCHjUxPYSUzZG9uSA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=WiCHI4k2; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="WiCHI4k2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=pdDyDAZIh0KmjP6JAW4l4+Vl1dTUdRC71wOIAK0OA3Q=; b=WiCHI4 k21NLRaEIjgPWrNJB9hMmXVqYlzcdVJehG75RpSPFXTQGOvUVkan7dorV1emLBg1 u2UYQLzarxmD9sInwAAgLg2DDOier7p2iCcDJmoHVLsEwYzi3JKSk5+5BRZEPHjS euf2hbhOTmT5txeArXgjQ/BDQqvz0krIZcwmMKOEk7CYlk7XMxKTgAM7vIR0Ia+C 3wohO6T8vSdlOTvZFwaItHwhfOFXsGjzJ3yFA2+oQnrrofEDKOqLFuQe6++UQvSL gTvMI/RYtVbbkCp9gsw40Nfr9Qlsp8qGAollkes6sXhMZIKtEUQvZlySvkWY6gPM uWMVTplS8xKknx9Q== Received: (qmail 3546758 invoked from network); 4 Oct 2024 22:03:45 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:45 +0200 X-UD-Smtp-Session: l3s3148p1@QognK6wjQOpQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 7/9] watchdog: rti_wdt: don't print out if registering watchdog fails Date: Fri, 4 Oct 2024 22:03:10 +0200 Message-ID: <20241004200314.5459-8-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core will do this already. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck --- drivers/watchdog/rti_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c index 4895a69015a8..e319fa0787c2 100644 --- a/drivers/watchdog/rti_wdt.c +++ b/drivers/watchdog/rti_wdt.c @@ -336,10 +336,8 @@ static int rti_wdt_probe(struct platform_device *pdev) watchdog_init_timeout(wdd, heartbeat, dev); ret = watchdog_register_device(wdd); - if (ret) { - dev_err(dev, "cannot register watchdog device\n"); + if (ret) goto err_iomap; - } if (last_ping) watchdog_set_last_hw_keepalive(wdd, last_ping); From patchwork Fri Oct 4 20:03:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 832927 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F03C1ADFFC for ; Fri, 4 Oct 2024 20:03:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072232; cv=none; b=o0xI2K28XTG5E4HBsGm/9MFM4ve8ev0GHYFzDdTvJ5qhDp1k9JyXsOc1aswalc8GN5LDm4nGu2IlnkvgwiH7GhysRmuRKDquRr7E9bUevfTGKBhxQu3kolOlGjILJmxHYpzufdp380MEgoR4GfGdn3vowzwv619+fYH562khQpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072232; c=relaxed/simple; bh=EFA5+oAfC+tqWx38wFdpazJlQnk6Rv76vo7d5ybV6uk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UXmUg+E28RHZUuELvvc0Pv1zcknuGuWJFCS9PMK/NjaM+maiO+DbDT7CVEsII7AJUFFsY8a/hkHDflA00/YKBHCBh2HXxRJkgjUJi4R8Ruy3ZxR0tXYMufKsgkHL+MvlkAvl2frfAtHv0C+Fv8+AB1c5XSx7UUdz8LFOROPCnUE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=YOLn79vd; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="YOLn79vd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=VxebXy5udt+8omjEbWXj5+9gbyAVtVMHmk7sk/VpKcA=; b=YOLn79 vdVAbzd1wWOHeESU2jJB44uz7RmBpW+5UExvyfQ6pKhqJMo4f3VvjKMazKuPGy64 Lj4EQnTKQVpyb+BYYAD7C9k4u27icnBSrt8jOeKX875uLuVkolgI0c7CvdmYA9xH mrY99dF0RURyLk8i94EbEWa9PGCqnNd2H1o6DHbrEz42QiF5YWtSZxwhNUYbT2U7 J7nKvssLjHiasqO82TvMGXfD9SDoDIGSi0PmfDuaOM6VxL7bK9PBApa5eVbqk1py oiHEml83ONZfhMEA8PdBQKmSyxgTGof5Q/+CIexXFBLQ/kbn8ivVDHvf9VJ92wfK W9AxpJV7AT+ig+iA== Received: (qmail 3546790 invoked from network); 4 Oct 2024 22:03:48 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:48 +0200 X-UD-Smtp-Session: l3s3148p1@JqI4K6wjTupQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 8/9] watchdog: rza_wdt: don't print out if registering watchdog fails Date: Fri, 4 Oct 2024 22:03:11 +0200 Message-ID: <20241004200314.5459-9-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core will do this already. Signed-off-by: Wolfram Sang --- drivers/watchdog/rza_wdt.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/watchdog/rza_wdt.c b/drivers/watchdog/rza_wdt.c index cb4901b3f777..9334255a37e9 100644 --- a/drivers/watchdog/rza_wdt.c +++ b/drivers/watchdog/rza_wdt.c @@ -169,7 +169,6 @@ static int rza_wdt_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct rza_wdt *priv; unsigned long rate; - int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -218,11 +217,7 @@ static int rza_wdt_probe(struct platform_device *pdev) watchdog_init_timeout(&priv->wdev, 0, dev); watchdog_set_drvdata(&priv->wdev, priv); - ret = devm_watchdog_register_device(dev, &priv->wdev); - if (ret) - dev_err(dev, "Cannot register watchdog device\n"); - - return ret; + return devm_watchdog_register_device(dev, &priv->wdev); } static const struct of_device_id rza_wdt_of_match[] = { From patchwork Fri Oct 4 20:03:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 833322 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B62521ADFEA for ; Fri, 4 Oct 2024 20:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072232; cv=none; b=sef5mAyAt/w1aafMYpSF+VjKAMZN2qx+GA+AUkIyhqO21mZyLXcK6dKNqeFnXf+w0YE4inQKEGYP/Q1HOu4ykw2N2yLrRko+ACs6z53Y24gZLZmsxD2svhEwHtFInIkM37Zc6sXu2fL/YqT2Swr0r9Q9NrabvWV3btaVdkKN8nI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728072232; c=relaxed/simple; bh=rBInPXtWuBQ4AHJslC/F5W48iy0TYapD5Aj5IwigVo0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pJlnO4Ra+Bwx46BxT5dM06F6ogWFIE67VQg/uT2zyjs+/IaBpMOb5ipY6NnTwnTPynYEf/PC3sN8YwGgJ9SAVV6V6Xlum1xsAVw9yUN/U3PWBK+npzJISNLGVGKms8hAXtRlyGCJmz5XUz0mtS2AkwELb39QunoMlcI7OwDaA1Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=mRuBhjsk; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="mRuBhjsk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=gTxP5fWPGq6PqfmNQsPw7YozPJO1aVYpT4zwqO+84K4=; b=mRuBhj sk4CTLHe+qUJq457SXyBHND68GHvwwb0UfH7tEH9Masekr4ldx5MC0+dQGMevPJu 2bR3w/DCfvnx50EU14iOd13jAOYHsHEMOAkxYzdxNyJDhlBnpfbfanVdjjJCGBU3 srQNsBFH4ielPaiehHBWdJxI3XV5CqASNLYtvtLbHf2wvNS616/5BZdRu/zvzTi8 RTqP1Am6CqBCjqUxcHjoxvAbCmV1shs2QzfmPvtYlXBC2MTeY3bBtihQ0wlqhIQS oXUQbbQpCrJKEsgAwgDaxqH5+AaHJub/ajKVH6pDq0FuL3WSfQWm48N9LI1E1lSL ZFzigz7HZeBO2ppQ== Received: (qmail 3546819 invoked from network); 4 Oct 2024 22:03:49 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Oct 2024 22:03:49 +0200 X-UD-Smtp-Session: l3s3148p1@TkpYK6wjWOpQvCeD From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Michael Walle , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [RFC PATCH 9/9] watchdog: sl28cpld_wdt: don't print out if registering watchdog fails Date: Fri, 4 Oct 2024 22:03:12 +0200 Message-ID: <20241004200314.5459-10-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> References: <20241004200314.5459-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The core will do this already. Signed-off-by: Wolfram Sang Reviewed-by: Michael Walle --- drivers/watchdog/sl28cpld_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/sl28cpld_wdt.c b/drivers/watchdog/sl28cpld_wdt.c index 9ce456f09f73..8630c29818f2 100644 --- a/drivers/watchdog/sl28cpld_wdt.c +++ b/drivers/watchdog/sl28cpld_wdt.c @@ -198,10 +198,8 @@ static int sl28cpld_wdt_probe(struct platform_device *pdev) } ret = devm_watchdog_register_device(&pdev->dev, wdd); - if (ret < 0) { - dev_err(&pdev->dev, "failed to register watchdog device\n"); + if (ret < 0) return ret; - } dev_info(&pdev->dev, "initial timeout %d sec%s\n", wdd->timeout, nowayout ? ", nowayout" : "");