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, 8 Jul 2017 22:55:03 +0200
From:   Peter Rosin <peda@...ntia.se>
To:     sathyanarayanan.kuppuswamy@...ux.intel.com
Cc:     linux-kernel@...r.kernel.org, sathyaosid@...il.com
Subject: Re: [PATCH v1 1/1] mux: consumer: Add dummy functions for
 !CONFIG_MULTIPLEXER case

On 2017-07-07 23:41, sathyanarayanan.kuppuswamy@...ux.intel.com wrote:
> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
> 
> Add dummy functions to avoid compile time issues when CONFIG_MULTIPLEXER
> is not enabled.

Hi!

Consumers should "select MULTIPLEXER", so this does not make sense.
Or do you have a driver that has an optional mux consumer?

> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
> ---
>  include/linux/mux/consumer.h | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/include/linux/mux/consumer.h b/include/linux/mux/consumer.h
> index 5577e1b..744a5b8 100644
> --- a/include/linux/mux/consumer.h
> +++ b/include/linux/mux/consumer.h
> @@ -16,6 +16,7 @@
>  struct device;
>  struct mux_control;
>  
> +#ifdef CONFIG_MULTIPLEXER
>  unsigned int mux_control_states(struct mux_control *mux);
>  int __must_check mux_control_select(struct mux_control *mux,
>  				    unsigned int state);
> @@ -29,4 +30,41 @@ void mux_control_put(struct mux_control *mux);
>  struct mux_control *devm_mux_control_get(struct device *dev,
>  					 const char *mux_name);
>  
> +#else
> +unsigned int mux_control_states(struct mux_control *mux)

static inline

Cheers,
peda

> +{
> +	return -ENODEV;
> +}
> +
> +int __must_check mux_control_select(struct mux_control *mux,
> +				    unsigned int state)
> +{
> +	return -ENODEV;
> +}
> +
> +int __must_check mux_control_try_select(struct mux_control *mux,
> +					unsigned int state)
> +{
> +	return -ENODEV;
> +}
> +
> +int mux_control_deselect(struct mux_control *mux)
> +{
> +	return -ENODEV;
> +}
> +
> +struct mux_control *mux_control_get(struct device *dev, const char *mux_name)
> +{
> +	return ERR_PTR(-ENODEV);
> +}
> +
> +void mux_control_put(struct mux_control *mux) {}
> +
> +struct mux_control *devm_mux_control_get(struct device *dev,
> +					 const char *mux_name)
> +{
> +	return ERR_PTR(-ENODEV);
> +}
> +#endif
> +
>  #endif /* _LINUX_MUX_CONSUMER_H */
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ