Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp58360ybm; Tue, 26 May 2020 10:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8rc4d+G0qfauYqBVcsh3xEFIXwCFKURkDmjRdyjSC9ah/8FepXQ1kXyzfbRwV1+lLWmh+ X-Received: by 2002:a17:906:e293:: with SMTP id gg19mr1984163ejb.295.1590514787226; Tue, 26 May 2020 10:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590514787; cv=none; d=google.com; s=arc-20160816; b=ZSIAPDwdoWsjo5zRIvHnkt2rBXc+btPiXX9PBDWTX3EC41hj1f8NLJSFZKkxBefTpu Roni078oM/VE93acwlt/96yJiY0iQUI/IIcthK/cfpjQcZHMASEqcEsCDqDCcamWshAY lxnjaph1uET/Ogu53MG+wQtrJsPKTw+A67PSU4O8yoCmbnLnWyTSAZuigpFkDYggHqbh usMslcM/dvgtVaWb0V3rFYRq+YOTasCE+lrbg1sTSNm2kgdBXbfjWu3b6ADiavJj49gG ZbJTPmTjllpK46hWP2OZjQ29rQ8YS1yF4rf/XqPBzopaFX5ndh2DbhL4DOoFTw3+9WpQ IjlQ== 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=OGXc+OCpLLaeoromAU9aenvrj/fWNlggwFZzYPgC9Lc=; b=HEaBqb9wNuE4a+aBM17K0X31itfYVcl/42BTJtPSwuWIYglSBn18+khr1qtMNvnlf3 NIuEyJCi3qcfG5Pm0mdXLDfE/4kQMZezRTQzXhuEPvKIAoHfAjZJYEbIldYB83nWz63U nGbWDMPePyylufr1yc+QLrouIpenWLtuQAwpUxcDQCN0lsb6txcVcElexZZTQSXDZbLh vR8ulPE8gb9NT9dxBuR+r9JF+yLq0Wed+J79Nc1NB28A+oU9wjQPOezhUmr6/d8qF9v6 ZIeHPpoEIobo6gM7ars7E2YXEuEOIUDlUacfv5rzf1/rKDSYc+CPUNGZf30dLhfDW3Xc ffEA== 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 q11si256691ejb.539.2020.05.26.10.39.24; Tue, 26 May 2020 10:39:47 -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 S2389158AbgEZRfb (ORCPT + 99 others); Tue, 26 May 2020 13:35:31 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:65102 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388896AbgEZRfQ (ORCPT ); Tue, 26 May 2020 13:35:16 -0400 Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) 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 ironmsg01-sd.qualcomm.com with ESMTP; 26 May 2020 10:35:13 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 5AAB94C99; 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 Subject: [PATCH v15 04/11] pwm: clps711x: Use 64-bit division macro Date: Tue, 26 May 2020 10:35:04 -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_args.period's datatype to u64, prepare for this transition by using DIV64_U64_ROUND_CLOSEST to handle a 64-bit divisor. Cc: Daniel Thompson Signed-off-by: Guru Das Srinagesh --- drivers/pwm/pwm-clps711x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-clps711x.c b/drivers/pwm/pwm-clps711x.c index 924d39a..ba9500a 100644 --- a/drivers/pwm/pwm-clps711x.c +++ b/drivers/pwm/pwm-clps711x.c @@ -43,7 +43,7 @@ static void clps711x_pwm_update_val(struct clps711x_chip *priv, u32 n, u32 v) static unsigned int clps711x_get_duty(struct pwm_device *pwm, unsigned int v) { /* Duty cycle 0..15 max */ - return DIV_ROUND_CLOSEST(v * 0xf, pwm->args.period); + return DIV64_U64_ROUND_CLOSEST(v * 0xf, pwm->args.period); } static int clps711x_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project