Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4717657ybb; Tue, 24 Mar 2020 04:06:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsbwiFiL4+/KUBrGB8LF9ehXJ3yVkJeqzebMk0Scyrnh3xm+0HTrgtCspsVaOxqDtdr3FfL X-Received: by 2002:aca:d985:: with SMTP id q127mr2834136oig.132.1585048014474; Tue, 24 Mar 2020 04:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585048014; cv=none; d=google.com; s=arc-20160816; b=M8D9hOsmt68zZHALVMeADlCYhLdjCTpBgIPhWPcNmzXisY2SS7ykrXK/tE7s6prq8Y ue3RKbv1a3VQEOhzJe4nxqtMe4xXFuNNI75rIhaH8RRNoe1iTWVdc6EwxMAhuqJFozQ9 0a0FxGsnn87Q0owotgrodTpgC8yrI0dY9EOLIlSAS2/OJCLPxA599zoOLZrBUZpQ9gUD 9mnw+2ICFqCaEN63U0MVEvKFzK93DENGTwebGfPrdopwaFoW6LxzEJmoI7jWYBKAdkZq 5iYi5pVMw8IH4T2dgUBFutoHpNT9UQqH+i2cjDqU5XdNAPG2hDO2VCsjqzQkxNXzQ7hr C9MA== 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=85coQpfIuRs+sPyYMKP16shkvF4ULZs9j9T/GaUTXMA=; b=pMOoWKNfM+DMYYkzjV07dXC8OrBnNiarbl2LWsuHpIwmG+PjTgAamFx0gXDW1T+KNE qOv+A/vMB5g980AhwfAacRYHxTiQ0iP31RCOZDMcHoTEz737T2vRdd8/4GL0RxMGyeBU lrniJguO0wwZ4hrdhFaa3Cq7ttcRSAkQPyEqD2b3hs4WeN6s5bwDzVhMhmFoKHvF3dOn Z16VBW7EfeCEVPtsQkoMF3ZClIKvfbeex1IN5TU9sD3VcsaIGD5wCCoBzexMLEfJIQ7y Es8wbwNz+pIIXeD5wTAobj7LSWf2Ph12wS4/IUEWS5nRMQI7USwfDBXOsXspqHEQ6rgN QCkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="VT9q5/jF"; 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 l11si8568800oib.32.2020.03.24.04.06.40; Tue, 24 Mar 2020 04:06:54 -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="VT9q5/jF"; 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 S1727223AbgCXLGY (ORCPT + 99 others); Tue, 24 Mar 2020 07:06:24 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53758 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbgCXLGY (ORCPT ); Tue, 24 Mar 2020 07:06:24 -0400 Received: by mail-wm1-f67.google.com with SMTP id b12so2696981wmj.3 for ; Tue, 24 Mar 2020 04:06:21 -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=85coQpfIuRs+sPyYMKP16shkvF4ULZs9j9T/GaUTXMA=; b=VT9q5/jF2VHIjb1DZzmV5uWK7Uk3Y+xVfuIZA7l+c4XrodjvqMvAkW8PC0kNkLrgYM 3iana2G8gyGAfBnuD3tWiwwsYyndM+xe6dTnJx4myohK1jgaOQlQisQ7OTsUcVb4TiHA 02CR0L4AmTwZ6TWYAuBgOaGihewpebEYX1AZBguETu6kswW6pM8vMDVrOiQXeCUsunFq kEXdn3pTTM5sKdZAVZryI6XQZDdohQZwEGPxqePgXmdn6YyIfmajV2Z0g6BrJMMfVDSZ 3pxXnSFuuNvVcIbxrbVnimLoPa7kg7P2p0ab+jA5qME9NUdm6UCRGEBAySrUTOyPCHYo wC6w== 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=85coQpfIuRs+sPyYMKP16shkvF4ULZs9j9T/GaUTXMA=; b=JCuxO3+fp9cSIiwNrMeUusKrk7nvmUCcOcoFsPSkOxIXLNQnWqiLwTHBh9NH85UtuM EsfBspWiG1xYBtJQlyGmB8VjaC+LBJH+4JkKURstUXADvXSvu3+J9Ddr0EP+tM6CjgTe 0g478OprqSko1LvkoGulMrVQA3kd47TjLmZCI9bv7JcE+aQ4kPJLVZVlO4UCaYuFwtbR RSt+NaBs26h6PnsNSnL+m4iVlENr1AA3MqUxQy7ShWVn/EWVfMD3hA4CNxQxed2HkpkY mhYglJDnec6pYhr1K41cfYHBY4hniLuzBOcauCqsW/M/6g9dHrpaPxdr/VHeQ0+q4KLD KV9w== X-Gm-Message-State: ANhLgQ2AeAmsjwlfEohFUiYJg2hK9hyg2i85hkHjCun3as7xX/EUDBxL GfYJACaTcmt6LYTKflWVhzR7pA== X-Received: by 2002:a05:600c:20d:: with SMTP id 13mr4980605wmi.74.1585047981072; Tue, 24 Mar 2020 04:06:21 -0700 (PDT) Received: from dell ([2.27.35.213]) by smtp.gmail.com with ESMTPSA id 98sm28341407wrk.52.2020.03.24.04.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 04:06:20 -0700 (PDT) Date: Tue, 24 Mar 2020 11:07:10 +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: <20200324110710.GL5477@dell> References: <17fc1dcf8b9b392d1e37dc7e3e67409e3c502840.1584667964.git.gurus@codeaurora.org> <20200320133123.GD5477@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200320133123.GD5477@dell> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Mar 2020, Lee Jones wrote: > 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? Hellooooo ... > > 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