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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZHtENLuHKixK884F@surfacebook>
Date:   Sat, 3 Jun 2023 16:46:28 +0300
From:   andy.shevchenko@...il.com
To:     Astrid Rost <astrid.rost@...s.com>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...s.com,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Mathieu Othacehe <m.othacehe@...il.com>
Subject: Re: [PATCH v5 4/7] iio: light: vcnl4000: add illuminance irq
 vcnl4040/4200

Tue, May 30, 2023 at 04:24:02PM +0200, Astrid Rost kirjoitti:
> Add support to configure ambient light sensor interrupts and threshold
> limits for vcnl4040 and vcnl4200. If an interrupt is detected an event
> will be pushed to the event interface.

...

> -	int ret;
> +	int ret = -EINVAL;

What is the purpose of this change?

...

> -	int ret;
> +	int ret = -EINVAL;

Ditto.


...

>  	int ret;
>  	struct vcnl4000_data *data = iio_priv(indio_dev);
> +	switch (chan->type) {

Had you run checkpatch.pl? A definition block and a code should be delimited
by a blank line.

...

> -	int ret;
> +	int ret = -EINVAL;

Purpose?

...

> -	val = state ? (ret | mask) : (ret & ~mask);
> +		val = state ? (ret | mask) : (ret & ~mask);

I'm wondering if you can prepere the code by introducing switch-case instead of
current implementation in the preparatory patch and then do what you want to do
here. It will show much better the change and make review easier.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ