Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3541545yba; Tue, 16 Apr 2019 13:37:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzB+Un7VgO/iUUiW8daT88taL7ZeqBYqgnFQvbuBAFMQfRr9PxiZglyti1/fSwpzEzN9Gxv X-Received: by 2002:a63:c046:: with SMTP id z6mr74106816pgi.81.1555447027856; Tue, 16 Apr 2019 13:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555447027; cv=none; d=google.com; s=arc-20160816; b=GzAJshqMppZFtomtEvo16dzXkBIp2UAZ+ZX3dICcQu7PL3ih6f4TOiZmOL0IX+Osmm 17S6PoMY1Agp2ltpeC9sT8hfMhuzLhBeghw7s+ZpPLafaHAYyMA7TDEDPb1UlyOVRtHu 2wrDMQY+2NgkfUBqOn8ALiDfYjzlhaZ6Td8c057rLwaYK5wOh0tggGICRytv5BMVJyN8 AVp/OOg8aSMw0EjW87y2c5MVQRQzg1cHxNcIKlUGnYNqGMpvJvqyZmCh1lws2N8aKZuY ewq8b6TAic4BqUyyXPHcL2GjqY7Wtoi5EFJBZf3+2onncSqiz0p5bqn5c13AIBY0dMDI Rvvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date; bh=bojvTRLxeWTQWsYFaQhHJzuBQ+JWUT4vGnVnqH9shVQ=; b=REW1V6Uq+ZouMM4LSSF/CuTsgeeV5j8is6R2jUdSJd/QnPQgsVGQaayUf2mj5z5rah UAMTLb3N92uHLrg+xmp3ah3C4xw+n77FiBmwLUhOVQ7dX06112MNzhmMKx1K/plk65nZ NAe8D8rnYdfTZP/tFfrShrXTEtCCznklUwi/vxsWqGbiIlpN4DsnFOZd+oxDDcWFMJZo vS1pc3f21vQHLXe+JUdrC2Gqc2319Qqlc6EmKvm3UMju+FiJfZL3uIyvo1CkGCxVFb+/ OzJRxG1C3oquct7JVILD3rw53cedfDv0W2HU00L+hzgrX3OCyKXZ7i5CArT/GJLDnrmg zKAg== 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 v20si48455929pgn.105.2019.04.16.13.36.51; Tue, 16 Apr 2019 13:37:07 -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 S1729754AbfDPUfC (ORCPT + 99 others); Tue, 16 Apr 2019 16:35:02 -0400 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]:58196 "EHLO mx0a-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728734AbfDPUfC (ORCPT ); Tue, 16 Apr 2019 16:35:02 -0400 Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3GKW67j031087; Tue, 16 Apr 2019 20:34:33 GMT Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0a-002e3701.pphosted.com with ESMTP id 2rwj9629nj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Apr 2019 20:34:33 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id BD21855; Tue, 16 Apr 2019 20:34:32 +0000 (UTC) Received: from anatevka (anatevka.americas.hpqcorp.net [10.34.81.61]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 1D9E64A; Tue, 16 Apr 2019 20:34:31 +0000 (UTC) Date: Tue, 16 Apr 2019 14:34:31 -0600 From: Jerry Hoemann To: Wolfram Sang Cc: linux-watchdog@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Guenter Roeck , Wim Van Sebroeck , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 06/16] watchdog: hpwdt: drop warning after calling watchdog_init_timeout Message-ID: <20190416203431.GA20072@anatevka> Reply-To: Jerry.Hoemann@hpe.com References: <20190416102515.12269-1-wsa+renesas@sang-engineering.com> <20190416102515.12269-7-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190416102515.12269-7-wsa+renesas@sang-engineering.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-16_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904160126 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 16, 2019 at 12:25:05PM +0200, Wolfram Sang wrote: > The core will print out details now. > > Reviewed-by: Guenter Roeck > Signed-off-by: Wolfram Sang > --- > drivers/watchdog/hpwdt.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c > index ef30c7e9728d..db1bf6f546ae 100644 > --- a/drivers/watchdog/hpwdt.c > +++ b/drivers/watchdog/hpwdt.c > @@ -311,8 +311,7 @@ static int hpwdt_init_one(struct pci_dev *dev, > goto error_init_nmi_decoding; > > watchdog_set_nowayout(&hpwdt_dev, nowayout); > - if (watchdog_init_timeout(&hpwdt_dev, soft_margin, NULL)) > - dev_warn(&dev->dev, "Invalid soft_margin: %d.\n", soft_margin); > + watchdog_init_timeout(&hpwdt_dev, soft_margin, NULL); I applied patches 1,2 & 6 in testing. Note, that hpwdt is passing NULL as the third parameter to watchdog_init_timeout(). The second patch in this series is using "dev" as input to dev_err and dev_warn. This results in the following in dmesg when trying to load hpwdt w/ an invalid soft_margin: [ 80.848160] (NULL device *): driver supplied timeout (4294967295) out of range [ 80.855429] (NULL device *): falling back to default timeout (30) if the call in hpwdt driver is changed to: if (watchdog_init_timeout(&hpwdt_dev, soft_margin, &dev->dev)) We see the message like we'd desire: [ 2061.167100] hpwdt 0000:01:00.0: driver supplied timeout (4294967295) out of range [ 2061.174633] hpwdt 0000:01:00.0: falling back to default timeout (30) watchdog_init_timeout() uses dev to "try to get the timeout_sec property" I am not familiar with this part of the core and what effect having the hpwdt driver pass in dev to watchdog_init_timeout would have. (I.e. is the change safe?) Guenter, can you help on this question? Note, hpwdt isn't the only watch dog device that is passing NULL to watchdog_init_timeout. Thanks, Jerry > > if (pretimeout && hpwdt_dev.timeout <= PRETIMEOUT_SEC) { > dev_warn(&dev->dev, "timeout <= pretimeout. Setting pretimeout to zero\n"); > -- > 2.11.0 -- ----------------------------------------------------------------------------- Jerry Hoemann Software Engineer Hewlett Packard Enterprise -----------------------------------------------------------------------------