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: <17193a42835f41b4352855b1cbd1cb5cf74a6d66.camel@analog.com>
Date:   Wed, 11 Dec 2019 07:26:07 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     "Popa, Stefan Serban" <StefanSerban.Popa@...log.com>,
        "lkcamp@...ts.libreplanetbr.org" <lkcamp@...ts.libreplanetbr.org>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "djunho@...il.com" <djunho@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "pmeerw@...erw.net" <pmeerw@...erw.net>,
        "knaack.h@....de" <knaack.h@....de>,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        "jic23@...nel.org" <jic23@...nel.org>,
        "lars@...afoo.de" <lars@...afoo.de>
Subject: Re: [PATCH v2 1/4] iio: adc: ad7923: Remove the unused defines

On Tue, 2019-12-10 at 12:08 -0300, Daniel Junho wrote:
> [External]
> 
> Removes the unused define AD7923_CHANNEL_x from the code.
> 
> Signed-off-by: Daniel Junho <djunho@...il.com>
> ---
>  drivers/iio/adc/ad7923.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad7923.c b/drivers/iio/adc/ad7923.c
> index 3212eb4c0f25..969c06b7d2b7 100644
> --- a/drivers/iio/adc/ad7923.c
> +++ b/drivers/iio/adc/ad7923.c
> @@ -29,10 +29,6 @@
>  #define AD7923_PM_MODE_AS	(1)		/* auto shutdown */
>  #define AD7923_PM_MODE_FS	(2)		/* full shutdown */
>  #define AD7923_PM_MODE_OPS	(3)		/* normal operation */
> -#define AD7923_CHANNEL_0	(0)		/* analog input 0 */
> -#define AD7923_CHANNEL_1	(1)		/* analog input 1 */
> -#define AD7923_CHANNEL_2	(2)		/* analog input 2 */
> -#define AD7923_CHANNEL_3	(3)		/* analog input 3 */

The fact that is not used, is not a problem really.
This can serve as a "shortcut" for the datasheet.

We can leave this as-is [1], or remove it as you do [2], or an alternative
would be [3]:
#define AD7923_CHANNEL(x)      (x)       /* analog channel input */

I don't mind either of these 3 versions ([1], [2] or [3]).

I'll leave it to Jonathan's preference.

>  #define AD7923_SEQUENCE_OFF	(0)		/* no sequence fonction
> */
>  #define AD7923_SEQUENCE_PROTECT	(2)		/* no interrupt
> write cycle */
>  #define AD7923_SEQUENCE_ON	(3)		/* continuous sequence */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ