From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10FA6C2BB85 for ; Thu, 9 Apr 2020 18:56:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E66E720757 for ; Thu, 9 Apr 2020 18:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbgDIS4K (ORCPT ); Thu, 9 Apr 2020 14:56:10 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:38464 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbgDIS4K (ORCPT ); Thu, 9 Apr 2020 14:56:10 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id 2FE22803078F; Thu, 9 Apr 2020 18:56:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WE03Q2YOjKWv; Thu, 9 Apr 2020 21:56:02 +0300 (MSK) Date: Thu, 9 Apr 2020 21:56:30 +0300 From: Sergey Semin To: Guenter Roeck CC: Wim Van Sebroeck , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , , Subject: Re: [PATCH 3/7] watchdog: watchdog_dev: Use generic msec-per-sec macro Message-ID: <20200409185630.fi5h64dqic6hnks2@ubsrv2.baikal.int> References: <20200306132747.14701-1-Sergey.Semin@baikalelectronics.ru> <20200306132823.D5C5B803087C@mail.baikalelectronics.ru> <20200306152033.4444780307C4@mail.baikalelectronics.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200306152033.4444780307C4@mail.baikalelectronics.ru> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 06, 2020 at 07:20:29AM -0800, Guenter Roeck wrote: > On 3/6/20 5:27 AM, Sergey.Semin@baikalelectronics.ru wrote: > > From: Serge Semin > > > > For better readability replace the numeric literals with globally > > available xSEC_PER_SEC macro. > > > > This is really completely unrelated to the rest of the series, > and I don't really see the point. I am fine with such changes if there > are some context changes around it, but otherwise they add no value > other than being a potential source of backport conflicts. It's up to you, since you are the subsystem maintainer. I'll drop the patch in v2. -Sergey > > Guenter > > > Signed-off-by: Serge Semin > > Signed-off-by: Alexey Malahov > > Cc: Thomas Bogendoerfer > > Cc: Paul Burton > > Cc: Ralf Baechle > > --- > > drivers/watchdog/watchdog_dev.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c > > index 8b5c742f24e8..a1a3bbe21653 100644 > > --- a/drivers/watchdog/watchdog_dev.c > > +++ b/drivers/watchdog/watchdog_dev.c > > @@ -99,7 +99,7 @@ static inline bool watchdog_need_worker(struct watchdog_device *wdd) > > { > > /* All variables in milli-seconds */ > > unsigned int hm = wdd->max_hw_heartbeat_ms; > > - unsigned int t = wdd->timeout * 1000; > > + unsigned int t = wdd->timeout * MSEC_PER_SEC; > > > > /* > > * A worker to generate heartbeat requests is needed if all of the > > @@ -121,7 +121,7 @@ static inline bool watchdog_need_worker(struct watchdog_device *wdd) > > static ktime_t watchdog_next_keepalive(struct watchdog_device *wdd) > > { > > struct watchdog_core_data *wd_data = wdd->wd_data; > > - unsigned int timeout_ms = wdd->timeout * 1000; > > + unsigned int timeout_ms = wdd->timeout * MSEC_PER_SEC; > > ktime_t keepalive_interval; > > ktime_t last_heartbeat, latest_heartbeat; > > ktime_t virt_timeout; > > >