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] [day] [month] [year] [list]
Message-ID: <CAHp75VdmDWgCMDZMywhF0nSsR7HjYZj56jPtXw=43epBkniroA@mail.gmail.com>
Date:   Wed, 25 May 2022 18:34:55 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Eddie James <eajames@...ux.ibm.com>
Cc:     linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Jonathan Cameron <jic23@...nel.org>,
        Joel Stanley <joel@....id.au>
Subject: Re: [PATCH v3 1/2] iio: pressure: dps310: Refactor startup procedure

On Tue, May 24, 2022 at 10:35 PM Eddie James <eajames@...ux.ibm.com> wrote:
>
> Move the startup procedure into a function, and correct a missing
> check on the return code for writing the PRS_CFG register.

...

> +/*
> + * Some verions of chip will read temperatures in the ~60C range when

versions
of the chip(s)

> + * its actually ~20C. This is the manufacturer recommended workaround

it's

> + * to correct the issue. The registers used below are undocumented.
> + */

Yes, they are in the original code, but you may just fix while at it.

...

> +       rc = dps310_temp_workaround(data);
> +       if (rc < 0)

These ' < 0' parts are cargo cult, I believe.
That's why this makes code longer and confusing by "what is the
meaning of the positive values here?"

> +               return rc;
> +
> +       return 0;

That said,

  return dps310_temp_workaround(data);

should suffice.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ