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:   Tue, 21 Apr 2020 03:36:15 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Mathieu Othacehe <m.othacehe@...il.com>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald <pmeerw@...erw.net>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/4] iio: vcnl4000: Factorize data reading and writing.

On Mon, Apr 20, 2020 at 11:43 AM Mathieu Othacehe <m.othacehe@...il.com> wrote:
>
> Factorize data reading in vcnl4000_measure into a vcnl4000_read_block_data
> function. Use it to provide a vcnl4000_read_data function that is able to
> read sensor data under lock. Also add a vcnl4000_write_data function.

...

> +       __be16 buf;
> +       int ret;
> +
> +       ret = i2c_smbus_read_i2c_block_data(data->client,

> +               data_reg, sizeof(buf), (u8 *) &buf);

Why do you need casting?

> +       if (ret < 0)
> +               goto end;

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ