Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp8310rdb; Mon, 22 Jan 2024 10:09:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGe45XUbxI+BdHiq1VI96zEvJ8Jh/FMpe21W6L03HNWBEnwyw1u0hF7T7A8B1V8fNmtBBL X-Received: by 2002:a05:6402:6c6:b0:55c:537f:d3e6 with SMTP id n6-20020a05640206c600b0055c537fd3e6mr169242edy.40.1705946960226; Mon, 22 Jan 2024 10:09:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705946960; cv=pass; d=google.com; s=arc-20160816; b=kwx9IQnzOKdDwRbZbZ9QQMjjVzjiccGcVi0SXmG+bxSB95z0P3S8OiRDgHo/1uWr5a gxUd2u5XEPIPqfmzmFi/o6VbGVCLSND5S5egMPpXBO9ISrwwtwZ5Rqb6NZtHHlCWFJBe yGuwBkNWcL8Bigd4HIspR3HZAAg7M56jNuw9sDCSXvQG1K+4edGCVLBxoOU5io4NABB5 iL2DWJp0cIGfL857Sg808mWXA63B+cJMIMMNRE4Zi03Y9VW3Bac6KwAW9mam902jBlOl R3LC4mcCy8OG+zU2X2Qt33Ec3KUi2Y3HVuTwIrgUHRdhCNIx6TYPdOEppr0pI7NibeuR KVIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=7yb9FdfO6K0ON4aZtJnJ2ZytMkXhmFGKBCJMdJaPFRo=; fh=9YRL5xFlpLIYS4GdnibQe7V4xmHDcMVVa+vZIO+XVbc=; b=p2myQlWr3rNEb6g0HQwnTJHdNDE3gv8MPBFsadSwtTmrx3zSuOOKMbzezJ6T7GJZ46 jjy6e1DkEHH/xCpFJZ8UnMNizMbQC+Erb3cfAFXjmBB5cL6buaCPuTHAab4XMt8ZPE9J 017vCi5LjNP4HRAl5xCfHm16yRxcbmOFtB3NMUzw08guYb8Jb+YfRLkPtAAsPgZHEiNd xbrTDE2qqrQ9Q0L38j+/uRTeocnT4EfxY+MhLvLX2Y/7WJccepRLsYywrG05rWYhfcdZ scM4I6iIavynqWmQJsJf5H1yLptb6z43TQYaBtp9Wc2N+yV8AonUsrJ2H6JVqEhnB0Tm NolQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="WMMM/Gej"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-33823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33823-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ek16-20020a056402371000b0055817a016f3si11195671edb.19.2024.01.22.10.09.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 10:09:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="WMMM/Gej"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-33823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33823-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 31C4D1F2D913 for ; Mon, 22 Jan 2024 18:08:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 452615647B; Mon, 22 Jan 2024 17:32:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WMMM/Gej" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE51665BA3; Mon, 22 Jan 2024 17:32:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705944724; cv=none; b=BsEWzRktE7prQruUvozpdGpYQv4bE/bkIMam0ggB8Dw74vC2Qu99c5NtyItubygFhA3DvRRarl4a3grTadGyAzEpIK6F8rEHyNLF8/nU+2loBH6cSvYVl0VfSjh9OeblTQ5g1V+hMxjuDHlbwwdY1zSlRMuG8htesONru8upQRA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705944724; c=relaxed/simple; bh=PLLdunxeYvO/kADnB7/MVmlZyft705svQ9X6HGOvVyg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GxW+0DR6hvw1WRus3hmIH/BysVwbDLYPBzKaJRDYHnwFC9pJxV0dJV4SArVQsrX7uomfK/ijcuveL4aaJpqF1WrSTZVOpklcmHSWwyNVIyBoFVnH3T8zoLaYrsQo/Eg9uXjqEU44aWrFyP5ZLcGckS4c6VqBgsuNy4AXmfsBpIo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WMMM/Gej; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d70a986c4aso12284725ad.2; Mon, 22 Jan 2024 09:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705944722; x=1706549522; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=7yb9FdfO6K0ON4aZtJnJ2ZytMkXhmFGKBCJMdJaPFRo=; b=WMMM/GejdB7HfqD8j9tKqtZqXHQQrCTfcVj4yLNsGuBkoUuVX6wYk7BpgBi7KZVkv0 j3jV78UbEfWn1l8jSBUJRUT4KnaPAbNoClEuTdyAkx/IfJD0DOt/MGecziyPvSackW7H kEgNdEKSV/feb9OLSj6hNVLyzrZunIcZ8ZrjQ/A8OeX2O4vh4Iidfg1YmopkW+Os6txZ 2SezNQy0gkJesHuVaP2BbADOO7bRst/vVlOqF8lAfBLXiCMdySvUOqKpmTLr+fi+FuTg HAjZjJEvUn1XZ8pXFWmZr6cG5p8peHiNsRF5R6er8te07ru4xZWFxbmdGsg2IXsZ/dGe UFKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705944722; x=1706549522; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7yb9FdfO6K0ON4aZtJnJ2ZytMkXhmFGKBCJMdJaPFRo=; b=w+MUKwT1JE0ZU6VwfXY+zJhraYt1bmpQq6/X/2O1fC/RBfnVT7wSxJir4mra9YQzKk MEGx81bPEXeNT+KbDx15g5IlRlZcRB1yCMwxJbtv6n9WxenlGAwDlJPLe3w4uj3u2XZg kEXsdHqldZfRbFUmrGDqhl/MutvGK/9eQTkdZwdcuwLUknTOW8SZxIdqf6u6Iy4jL+F/ GLQclGD/CHly33JUZKXOtfLLvBpWyJKZhLIVkHsOorZ2zJDiuIMjb8qwQNe2CG97Ozc9 A90O72Gs9yi0n9caFjtdEKYWA0ZEygdeSw+uWPjlhuB4QNT1zaxFxRjjrq6jGk9q772k ftCw== X-Gm-Message-State: AOJu0YxOyCTJA0Dth6wbdY95OXOEi5iyNiz63J7nc6wSHEZo/55Xgn5Q +e5sO2dPvCJmvMcKSTrOD5UWPe2A3THgDG40aiJcAgeY6R8o4qId X-Received: by 2002:a17:902:da91:b0:1d7:4e2:592b with SMTP id j17-20020a170902da9100b001d704e2592bmr2616895plx.103.1705944722171; Mon, 22 Jan 2024 09:32:02 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id t3-20020a170902a5c300b001d755ec4bc0sm1770461plq.241.2024.01.22.09.32.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 09:32:01 -0800 (PST) Sender: Guenter Roeck Message-ID: Date: Mon, 22 Jan 2024 09:31:59 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 03/10] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Content-Language: en-US To: Claudiu , wim@linux-watchdog.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, Claudiu Beznea References: <20240122111115.2861835-1-claudiu.beznea.uj@bp.renesas.com> <20240122111115.2861835-4-claudiu.beznea.uj@bp.renesas.com> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8NULuLBHiEUQARAQABzTJHdWVudGVyIFJv ZWNrIChMaW51eCBhY2NvdW50KSA8bGludXhAcm9lY2stdXMubmV0PsLBgQQTAQIAKwIbAwYL CQgHAwIGFQgCCQoLBBYCAwECHgECF4ACGQEFAlVcphcFCRm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YMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20240122111115.2861835-4-claudiu.beznea.uj@bp.renesas.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/22/24 03:11, Claudiu wrote: > From: Claudiu Beznea > > pm_runtime_put() may return an error code. Check its return status. > > Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L") > Signed-off-by: Claudiu Beznea > --- > drivers/watchdog/rzg2l_wdt.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c > index 4ab9e7c5e771..0554965027cd 100644 > --- a/drivers/watchdog/rzg2l_wdt.c > +++ b/drivers/watchdog/rzg2l_wdt.c > @@ -144,9 +144,13 @@ static int rzg2l_wdt_start(struct watchdog_device *wdev) > static int rzg2l_wdt_stop(struct watchdog_device *wdev) > { > struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); > + int ret; > > rzg2l_wdt_reset(priv); > - pm_runtime_put(wdev->parent); > + > + ret = pm_runtime_put(wdev->parent); > + if (ret < 0) > + return ret; > > return 0; > } A simple return pm_runtime_put(); might do. However, one question: Given that pm_runtime_put() returns -ENOSYS if CONFIG_PM is disabled, that means the driver will depend on CONFIG_PM=y. Assuming this is intentional, would it make sense to explicitly declare that dependency in Kconfig ? It doesn't seem to make any sense to build the driver if it won't work anyway. Thanks, Guenter