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:   Sat, 21 Sep 2019 22:46:59 +0200
From:   Pavel Machek <pavel@...x.de>
To:     pavel@....cz
Cc:     linux-kernel@...r.kernel.org, Phil Reid <preid@...ctromag.com.au>,
        Moritz Fischer <mdf@...nel.org>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 32/79] fpga: altera-ps-spi: Fix getting of optional
 confd gpio

Hi!

> Currently the driver does not handle EPROBE_DEFER for the confd gpio.
> Use devm_gpiod_get_optional() instead of devm_gpiod_get() and return
> error codes from altera_ps_probe().

> @@ -265,10 +265,13 @@ static int altera_ps_probe(struct spi_device *spi)
>  		return PTR_ERR(conf->status);
>  	}
>  
> -	conf->confd = devm_gpiod_get(&spi->dev, "confd", GPIOD_IN);
> +	conf->confd = devm_gpiod_get_optional(&spi->dev, "confd", GPIOD_IN);
>  	if (IS_ERR(conf->confd)) {
> -		dev_warn(&spi->dev, "Not using confd gpio: %ld\n",
> -			 PTR_ERR(conf->confd));
> +		dev_err(&spi->dev, "Failed to get confd gpio: %ld\n",
> +			PTR_ERR(conf->confd));
> +		return PTR_ERR(conf->confd);

Will this result in repeated errors in dmesg in case of EPROBE_DEFER?
We often avoid printing such messages in EPROBE_DEFER case.

> +	} else if (!conf->confd) {
> +		dev_warn(&spi->dev, "Not using confd gpio");
>  	}
>  
>  	/* Register manager with unique name */

Best regards,
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ