From patchwork Sun Feb 11 20:08:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 10211429 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 79E1060467 for ; Sun, 11 Feb 2018 20:10:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67F4228AEA for ; Sun, 11 Feb 2018 20:10:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5992F28AF8; Sun, 11 Feb 2018 20:10:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DAA2228AEA for ; Sun, 11 Feb 2018 20:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=5CR7W3zfR30jl+uMaPHs7HjDR25LM5sa/OIuGBkNPDY=; b=i1cOuFzvsx/+DoPtV4yVmVzRF1 MpdtGY5VqMY1e3sSkg7JGmfxOlxxWRQVH1j2uK/5MeCks8PTLLQ1mVYhYqyryoF8ZXLRULOiih90g 4ylH8cSGzSoXiC4HBD/FpszppBBJwVHYsV5IqPEl7KYlA+C/T9g+4ZXkShhZeVTJu5J1WW1KOAzQJ NruqXwaz+SBJH0T0pP4rlQKloWrAZSearCpY5kPejJRG+W9IEhnLZGCtb/jzJiXzMGcLIvNmwKENc CIKZPJG4vCIuDB2gexJEyy9OLMEJ+61mAAx8eopXyeI6IZKJfxHmRUJ+CT8yfVvmhfM9VDBuUxMoV 6jJYm9kg==; Received: from [198.137.202.133] (helo=bombadil.infradead.org) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ekxwf-0003qZ-PK for patchwork-linux-arm@patchwork.kernel.org; Sun, 11 Feb 2018 20:09:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=5CR7W3zfR30jl+uMaPHs7HjDR25LM5sa/OIuGBkNPDY=; b=FSD R/kWtMl1Se3SLWSlYINVrwRX0OgVa8XeIRBQm+BpLNsOdYkqIGPjKi5LsRFpmGoNGKiOReAcpmD3n XQxALx0+An8imKfqJwf+ZuI3nv/C+piS2jKTfYyp7Wj4KzCL0y3YJTNggyi4y777OtiQlwa0NkbAQ Qy7KJUzY8VWkOTEm9wBR4qgsindmzmLMFgrGnXHVTfLrgj3+DBt0tH4RaVMRER9bnQNRmSTNB7Hay iTr4n3eTJdG0zzXWtl0n7fE9AA+cnhrTYSukLqJ/nepFljIP3ty/V1VXgN6YxErgeSJT62soyoukk gNuE1QVnMsC3pW0oK+vD2woin/4vM/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ekxwL-0003C7-Bs; Sun, 11 Feb 2018 20:09:33 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ekxwI-00039f-7m; Sun, 11 Feb 2018 20:09:31 +0000 Received: by mail-lf0-x242.google.com with SMTP id c188so1912391lfc.11; Sun, 11 Feb 2018 12:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=/W6GR5aj+n+OZ7p67t+n3PNznt1A1kQKiaVDcx8RDSM=; b=ZhjbRHGW2FLUohNxUiDiEMFAkC+buFKW8uxJHzfj+xNyBSw0FLlVXtfTj1bSkMkGOf JX9e2yVxej0DTQBV/qofaZw0hqewiz2QpTzpBKjk/6yhD10Bk/7QILKrEZdbzCJPJYWj wrQtihTBWGAg0n6zZnB2gXNFdH+awd6kBnS77CQu3nAnZNsh5rZr+iS/IserXV5p9Q2i vm9hKYhFMqt1kKktyrc4ejVtHulbjoKCyVxwEWuJmz5p5W/wUEcv2WS9T3+kQelgUmRv KTjHxKw79LqWuK5XlfwRt1iffzweWu8snK7TTffKZvWsHLzOeopmMWP3+dphKJS+CrU4 YUYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/W6GR5aj+n+OZ7p67t+n3PNznt1A1kQKiaVDcx8RDSM=; b=XhDtucDeVbBcjbyyosu+SnZNaSSzufs1jOsO7kAwdoIDYjs0Tghj61qeuvOvo0K7cP 8wdFHWSmO/oTa7HXhf0ag2aIMHKw4bLb+BQnhUbqLOYC3upuui3rFQrv+afHgVRATcU7 Ehck53y6PJ7TwW8oPR5NGdAd+jZyQ6UcqqsG65P6YdX8IjAEc0rjdz/xAI0gqyJ+X+ZZ FduPuuCK7rimlXDhF0KXug5DA4/80m3a0078fn6vyLaw3x4X12XQdiOjfV3UwGGWim97 8eL2UVNZ2Fp+DyLFDTef7QkHYe8TyYzQxjU/zbTNlBGqD2ZozNDsSOSwz295HPCqLGGM f0Jw== X-Gm-Message-State: APf1xPDuOLhfP/JhFg2pLscWhlCcfDKbklDqQxR0uBUQjYu7Thp3VIyY aiP+gmSa+1hTTWiTtTvy24s= X-Google-Smtp-Source: AH8x225tU7coRKi570LCSC3pM95egYNYCLXU35Jq3dtHzLWg93qZzSjrbanm5yyoJOgwwZejWzZ/Cw== X-Received: by 10.25.80.23 with SMTP id e23mr3212546lfb.72.1518379755438; Sun, 11 Feb 2018 12:09:15 -0800 (PST) Received: from localhost.localdomain (c-2ec27091-74736162.cust.telenor.se. [46.194.112.145]) by smtp.gmail.com with ESMTPSA id c21sm927549lfb.13.2018.02.11.12.09.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2018 12:09:14 -0800 (PST) From: Marcus Folkesson To: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Mark Rutland , Carlo Caione , Kevin Hilman , Matthias Brugger , Barry Song , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Vladimir Zapolskiy , Sylvain Lemieux , Nicolas Ferre , Alexandre Belloni Subject: [PATCH v3 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree Date: Sun, 11 Feb 2018 21:08:41 +0100 Message-Id: <20180211200847.25000-1-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.15.1 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Marcus Folkesson , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. Following best practice described in Documentation/watchdog/watchdog-kernel-api.txt to make use of the parameter logic. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Acked-by: Nicolas Ferre --- Notes: v3: - Use wdd->timeout instead of wdt_timeout when print out timout in probe function. drivers/watchdog/sama5d4_wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c index 0ae947c3d7bc..255169916dbb 100644 --- a/drivers/watchdog/sama5d4_wdt.c +++ b/drivers/watchdog/sama5d4_wdt.c @@ -33,7 +33,7 @@ struct sama5d4_wdt { unsigned long last_ping; }; -static int wdt_timeout = WDT_DEFAULT_TIMEOUT; +static int wdt_timeout; static bool nowayout = WATCHDOG_NOWAYOUT; module_param(wdt_timeout, int, 0); @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) return -ENOMEM; wdd = &wdt->wdd; - wdd->timeout = wdt_timeout; + wdd->timeout = WDT_DEFAULT_TIMEOUT; wdd->info = &sama5d4_wdt_info; wdd->ops = &sama5d4_wdt_ops; wdd->min_timeout = MIN_WDT_TIMEOUT; @@ -273,7 +273,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) platform_set_drvdata(pdev, wdt); dev_info(&pdev->dev, "initialized (timeout = %d sec, nowayout = %d)\n", - wdt_timeout, nowayout); + wdd->timeout, nowayout); return 0; }