Received: by 10.223.176.5 with SMTP id f5csp1214003wra; Fri, 9 Feb 2018 14:52:59 -0800 (PST) X-Google-Smtp-Source: AH8x227ClTCXC06gAXdbZjjMX/CxTUZEbhxCS4B2Bsjul4r7HhEt5kOQFKwND9BidscFgWRNpJ8d X-Received: by 2002:a17:902:6884:: with SMTP id i4-v6mr887226plk.259.1518216779000; Fri, 09 Feb 2018 14:52:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518216778; cv=none; d=google.com; s=arc-20160816; b=Gotcy7dvpTHcWeIK29NO08+F/qpQnU159F2XeVVmRoDs5UJAQZoQxc7PQeXWK08Bpj 4wA1/H1pABMBfI9jsnnMODTCd0VIM/gDkHTgFB4fX0yh6mtmT8csc7zELKSqNq4gIKNz EKHP/W6A8nm2iZTtRgMFJZMLs0CbHPyiyC5HuS7chHZLYuvS39ZnacZ/t1H9OD8CCt6F uzLzkJ7lCY9Hu3LLvNulB7B/88v8uOn0vyLfpe4R3WQRdqep8T3IIPzKlzRSNAKlqTIW 2zp6RkxKvOvm/sZHDDEaJ/v126fmAfjmlGX2n7RFQesnzBLd1K93bpqIqoUWKIjaGwt7 hYIw== 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:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=OgjB9TSqdgWactBQs0Z3uHbpe+JhLV/Mf3LcnXbHBTQ=; b=ND4hXKxBdSaIkplgemUeHoSPc6PYxbzD3Kr67dhZRMWJegQNL6bQD2mjKQymTKqbj1 Z2Xg+kp7z1tZ5h5db4D+u9sRGcp9gk2R6OK3t+plErd6F8EfKbWqSWdYQosqioBraa3Z 9lA3Ol3q4T0Czu8tZmTo3yrhl+y6fuwXskGBRaOGEBmm78fWzhN/A7rPZfxkyhQXvyjB o4TO+3owBNlFp0UHc+P/Os1/oEr4J7N23AiH5afd3+AqkpTiGfEGQOKrclevWokRsfFI 5bjFLi6u1YVxviERITxj4su2y1UBs4Dh19dciimNJ6IrS5nvVPHz7rTUmbgit4YqVJGU 1I7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pErPwvvY; 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 c196si66127pga.513.2018.02.09.14.52.44; Fri, 09 Feb 2018 14:52:58 -0800 (PST) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pErPwvvY; 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 S1753203AbeBIWwE (ORCPT + 99 others); Fri, 9 Feb 2018 17:52:04 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33027 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753106AbeBIWwC (ORCPT ); Fri, 9 Feb 2018 17:52:02 -0500 Received: by mail-pg0-f65.google.com with SMTP id u1so4579158pgr.0; Fri, 09 Feb 2018 14:52:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OgjB9TSqdgWactBQs0Z3uHbpe+JhLV/Mf3LcnXbHBTQ=; b=pErPwvvYR4BZF286EIXKL4V3Z4pqzjDmhNZjPJoH+KtrWHa5OPX22njx1a07kbfol4 ok9roaYQ5dluGk11ZvHIzKkas2BxyK9d60ZsuwkHq4wwM8KWGdJi96MT40/MmB/dFsfo 8POQhnvrj6EFpuEYjdtUztJdKnKo7ShpWCLZLowK7/FarghqW0EhcEdhcutFPXqSoa6F a7HD+sk+Ppa510UDG2MwsrHXnyV3GTXv84tvKIIo/ttoElW5U/e3EZJAJcHLQ38Y/uW7 H2y4pUlyv+MIUfi5MniJgN1Hlb3LjomGLplT1hmV7HNx8rID0xnb6TSVE+mHhWRMZltl 8/eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=OgjB9TSqdgWactBQs0Z3uHbpe+JhLV/Mf3LcnXbHBTQ=; b=cuHACjvlT1LjaautSTo075cOFpCT3Uo6zuUTvHKz0Rj/q45yP0EzequbJrR0n+0zcG 887fGyOgwRNUUtp3A8ELwO6+MgHl5xtvw4BP+vBzs8IjhQZczT7Op9eOleNcVe48BEq6 HG0PSOchB/0S1rKDIkjEeSjqxdL9N4biZ3sCftsPluz3soswDCl0XPo5Bm4cHcs8cmyH etmMAd460mOTD1D4MRLVTFU6VxfUVkpE7+aZP026ex1q2Y2mio5sgx1Lnr8js8WMQ4DI b7N2pJaZFEe+18ypVzl0qFeTPO3ndh+QWrakZnIVHFPhPA7S6Qtf3xaCs597S6xYGKCa yXHA== X-Gm-Message-State: APf1xPAZFcmOcDL2dhCHK1mhE5paOL5dtcasdgfBhZLLjcip3d6DqZSS Fa/JrLesT+f0VmeOt2av/bc= X-Received: by 10.101.78.130 with SMTP id b2mr3607131pgs.229.1518216722309; Fri, 09 Feb 2018 14:52:02 -0800 (PST) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id e23sm10329584pfk.114.2018.02.09.14.52.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 14:52:01 -0800 (PST) Date: Fri, 9 Feb 2018 14:52:00 -0800 From: Guenter Roeck To: Marcus Folkesson Cc: Wim Van Sebroeck , 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 , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree Message-ID: <20180209225200.GI19627@roeck-us.net> References: <20180209192724.1227-1-marcus.folkesson@gmail.com> <20180209192724.1227-8-marcus.folkesson@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180209192724.1227-8-marcus.folkesson@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote: > 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 > --- > drivers/watchdog/coh901327_wdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c > index 4410337f4f7f..437f865e5c6b 100644 > --- a/drivers/watchdog/coh901327_wdt.c > +++ b/drivers/watchdog/coh901327_wdt.c > @@ -67,7 +67,7 @@ > #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE 0x0001U > > /* Default timeout in seconds = 1 minute */ > -static unsigned int margin = 60; > +static unsigned int margin; > static int irq; > static void __iomem *virtbase; > static struct device *parent; I would suggest to initialize .timeout in 'static struct watchdog_device coh901327_wdt', and drop the error check when calling watchdog_init_timeout(). Guenter