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]
Date:   Mon, 25 Jul 2022 23:05:22 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Angel Iglesias <ang.iglesiasg@...il.com>
Cc:     linux-iio <linux-iio@...r.kernel.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Paul Cercueil <paul@...pouillou.net>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/5] iio: pressure: bmp280: simplify driver
 initialization logic

On Sat, Jul 23, 2022 at 7:40 PM Angel Iglesias <ang.iglesiasg@...il.com> wrote:
>
> Simplified common initialization logic of different sensor types
> unifying calibration and initial configuration recovery.
>
> Default config param values of each sensor type are stored inside
> chip_info structure and used to initialize sensor data struct instance.
>
> The auxiliar functions for read each sensor type calibration are converted
> to a callback available on the chip_info struct.

...

> +       .oversampling_temp_default = ilog2(2),
> +       .oversampling_press_default = ilog2(16),
> +       .oversampling_humid_default = ilog2(16),
> +       .oversampling_temp_default = ilog2(1),
> +       .oversampling_press_default = ilog2(8),

It's a very interesting way of writing BIT(x)...

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ