Re: [PATCH v4 09/18] of: overlay: validate overlay properties #address-cells and #size-cells
From: Frank Rowand <hidden>
Date: 2018-10-18 19:13:09
Also in:
linux-devicetree, linux-fpga, lkml
From: Frank Rowand <hidden>
Date: 2018-10-18 19:13:09
Also in:
linux-devicetree, linux-fpga, lkml
On 10/18/18 11:13, Rob Herring wrote:
On Mon, Oct 15, 2018 at 07:37:29PM -0700, frowand.list@gmail.com wrote:quoted
From: Frank Rowand <redacted> If overlay properties #address-cells or #size-cells are already in the live devicetree for any given node, then the values in the overlay must match the values in the live tree. If the properties are already in the live tree then there is no need to create a changeset entry to add them since they must have the same value. This reduces the memory used by the changeset and eliminates a possible memory leak. This is verified by 12 fewer warnings during the devicetree unittest, as the possible memory leak warnings about #address-cells andStill missing the rest... And what about my other comments too?
Apologies, paper bag. Will fix all. -Frank
quoted
Signed-off-by: Frank Rowand <redacted> --- Changes since v3: - for errors of an overlay changing the value of #size-cells or #address-cells, return -EINVAL so that overlay apply will fail - for errors of an overlay changing the value of #size-cells or #address-cells, make the message more direct. Old message: OF: overlay: ERROR: overlay and/or live tree #size-cells invalid in node /soc/base_fpga_region New message: OF: overlay: ERROR: changing value of /soc/base_fpga_region/#size-cells not allowed drivers/of/overlay.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-)