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:	Fri, 10 Jul 2015 03:49:25 -0700
From:	Joe Perches <joe@...ches.com>
To:	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:	linux-arm-kernel@...ts.infradead.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Rob Herring <robh+dt@...nel.org>,
	Kumar Gala <galak@...eaurora.org>,
	Mark Brown <broonie@...nel.org>, s.hauer@...gutronix.de,
	linux-api@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	arnd@...db.de, sboyd@...eaurora.org,
	pantelis.antoniou@...sulko.com, mporter@...sulko.com,
	stefan.wahren@...e.com, wxt@...k-chips.com
Subject: Re: [PATCH v7 3/9] nvmem: Add nvmem_device based consumer apis.

On Fri, 2015-07-10 at 10:45 +0100, Srinivas Kandagatla wrote:
> This patch adds read/write apis which are based on nvmem_device.

More trivia:

> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c

> +static struct nvmem_device *nvmem_find(const char *name)
> +{
> +	struct device *d;
> +
> +	d = bus_find_device(&nvmem_bus_type, NULL, (void *)name, nvmem_match);
> +
> +	return d ? to_nvmem_device(d) : NULL;

Maybe:
	d = bus_find_device(...);
	if (!d)
		return NULL;

	return to_nvmem_device(d);

> +struct nvmem_device *of_nvmem_device_get(struct device_node *np, const char *id)
> +{
[]
> +	return __nvmem_device_get(nvmem_np, NULL, NULL);
> +

odd blank line
> +}
> +EXPORT_SYMBOL_GPL(of_nvmem_device_get);

> +struct nvmem_device *nvmem_device_get(struct device *dev, const char *dev_name)
> +{
[]
> +	return nvmem_find(dev_name);
> +

here too

> +}
> +EXPORT_SYMBOL_GPL(nvmem_device_get);

[]

> +void devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem)
> +{
> +	int ret;
> +
> +	ret = devres_release(dev, devm_nvmem_device_release,
> +			     devm_nvmem_device_match, nvmem);
> +
> +	WARN_ON(ret);
> +

Last unnecessary blank line I'll mention
(it seems to be the last one anyway)

> +}
> +EXPORT_SYMBOL_GPL(devm_nvmem_device_put);


--
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