Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp688969ybb; Fri, 20 Mar 2020 06:31:16 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuKiSWe8SxSH8MOYuHVAXeLKxeq2GuDAmS7ls0ObpjtDYGjmjgk1+Z4VIYqLRDVx0YisqEe X-Received: by 2002:a05:6808:9bb:: with SMTP id e27mr6255317oig.36.1584711076223; Fri, 20 Mar 2020 06:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584711076; cv=none; d=google.com; s=arc-20160816; b=DKf04G5cBKv9g9qiva58UX4f91Jef091tRpk7A7O2Y5AwSX6wiN9/pbfTEe+ggLgyC LA5Ka9EU4YLKBtwFVyoZhpGBjZWrl4/Xgtoe4aYddFrUlO/WenbPcXrPy+72SsHvfwp7 VBhU5WQSVWUuFvRKcQLISLtqPT/1c78UpJDbYtjGcf0sQuIRSrvpG2DM7aMjNU2Wwf2U rubEgjqrhoFU2DVmQnrKIjW4d5H3FoB1D3tGguZllBa0fDMUgZe0NJO1B7KtbRp/5cyb XfOtdrMxDyKF6mpdM1M8KQBomwdzGo+7/RHnFIyqmRLIZrmZUu74CDs6343URMrVMop/ MSyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=s6NlNBz5JabYM7cmGqE8XzWKbyl9fJfmEfdQ5l/oU3Q=; b=ZPI28CL7E2b2MvdrEQshBH5Z0pZOhLnIzKyaSSfgTcp3FskGsoaFNGrJyd6UdE/RAT 7DQ2SfLXs5ebfraY70V11ktAoqOqSX1yOQaMX9bO5/IOaDoK11EV/gI/ycfQYGBaoG50 pXFD2aU31fS6CO3QX5atnDXu+IwAqywbpkXy/nEItHyZ/7fDuadbUCeinuJ1A0JjZYHw YldC6++n+eRUeQXCeybT4yCHQ2crOUa6Tc+ew2mwCJZz7FlltSaGE/bZVkmCWX46bs7T BLwHqy1TkD0JHRJ2VVo2FSgWZ4F4hrz+uIQ2n0c2t/XfPzBVY8K4AO2oSQ+51fSgsM5F WPTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s09Wp38Y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si3384244otk.39.2020.03.20.06.31.03; Fri, 20 Mar 2020 06:31:16 -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; dkim=pass header.i=@linaro.org header.s=google header.b=s09Wp38Y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727151AbgCTNal (ORCPT + 99 others); Fri, 20 Mar 2020 09:30:41 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:39236 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727046AbgCTNal (ORCPT ); Fri, 20 Mar 2020 09:30:41 -0400 Received: by mail-wm1-f65.google.com with SMTP id a9so3277504wmj.4 for ; Fri, 20 Mar 2020 06:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=s6NlNBz5JabYM7cmGqE8XzWKbyl9fJfmEfdQ5l/oU3Q=; b=s09Wp38Yl9D/BXm38cmJgGPi0UqMy1rBmBFtHIfPgWs3qOVc4KyCW68gFgC6sqGOlB jz/2CgAIG4Z86LceTEe+1zjlO/Fo1IECFE5A+avANLmx8T9hSj8HpV1PNp0HJ4nkbvr9 w/6J0RX5hWBJZHJkXMqtDVmhO7Oi3GPGv8l+Mw9OcKAQNTXnBhNgE65/RtWoz2KBhGCo T6SZZwu/9P54Us9BE+P3EeQ4kpcOe+/TxL5F+jeppKCmwyECfpUfo9D+5HwthNn+XOZQ 2/+ahfHQtav6UCiN/qtcm9rOmsdcm1rRpK/30JxrAvC2jNt6WBWPBDuSuypXAshrAOCU j4vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=s6NlNBz5JabYM7cmGqE8XzWKbyl9fJfmEfdQ5l/oU3Q=; b=uaJV2iULPCNIWQLHmYt8zOzy0fK6VcpALhh74IashMR96CMjgl0UopF+O4CskeVgZ5 3ul3ss8bI+EPnabtY8PTfdWpG/ZwbCyFSk5+vhMcVamgd6YCS9n05OGIicAb1ePtWOfv opYyxY0y9aJGxNWD9tc5vypS/OQil7WQzr4k18GOh9sOpGNgg6ZYADriD3VVfMwAsfrz q88OwJua8D0eWMXj0MorlOSQkic1OBY9ncXoRGbuuHFv2/yysZpsU/jMuiDHu5bBm5T8 kl6T+eu8HDvjoBckOP2MYg12qzTkm0If0/hsH0HRlh5BXCk2bquoJPfVS76W6Ics5GQh 3rNA== X-Gm-Message-State: ANhLgQ1Y9LitD8QBLlKeFrVrBmLG9o1unsv3LJsrQS8Jf6V09mnhHdvu 6j74Iv6X+dtSftSkzWQRGhS6ZQ== X-Received: by 2002:a7b:cf03:: with SMTP id l3mr10440117wmg.139.1584711038190; Fri, 20 Mar 2020 06:30:38 -0700 (PDT) Received: from dell ([2.27.35.213]) by smtp.gmail.com with ESMTPSA id i4sm8758565wrm.32.2020.03.20.06.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2020 06:30:37 -0700 (PDT) Date: Fri, 20 Mar 2020 13:31:23 +0000 From: Lee Jones 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, Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH v11 10/12] backlight: pwm_bl: Use 64-bit division function Message-ID: <20200320133123.GD5477@dell> References: <17fc1dcf8b9b392d1e37dc7e3e67409e3c502840.1584667964.git.gurus@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <17fc1dcf8b9b392d1e37dc7e3e67409e3c502840.1584667964.git.gurus@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Mar 2020, 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_u64 to handle a 64-bit > dividend instead of a straight division operation. > > Cc: Lee Jones > Cc: Daniel Thompson > Cc: Jingoo Han > Cc: Bartlomiej Zolnierkiewicz > Cc: linux-pwm@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: linux-fbdev@vger.kernel.org > > Signed-off-by: Guru Das Srinagesh > Reviewed-by: Daniel Thompson > --- > drivers/video/backlight/pwm_bl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Can this patch be taken on its own? > diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c > index efb4efc..3e5dbcf 100644 > --- a/drivers/video/backlight/pwm_bl.c > +++ b/drivers/video/backlight/pwm_bl.c > @@ -625,7 +625,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) > pb->scale = data->max_brightness; > } > > - pb->lth_brightness = data->lth_brightness * (state.period / pb->scale); > + pb->lth_brightness = data->lth_brightness * (div_u64(state.period, > + pb->scale)); > > props.type = BACKLIGHT_RAW; > props.max_brightness = data->max_brightness; -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog