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: <a8af38b8-37c9-fc54-df2d-cf2403ac7644@linaro.org>
Date:   Mon, 1 Oct 2018 10:05:16 +0100
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Rob Herring <robh@...nel.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nvmem: Convert to using %pOFn instead of device_node.name



On 28/09/18 23:06, Rob Herring wrote:
> On Mon, Aug 27, 2018 at 8:55 PM Rob Herring <robh@...nel.org> wrote:
>>
>> In preparation to remove the node name pointer from struct device_node,
>> convert printf users to use the %pOFn format specifier.
>>
>> Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
>> Signed-off-by: Rob Herring <robh@...nel.org>
>> ---
>>   drivers/nvmem/core.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> Ping. This has no dependencies, so please apply.

Sorry, Looks like I missed this one!
I already re-based it. I will send it with other fixes to Greg KH soon!

thanks,
--srini
> 
> Rob
> 
>>
>> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
>> index aa1657831b70..6988ee9f11ba 100644
>> --- a/drivers/nvmem/core.c
>> +++ b/drivers/nvmem/core.c
>> @@ -304,6 +304,7 @@ static void nvmem_cell_drop(struct nvmem_cell *cell)
>>          mutex_lock(&nvmem_cells_mutex);
>>          list_del(&cell->node);
>>          mutex_unlock(&nvmem_cells_mutex);
>> +       kfree(cell->name);
>>          kfree(cell);
>>   }
>>
>> @@ -879,7 +880,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,
>>          cell->nvmem = nvmem;
>>          cell->offset = be32_to_cpup(addr++);
>>          cell->bytes = be32_to_cpup(addr);
>> -       cell->name = cell_np->name;
>> +       cell->name = kasprintf(GFP_KERNEL, "%pOFn", cell_np);
>>
>>          addr = of_get_property(cell_np, "bits", &len);
>>          if (addr && len == (2 * sizeof(u32))) {
>> @@ -904,6 +905,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,
>>          return cell;
>>
>>   err_sanity:
>> +       kfree(cell->name);
>>          kfree(cell);
>>
>>   err_mem:
>> --
>> 2.17.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ