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, 13 May 2014 17:54:01 +0200
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Felipe Balbi <balbi@...com>
Cc:	p.zabel@...gutronix.de, marex@...x.de, wsa@...-dreams.de,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>
Subject: Re: [PATCH] reset: stub out devm_reset_control_get()

On Tue, May 13, 2014 at 10:34:05AM -0500, Felipe Balbi wrote:
> without that stub, drivers will fail to build
> when CONFIG_RESET_CONTROLLER=n.
> 
> Signed-off-by: Felipe Balbi <balbi@...com>
> ---
>  include/linux/reset.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index c0eda50..aa94420 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(
>  	return ERR_PTR(-ENOSYS);
>  }
>  
> +static inline struct reset_control *devm_reset_control_get(
> +					struct device *dev, const char *id)
> +{
> +	return ERR_PTR(-ENOSYS);
> +}
> +

reset_control_get should only be used in cases where the reset
controller is mandatory for the driver to work, and hence, this driver
should select or depend on CONFIG_RESET_CONTROLLER

If the reset controller is optional, reset_control_get_optional should
be preferred, that is stubed out.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ