Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703544

Re: [PATCH v2 1/5] of/platform: Generalize /reserved-memory handling

From Bjorn Andersson <bjorn.andersson@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/5] of/platform: Generalize /reserved-memory handling
Date 2017-08-04 01:40 +0200
Message-ID <uaxSG-7aD-15@gated-at.bofh.it> (permalink)
References <uaewF-224-7@gated-at.bofh.it> <uaewG-224-21@gated-at.bofh.it> <uaspZ-3iy-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu 03 Aug 10:40 PDT 2017, Rob Herring wrote:

> On Wed, Aug 2, 2017 at 9:57 PM, Bjorn Andersson
> <bjorn.andersson@linaro.org> wrote:
> > diff --git a/drivers/of/platform.c b/drivers/of/platform.c
[..]
> > +       rmem_nodes = of_find_node_by_path("/reserved-memory");
> > +       for_each_available_child_of_node(rmem_nodes, node) {
> > +               ret = of_device_compatible_match(node, rmem_compats);
> > +               if (ret)
> 
> I would just do:
> 
> for_each_matching_node(node, ...)
>     of_platform_device_create(node, NULL, NULL);
> 
> I don't think the kernel has to validate that ramoops and any others
> we add are children of /reserved-memory. We should only have those
> compatibles located there and any other location would be an error.
> 

Okay, looks reasonable.

Will update and resend once I know your decision on 2/5.

Regards,
Bjorn

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/5] of/platform: Generalize /reserved-memory handling Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-08-03 05:00 +0200
  Re: [PATCH v2 1/5] of/platform: Generalize /reserved-memory handling Rob Herring <robh+dt@kernel.org> - 2017-08-03 19:50 +0200
    Re: [PATCH v2 1/5] of/platform: Generalize /reserved-memory handling Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-08-04 01:40 +0200

csiph-web