Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp83592imm; Thu, 2 Aug 2018 14:25:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcAkJN6r6vgWMQOzqxjrxLMhrxvPOMNYv8VMjk8ay9OnHshlzcDto27WXPZH2A1/FxqUIqP X-Received: by 2002:a63:3c0c:: with SMTP id j12-v6mr1014384pga.440.1533245156177; Thu, 02 Aug 2018 14:25:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533245156; cv=none; d=google.com; s=arc-20160816; b=J/vhLAPsY6Oooh7DORO2f8LRik9DI10x6wrHZko2sgthYB3fFRX1dwBbN7nRNh2KBv upU1UifmYOw5Njp7N9JVMRqPblP72C3uScSNgKniB2zi0dp4aK3qguBi5GZS3IW55DXa MOPGS8rEHXMasQTv5zT/royE4nFkev+ISYN05NYAfI05O2VaT0+m51pEiWWdofctTeGd diXUcPTysC9WGX3AUrpf3KePeOySZKjT71k/otGAcSn/IMPpjGpj8CPW0fIp0aVgjpyw eGHlp+x+uoa5Y+Uf2iLXPVb8ZxzM6fxDM4t0k/YZQ0YmBhx2DAQfvfrvOVSfN5emKQ4z z72A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6SnDDsR8N2iVfY7MfD6WmVhObO4gpM/5byNFijd7dj0=; b=UpKACC/grudXsptwilLKjKfwWzf05z7sNfhlL28oxAC4JpKL14Katnza8cxKRAKAeW QdDRVKrak3z1ploQrwwnuxqXtlBkm1dUb+9WcBIXyDsvu18L4As2ECWMVlogfcyrHqU1 ijJHn2LfxHjZe+/CLVJg6BMd2sKx2DoMFXTD70ACGW3jzxVcmwMG4BPa5H1b8YjMWBXM bq3/9diuhBDqubHElJLqhPu1ot/gAit2mLLzy13Gr2dEp9eYS269FT9MBuOB3Y6EAnaC 7LEArtbmGNqaDEmO7RtDc1n8hOnyiCxQJpNUjRT1JSxskfhoalilidTIGNhUEY0z03id Ck4w== 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 d65-v6si2874074pgc.524.2018.08.02.14.25.41; Thu, 02 Aug 2018 14:25:56 -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 S1731689AbeHBXRO (ORCPT + 99 others); Thu, 2 Aug 2018 19:17:14 -0400 Received: from g2t1383g.austin.hpe.com ([15.233.16.89]:30767 "EHLO g2t1383g.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbeHBXRO (ORCPT ); Thu, 2 Aug 2018 19:17:14 -0400 Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by g2t1383g.austin.hpe.com (Postfix) with ESMTPS id 67E831D4F; Thu, 2 Aug 2018 21:24:18 +0000 (UTC) Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id C5677B3; Thu, 2 Aug 2018 21:24:17 +0000 (UTC) Received: from lxbuild.ftc.rdlabs.hpecorp.net (lxbuild.ftc.rdlabs.hpecorp.net [16.78.34.175]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 7DEE737; Thu, 2 Aug 2018 21:24:17 +0000 (UTC) From: Jerry Hoemann To: wim@linux-watchdog.org, linux@roeck-us.net Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Jerry Hoemann Subject: [PATCH 1/4] watchdog: hpwdt: Initialize pretimeout from module parameter. Date: Thu, 2 Aug 2018 15:15:38 -0600 Message-Id: <1533244541-42310-2-git-send-email-jerry.hoemann@hpe.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1533244541-42310-1-git-send-email-jerry.hoemann@hpe.com> References: <1533244541-42310-1-git-send-email-jerry.hoemann@hpe.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 + hpwdt_dev.parent = &dev->dev; retval = watchdog_register_device(&hpwdt_dev); if (retval < 0) { -- 1.8.3.1