From: Pavel Machek <pavel@ucw.cz>
To: Martin Botka <martin.botka1@gmail.com>
Cc: "Fenglin Wu" <fenglinw@codeaurora.org>,
"Konrad Dybcio" <konradybcio@gmail.com>,
"Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
"Dan Murphy" <dmurphy@ti.com>, "Rob Herring" <robh+dt@kernel.org>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Lee Jones" <lee.jones@linaro.org>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [PATCH RFC 2/6] pwm: core: Add option to config PWM duty/period with u64 data length
Date: Sat, 25 Jul 2020 17:24:42 +0200 [thread overview]
Message-ID: <20200725152442.GA11424@duo.ucw.cz> (raw)
In-Reply-To: <CADQ2G_G7N_iH523urk3wOieZ0bT7O88Vnnbq6r_h9A4GLXQ5Nw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
Hi!
> As can be seen this divides llu by llu in few warnings and error.
> At the time of sending i didn't realize it but this fails on 32 bit
> architectures.
>
> So i would like to ask how would you like this fixed ?
> Using macro or some other way ?
+#include <linux/math64.h>
- gain_q23 = (gain_q23 * dmic->boost_gain) / 100;
+ gain_q23 = div_u64(gain_q23 * dmic->boost_gain, 100);
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2020-07-25 15:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 21:36 [PATCH RFC 0/6] Add QCOM pwm-lpg and tri-led drivers Martin Botka
2020-07-24 21:36 ` [PATCH RCC 1/6] pwm: Add different PWM output types support Martin Botka
2020-07-27 20:10 ` Uwe Kleine-König
2020-07-27 20:56 ` Martin Botka
2020-07-28 7:52 ` Uwe Kleine-König
2020-07-27 21:46 ` Guru Das Srinagesh
2020-07-24 21:36 ` [PATCH RFC 2/6] pwm: core: Add option to config PWM duty/period with u64 data length Martin Botka
2020-07-25 14:55 ` Martin Botka
2020-07-25 15:24 ` Pavel Machek [this message]
2020-07-25 15:30 ` Martin Botka
2020-07-26 9:04 ` Andy Shevchenko
2020-07-26 9:12 ` Martin Botka
2020-07-27 7:29 ` Martin Botka
2020-07-27 7:32 ` Martin Botka
2020-07-27 7:52 ` Uwe Kleine-König
2020-07-27 7:58 ` Martin Botka
2020-07-27 8:34 ` Uwe Kleine-König
2020-07-24 21:36 ` [PATCH RFC 3/6] pwm: pwm-qti-lpg: Add PWM driver for QTI LPG module Martin Botka
2020-07-27 20:09 ` Uwe Kleine-König
2020-07-27 21:16 ` Martin Botka
2020-07-28 7:08 ` Uwe Kleine-König
2020-07-24 21:36 ` [PATCH RFC 4/6] leds: leds-qti-tri-led: Add LED driver for QTI TRI_LED module Martin Botka
2020-07-26 17:25 ` Martin Botka
2020-07-24 21:36 ` [PATCH RFC 5/6] Documentation: Add binding for qti-tri-led Martin Botka
2020-07-24 21:36 ` [PATCH RFC 6/6] Documentation: Add binding for pwm-qti-lpg Martin Botka
2020-07-24 22:05 ` [PATCH RFC 0/6] Add QCOM pwm-lpg and tri-led drivers Pavel Machek
2020-07-24 22:26 ` Martin Botka
2020-07-24 22:32 ` Pavel Machek
2020-07-24 22:48 ` Martin Botka
[not found] ` <CADQ2G_HbysJbiQKSRmA6HDRfjPYPiDjbZfeuUjM1mNV-BBBC-A@mail.gmail.com>
2020-07-24 22:31 ` Pavel Machek
2020-07-24 22:46 ` Martin Botka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200725152442.GA11424@duo.ucw.cz \
--to=pavel@ucw.cz \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=fenglinw@codeaurora.org \
--cc=jacek.anaszewski@gmail.com \
--cc=konradybcio@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=martin.botka1@gmail.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).