Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp55014ybh; Tue, 10 Mar 2020 19:12:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuVH3gMniInGGA433ktCByfw/la2u+ZI8KoHK3bVsjztTHRbwbr659CngwRQbqrGVQ+WKdk X-Received: by 2002:a54:4e8d:: with SMTP id c13mr430098oiy.27.1583892755683; Tue, 10 Mar 2020 19:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583892755; cv=none; d=google.com; s=arc-20160816; b=ls/nO3hm2NgKe7RGj/ddADU8oBzdtOhf1U+VMgcUBwSe+xMOjBdCvQNHFKVE4mJB9k OaQv4iighi8ratoeeXC4WIAYfvxSUFESnd1243FCFMqlcKS6Uo5v8ySbC59AIBsahlUY rbPC7wtuuyIu0MFd8se94N+Xlm4pJSErzxEf4fiNSUqmx+82ZbKwQU8hRZR9Y+HVDUVi IDOZ9ch6MDt/mixqlNv0YXC7lxIDZwq+dxQzLC6004g3PXZDj2yuhN/Yt0NFhxBFpPz8 qLP9HpI2r9f5Yph9oLFCHcgHXHRPYNN5i2qs8fL0cuu6gPXAJEMUYYn45wO1ieM4Uy/I 7yiw== 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; bh=ruhgQQXYJfK+fUz9v+1XcTwDCLNziMXCDOwrDw22MBo=; b=WIlnD/KdoNlF7X8ZNUC9zRbM5X3So9+MbN7AJFFk5W88ie4ybGOXANIGjIdJmAECj/ QnlcINUTry9ZSxRPRy/ADZQZPOjReHiq+feRTCWAvz5cipABfjLWbVk5epQ6k2B2s/iT aNBZaCqvSilfqHg3NHIsp112rpbDQUbGfrmCj3mNDEUMm6eiEIanh1xq8J8VMXq3BZfA b8K6RjpsllKQnGXo7CVHbQqF7bM8eItQDtc4xUalttfik9xN8SE0BNBzuGhWwNcS6+bp J42sAVp2fKw//WD/wc2HEl53QggB+DrdDhuP8ro303WeSpxIAvS9mCnqQIRakw3HQCF5 94sA== 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 b21si311234otp.79.2020.03.10.19.12.22; Tue, 10 Mar 2020 19:12:35 -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 S1727888AbgCKCLZ (ORCPT + 99 others); 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