Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4876481imm; Tue, 7 Aug 2018 08:47:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdlUGbEugrLzbJN+7HtcBnp5xtfFhkkfVy4WBJEw2NDfV3yrEWdbqW/nAHXFuFIynTKim19 X-Received: by 2002:a62:9f85:: with SMTP id v5-v6mr22422569pfk.27.1533656852285; Tue, 07 Aug 2018 08:47:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533656852; cv=none; d=google.com; s=arc-20160816; b=Ov36eP/C0f0ZB9n8ToAXyXgCk7EyxQ/niDceGmjahZV8vvORNImmRfsry2ONvYrySk WSbZ40FfSwIUz91R4SU/DPY32t4FQtpBo5HcICO5guuGt/lj/xlBwfesixt+uW/ktMRL AIvoLNCxXUyOLb+VagrBoGJJLvBfkyarMYBpbNph/HwCInm2KLRpEAkMGH+h/SS36tQo PJ8+ugmcd6fGwiJ/rjPxuf4l19fYw3Z2igTbn156Lc7vX6CZa74J3qNQ0L2PPRPkqfr2 gq64QYbXVlGOSF1r5iD/4hD0XwLrBjZ7R7c4HIZ+LUl0PmfJDwAJSkfvLI0VzK1419Lg l+kQ== 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:arc-authentication-results; bh=qFuhBKNp/FlXGbp1Cna6CHQI4mpeVAjbJ1dA2aWRf9U=; b=bnRUvkYrHKbGvk3yYh9nKVF1Ulxj7hMHYMtzzFulknYbbuggtEDaJy+2oIJPcM4qxG 8oxTdvnzmeHNHEd7GFTSEtVA+zx/qJyHl7MKNqfi8USBVgWDA6vly3G6cHDxAbiha6V/ +C1xwDC9Q2frbUEAnK1fV8B6i7OKRw/Qt+C4X8fGeQYcg7EFufYkDEdcAbkWI8P1Pn+6 /bhYLG0KWv+kiT5Xl7gP4ZgJ71TTfazMq2hSM9qMdZJ6fvGDb+HJhDfD9SqhB6LvVdXy ZRrJE5Ktdmd+GOzBXwZNVY0oEnCWf1CYSVDS6pcYj0LAWfeVWEpm2s50+tB8pAvBECB1 pKVQ== 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 o21-v6si1509191pgk.337.2018.08.07.08.47.16; Tue, 07 Aug 2018 08:47:32 -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 S2403856AbeHGSBW (ORCPT + 99 others); Tue, 7 Aug 2018 14:01:22 -0400 Received: from g2t1383g.austin.hpe.com ([15.233.16.89]:41305 "EHLO g2t1383g.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389066AbeHGSBW (ORCPT ); Tue, 7 Aug 2018 14:01:22 -0400 Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by g2t1383g.austin.hpe.com (Postfix) with ESMTPS id A83AF405; Tue, 7 Aug 2018 15:46:27 +0000 (UTC) Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id F1A6870; Tue, 7 Aug 2018 15:46:26 +0000 (UTC) Received: from anatevka.americas.hpqcorp.net (anatevka.americas.hpqcorp.net [10.34.81.6]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 89FAB4F; Tue, 7 Aug 2018 15:46:26 +0000 (UTC) Date: Tue, 7 Aug 2018 09:46:26 -0600 From: Jerry Hoemann To: Guenter Roeck Cc: wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] watchdog: hpwdt: Initialize pretimeout from module parameter. Message-ID: <20180807154626.GA21979@anatevka.americas.hpqcorp.net> Reply-To: Jerry.Hoemann@hpe.com References: <1533244541-42310-1-git-send-email-jerry.hoemann@hpe.com> <1533244541-42310-2-git-send-email-jerry.hoemann@hpe.com> <1635a9b2-6b2a-fd57-13ea-d99494dbfdec@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1635a9b2-6b2a-fd57-13ea-d99494dbfdec@roeck-us.net> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 04, 2018 at 06:08:17PM -0700, Guenter Roeck wrote: > On 08/02/2018 02:15 PM, Jerry Hoemann wrote: > > When the pretimeout is specified as a module parameter, the > > value should be reflected in hpwdt_dev.pretimeout. The default > > (on) case is correct. But, when disabling pretimeout, the value > > should be set to zero in hpwdt_dev. > > > > Signed-off-by: Jerry Hoemann > > --- > > drivers/watchdog/hpwdt.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c > > index 9dc62a4..369022d 100644 > > --- a/drivers/watchdog/hpwdt.c > > +++ b/drivers/watchdog/hpwdt.c > > @@ -313,6 +313,11 @@ static int hpwdt_init_one(struct pci_dev *dev, > > if (watchdog_init_timeout(&hpwdt_dev, soft_margin, NULL)) > > dev_warn(&dev->dev, "Invalid soft_margin: %d.\n", soft_margin); > > +#ifdef CONFIG_HPWDT_NMI_DECODING > > + if (!pretimeout) > > + hpwdt_dev.pretimeout = 0; > > +#endif > > + > > Seems to me that > hpwdt_dev.pretimeout = pretimeout ? PRETIMEOUT_SEC : 0; > would accomplish the same without ifdef. Also, that would make > the conditional initialization in hpwdt_dev unnecessary, > saving us some more ifdefs. > > Guenter Will do. Thanks. -- ----------------------------------------------------------------------------- Jerry Hoemann Software Engineer Hewlett Packard Enterprise -----------------------------------------------------------------------------