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] [day] [month] [year] [list]
Message-ID: <0906195e-0143-991d-7007-56012ddd4729@linaro.org>
Date:   Sat, 25 Nov 2017 14:51:21 +0000
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nvmem: core: switch to device_property_present for
 reading property "read-only"

Thanks for the patch,

On 25/11/17 11:56, Heiner Kallweit wrote:
> Switch to more generic device_property_present to consider also non-DT
> properties.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
>   drivers/nvmem/core.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c

It looks good for me, I will queue it up!

> index 5a5cefd12..ba0e3b453 100644
> --- a/drivers/nvmem/core.c
> +++ b/drivers/nvmem/core.c
> @@ -444,7 +444,6 @@ static int nvmem_setup_compat(struct nvmem_device *nvmem,
>   struct nvmem_device *nvmem_register(const struct nvmem_config *config)
>   {
>   	struct nvmem_device *nvmem;
> -	struct device_node *np;
>   	int rval;
>   
>   	if (!config->dev)
> @@ -473,13 +472,12 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
>   	nvmem->priv = config->priv;
>   	nvmem->reg_read = config->reg_read;
>   	nvmem->reg_write = config->reg_write;
> -	np = config->dev->of_node;
> -	nvmem->dev.of_node = np;
> +	nvmem->dev.of_node = config->dev->of_node;
>   	dev_set_name(&nvmem->dev, "%s%d",
>   		     config->name ? : "nvmem",
>   		     config->name ? config->id : nvmem->id);
>   
> -	nvmem->read_only = of_property_read_bool(np, "read-only") |
> +	nvmem->read_only = device_property_present(config->dev, "read-only") |
>   			   config->read_only;
>   
>   	if (config->root_only)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ