Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp57235ybm; Tue, 26 May 2020 10:38:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjuRbJiIVDR0AKGluyoBv//s+66BVbUAmtjeH5Cieqg+rwi08HhyLLaSoYegrgFInwDeAA X-Received: by 2002:a17:906:9142:: with SMTP id y2mr2224023ejw.205.1590514683632; Tue, 26 May 2020 10:38:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590514683; cv=none; d=google.com; s=arc-20160816; b=C8R9VdPwKzIqg/Kk8H0aPlWZD2KJ03NV7jibc1RxXXr7qqENdvbCa2gh6ViSZmGdTx xLz+KIoG46oCxO85M9qA7uuw1crOTTm7Dr7yV59Ufjvw4sRNvvBFH8WOuOIjOJttKVPp /DxH1qF1z8LlJdfM9d33qd735tJx06mkbBLocnb3f3d4l1Zc2u0GUgCBvEzDVYe3ObDi fPuXDN8/1G/U0Ig2uBEvvYWKL2WCNFQ4JM9m6hrxqdeORW/5qe2s7xubwoJGk22eXysQ 2HoWuJREuM/tvHjFlkXcJLmJiV3Rc7EjHxjaVczu8mPPryyZcdqHVnIPF2kYLUkKnF4k dLwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=ALLB2OXBXZic/yYFmvADxsXlERWLkHlgEKkcQr1g5ug=; b=Ph8uQUKTYe08Hr4ErXbBhRovf3sXhTFE0wL9GwdsYNXgHNovXgi6ys5rSY1lumelTj RWxoxx12WPjnX9eI9E4gRkekKqaPnR/SHhb+rwyCmACgmEyLq3dv3eSFIO5a3VcsQRPv w4N7A12F5JQLyWICyUMFo+5/CBRk4VNFfQ2+tIvbIMQ5SONz8xQ36SyLo9XImzLHMGl4 a3X7Az4Js7gYh56Jcw0KOstF3a098/440ybq62GuFwc1DZyy+tVmDKkx4iZChSYYxKt0 l7NgMP05xMO34HfTcnpOtOtJ1XHUnlXRNNcgJpxTQUhJ1ekVD6Tv7nIu2R2s5YxxR9zK wVRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb2si286016ejb.270.2020.05.26.10.37.40; Tue, 26 May 2020 10:38:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388899AbgEZRfP (ORCPT + 99 others); Tue, 26 May 2020 13:35:15 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:65094 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388765AbgEZRfP (ORCPT ); Tue, 26 May 2020 13:35:15 -0400 Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 26 May 2020 10:35:14 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg-SD-alpha.qualcomm.com with ESMTP; 26 May 2020 10:35:13 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 6F4D84C99; Tue, 26 May 2020 10:35:13 -0700 (PDT) From: Guru Das Srinagesh To: linux-pwm@vger.kernel.org, Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: Subbaraman Narayanamurthy , David Collins , linux-kernel@vger.kernel.org, Joe Perches , Stephen Boyd , Lee Jones , Arnd Bergmann , Geert Uytterhoeven , Guenter Roeck , Daniel Thompson , Dan Carpenter , linux-arm-kernel@lists.infradead.org, Guru Das Srinagesh , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: [PATCH v15 05/11] pwm: pwm-imx-tpm: Use 64-bit division macro Date: Tue, 26 May 2020 10:35:05 -0700 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the PWM framework is switching struct pwm_state.period's datatype to u64, prepare for this transition by using DIV64_U64_ROUND_CLOSEST to handle a 64-bit divisor. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Signed-off-by: Guru Das Srinagesh --- drivers/pwm/pwm-imx-tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-imx-tpm.c b/drivers/pwm/pwm-imx-tpm.c index 5f3d7f7..fcdf6be 100644 --- a/drivers/pwm/pwm-imx-tpm.c +++ b/drivers/pwm/pwm-imx-tpm.c @@ -124,7 +124,7 @@ static int pwm_imx_tpm_round_state(struct pwm_chip *chip, real_state->duty_cycle = state->duty_cycle; tmp = (u64)p->mod * real_state->duty_cycle; - p->val = DIV_ROUND_CLOSEST_ULL(tmp, real_state->period); + p->val = DIV64_U64_ROUND_CLOSEST(tmp, real_state->period); real_state->polarity = state->polarity; real_state->enabled = state->enabled; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project