lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgPt/Hut4T4C86fX@shaak>
Date:   Wed, 9 Feb 2022 11:38:20 -0500
From:   Liam Beguin <liambeguin@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Peter Rosin <peda@...ntia.se>, Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v14 09/11] iio: afe: rescale: add temperature transducers

Hi Andy,

On Tue, Feb 08, 2022 at 03:46:27PM +0200, Andy Shevchenko wrote:
> On Tue, Feb 8, 2022 at 4:04 AM Liam Beguin <liambeguin@...il.com> wrote:
> >
> > A temperature transducer is a device that converts a thermal quantity
> > into any other physical quantity. This patch adds support for
> > temperature to voltage (like the LTC2997) and temperature to current
> > (like the AD590) linear transducers.
> > In both cases these are assumed to be connected to a voltage ADC.
> 
> ...
> 
> > +       rescale->offset = div_s64((s64)offset * rescale->denominator,
> > +                                 rescale->numerator);
> 
> Wonder if we can use mult_frac() here. Would it require 64-bit division?

Same here, I'd rather keep it as is, especially if you plan on adding
helpers later on for struct u32_fract.

Cheers,
Liam

> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ