Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp901819ybl; Fri, 16 Aug 2019 05:59:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhf3ld50MMCo3028UycImr+xmet59cuqHkEGu2t6UHgN8hKpovvO+zOR4AKKyAP9HRApnT X-Received: by 2002:a17:90a:b884:: with SMTP id o4mr7050297pjr.52.1565960391929; Fri, 16 Aug 2019 05:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565960391; cv=none; d=google.com; s=arc-20160816; b=TyirH1qwWpYMZmwbJC9xkLjMlPn2JrlpwJLvfZzaHIGyQpBgKww0O5KPvbsJoCkPQA 6dqs+4x25sl+QduJ3bnxRp9xgeZEh+2zP7xJBh3ZedFalKfHl0zR/aVaFWkmmPgdkt4b yDqjeP5RPSUxtE5sjx4QFfE3liRcqmHdmNGLsw9Rt2ntaejpppjwNm8vqfQ6SYXbsJWG w72Fj/j30k6h9d2EtjV9iH+grQC9X2bHRmA0tibxXgoVV+is1NJDjqcnvfbQ78Yk6XPC qWAiZVvD+YiKDbAO8xsY287R/gnKjzpmE3NREnL1OZHbTnnoi+SZOxH94F9ZnVYTc/5j oSwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organisation:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Rb7KmvYmeExM55ZIJhR1qmoOb7kqHN7TjB9/SlqbaS8=; b=Mx7qIPhmUCp9ZDdkdVttmRZilPb3RX5Um+MIUWDqrGeKIk7vNMyPieW+wFA6loZdlJ oZioP3HkDgc1JP+NTArAK2SbRF4dwDZaVYvBs7LzPeREd4vYPNZ98HIihRZT5d3d52lM 3ZpW5BhzNu6JoSyZTNmC9WO2urqZzIiG7d96IwKvFMpo8BC1jdQFHk0jhdIwKjhwcB3d LVFkBFv0/Iy60k7ccpw64GEoP7gwxrIUhaq+X52E7hD3WZ0TmsUWPwooblt5AUy185JZ 6QeZf01KhDO6/JYvcduoxaWuV9IlqH6e/0WU+3z49ewDC0Ft1Y2wWA40AVujjjXyr6KW syug== 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 z15si3759556pgf.85.2019.08.16.05.59.33; Fri, 16 Aug 2019 05:59:51 -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 S1727202AbfHPM6d (ORCPT + 99 others); Fri, 16 Aug 2019 08:58:33 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:53828 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726541AbfHPM6d (ORCPT ); Fri, 16 Aug 2019 08:58:33 -0400 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id C473B25AEC0; Fri, 16 Aug 2019 22:58:30 +1000 (AEST) Received: by reginn.horms.nl (Postfix, from userid 7100) id BC67994057D; Fri, 16 Aug 2019 14:58:28 +0200 (CEST) Date: Fri, 16 Aug 2019 14:58:28 +0200 From: Simon Horman To: Geert Uytterhoeven Cc: Daniel Lezcano , Thomas Gleixner , Jacopo Mondi , Chris Brandt , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/3] clocksource/drivers/renesas-ostm: Use DIV_ROUND_CLOSEST() helper Message-ID: <20190816125828.jl36jytcez2okqvs@verge.net.au> References: <20190807084635.24173-1-geert+renesas@glider.be> <20190807084635.24173-2-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190807084635.24173-2-geert+renesas@glider.be> Organisation: Horms Solutions BV User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 07, 2019 at 10:46:33AM +0200, Geert Uytterhoeven wrote: > Use the DIV_ROUND_CLOSEST() helper instead of open-coding the same > operation. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman > --- > v3: > - New. > --- > drivers/clocksource/renesas-ostm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c > index 61d5f3b539ce23df..37c39b901bb12b38 100644 > --- a/drivers/clocksource/renesas-ostm.c > +++ b/drivers/clocksource/renesas-ostm.c > @@ -221,7 +221,7 @@ static int __init ostm_init(struct device_node *np) > } > > rate = clk_get_rate(ostm_clk); > - ostm->ticks_per_jiffy = (rate + HZ / 2) / HZ; > + ostm->ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); > > /* > * First probed device will be used as system clocksource. Any > -- > 2.17.1 >