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>] [day] [month] [year] [list]
Message-ID: <893ced34-306c-b232-06c2-6cf741844b9c@web.de>
Date:   Wed, 3 Jun 2020 20:00:17 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Chuhong Yuan <hslester96@...il.com>, linux-iio@...r.kernel.org
Cc:     Michael Hennerich <Michael.Hennerich@...log.com>,
        Alexandru Ardelean <alexandru.ardelean@...log.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Paul Cercueil <paul.cercueil@...log.com>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] iio: amplifiers: ad8366: Change devm_gpiod_get() to
 optional and add the missed check

> Since if there is no GPIO, nothing happens, replace devm_gpiod_get()
> with devm_gpiod_get_optional().

…
> +++ b/drivers/iio/amplifiers/ad8366.c
> @@ -262,8 +262,12 @@  static int ad8366_probe(struct spi_device *spi)
…
>  	case ID_HMC1119:
> -		st->reset_gpio = devm_gpiod_get(&spi->dev, "reset",
> +		st->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset",
>  			GPIOD_OUT_HIGH);
…

I suggest to choose an other source code formatting for this statement.

A)
+		st->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset",
+							 GPIOD_OUT_HIGH);

B)
+		st->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset", GPIOD_OUT_HIGH);
-			GPIOD_OUT_HIGH);


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ