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: <20150630182844.0A69AC40970@trevor.secretlab.ca>
Date:	Tue, 30 Jun 2015 19:28:44 +0100
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Tomeu Vizoso <tomeu.vizoso@...labora.com>,
	linux-kernel@...r.kernel.org
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Mark Brown <broonie@...nel.org>,
	Tomeu Vizoso <tomeu.vizoso@...labora.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v1 08/10] device property: add fwnode_is_compatible()

On Tue, 30 Jun 2015 16:55:06 +0200
, Tomeu Vizoso <tomeu.vizoso@...labora.com>
 wrote:
> This is being added so code that is independent of the firmware being
> used can match firmware nodes to devices.
> 
> This commit only implements it for OF nodes.

Hmmm, if it only works for OF nodes, then how is it firmware
independent? What is the use case?

> 
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
> ---
> 
>  drivers/base/property.c  | 9 +++++++++
>  include/linux/property.h | 2 ++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 92cdbb3..9c8be31 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -585,3 +585,12 @@ const char *fwnode_get_name(struct fwnode_handle *fwnode)
>  	return NULL;
>  }
>  EXPORT_SYMBOL_GPL(fwnode_get_name);
> +
> +bool fwnode_is_compatible(struct fwnode_handle *fwnode, const char *compatible)
> +{
> +	if (is_of_node(fwnode))
> +		return of_device_is_compatible(to_of_node(fwnode), compatible);
> +
> +	return false;
> +}
> +EXPORT_SYMBOL_GPL(fwnode_is_compatible);
> diff --git a/include/linux/property.h b/include/linux/property.h
> index cfd1eb2..bf10074 100644
> --- a/include/linux/property.h
> +++ b/include/linux/property.h
> @@ -80,6 +80,8 @@ const char *fwnode_get_name(struct fwnode_handle *fwnode);
>  
>  void fwnode_handle_put(struct fwnode_handle *fwnode);
>  
> +bool fwnode_is_compatible(struct fwnode_handle *fwnode, const char *compatible);
> +
>  unsigned int device_get_child_node_count(struct device *dev);
>  
>  static inline bool device_property_read_bool(struct device *dev,
> -- 
> 2.4.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ