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=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 388F1C10DCE for ; Wed, 11 Mar 2020 02:11:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1056F20674 for ; Wed, 11 Mar 2020 02:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727929AbgCKCLZ (ORCPT ); Tue, 10 Mar 2020 22:11:25 -0400 Received: from gofer.mess.org ([88.97.38.141]:46303 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727484AbgCKCLZ (ORCPT ); Tue, 10 Mar 2020 22:11:25 -0400 Received: by gofer.mess.org (Postfix, from userid 1000) id EF0C3C6372; Wed, 11 Mar 2020 02:11:22 +0000 (GMT) Date: Wed, 11 Mar 2020 02:11:22 +0000 From: Sean Young To: Guru Das Srinagesh Cc: linux-pwm@vger.kernel.org, Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Subbaraman Narayanamurthy , linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Richard Fontana , Thomas Gleixner , Kate Stewart , Allison Randal , linux-media@vger.kernel.org Subject: Re: [PATCH v8 04/12] ir-rx51: Use 64-bit division macro Message-ID: <20200311021122.GA13338@gofer.mess.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 10, 2020 at 06:41:13PM -0700, Guru Das Srinagesh wrote: > Since the PWM framework is switching struct pwm_state.period's datatype > to u64, prepare for this transition by using DIV_ROUND_CLOSEST_ULL to > handle a 64-bit dividend. > > Cc: Mauro Carvalho Chehab > Cc: Richard Fontana > Cc: Thomas Gleixner > Cc: Kate Stewart > Cc: Allison Randal > Cc: linux-media@vger.kernel.org Acked-by: Sean Young > > Signed-off-by: Guru Das Srinagesh > --- > drivers/media/rc/ir-rx51.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c > index 8574eda..9a5dfd7 100644 > --- a/drivers/media/rc/ir-rx51.c > +++ b/drivers/media/rc/ir-rx51.c > @@ -241,7 +241,8 @@ static int ir_rx51_probe(struct platform_device *dev) > } > > /* Use default, in case userspace does not set the carrier */ > - ir_rx51.freq = DIV_ROUND_CLOSEST(pwm_get_period(pwm), NSEC_PER_SEC); > + ir_rx51.freq = DIV_ROUND_CLOSEST_ULL(pwm_get_period(pwm), > + NSEC_PER_SEC); > pwm_put(pwm); > > hrtimer_init(&ir_rx51.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project