[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqLDacDPo8VsqTS8otF5WOZgFXvGUNuzAZVEyDG-52zyhw@mail.gmail.com>
Date: Fri, 28 Sep 2018 17:06:02 -0500
From: Rob Herring <robh@...nel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.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 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.
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