Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2309274imm; Thu, 18 Oct 2018 12:25:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV60zfs3ZFgAsOmu0S5jXz5UDZBnQuQOLiN3uKNU6VIS/aBlV89PMqYmewB/TP5OyrPe2IumO X-Received: by 2002:a65:5bc1:: with SMTP id o1-v6mr30072907pgr.391.1539890703182; Thu, 18 Oct 2018 12:25:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539890703; cv=none; d=google.com; s=arc-20160816; b=0I8boiSaaJrxgWLhOzYfz6u+3XHGB1q1vYeEibEwkO74OPGZDuEW7786H2UCjQGHAm eUG+SWc+EErXHa3mIo7DwLrr5VdCZW+zGKeg37qxdjc8Oiavs/CGAYioEhFfsIqI9Tk+ HOV4TxrSD10uo3o4HaGLt6rOgzX1I1S46tTcN5RvvlzztC+3chS3o0uqYs9NYpylwwV0 xofzLM4m4sZhfkn4eHso0XoyPuF7tYYJ75Xe2VDc+vwJZw40pAIqYBYxrdfbSENRW5YP cMP5yabmJ4cYJD0R7ECQ5lt7IpwaRNTj9nRYMWSTVU2h5RJrp0qdFBG75hxPGJuYvlhm 7dVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=QF/LrY7iuL/AJgxskEfZ1z5Dz2J5Os8EfJ/RaKbgPVQ=; b=OCVhp6mdN79sIHiIFhG83XjeWkVuYeXEPRWcfN/EmnYvZGvBAKpjkoUDRoz9Kr9c8X 9nbm46SOlNwuAKjRevh2FaUe2b3+hmIIDm1ZeEM4kF1Y76UKnX3P999LWMwalLo9hWOY /6EU+jJyvmsFPu7whb/gPef9ZXzdblJ9tiTc7ale/gMMYr7XeBafFT0kpVRaELOwrwNr SsNOiC1c5tXvSJ8ubIn/9QLYSD4DCAvPN0oNmBUWESgg2qYSmEFRqxc9dtHaSdQJ/n6I /yN8z3am7rzC1pUtRcwGY4pSUOoAJDDCDRTSIs7Zsnv5DZIkSYWtDTcwWJzE1Ck/tiFG MXWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pnFY9ePt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si22058411pgs.110.2018.10.18.12.24.46; Thu, 18 Oct 2018 12:25:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pnFY9ePt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbeJSDPc (ORCPT + 99 others); Thu, 18 Oct 2018 23:15:32 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:39599 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbeJSDPc (ORCPT ); Thu, 18 Oct 2018 23:15:32 -0400 Received: by mail-pl1-f195.google.com with SMTP id e67-v6so5756614plb.6; Thu, 18 Oct 2018 12:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QF/LrY7iuL/AJgxskEfZ1z5Dz2J5Os8EfJ/RaKbgPVQ=; b=pnFY9ePt8LIwvV6bnejjjQHDnPGo/nBouYD0Rck4HJJi+YgAg8NNgD1IDPLbVb8Rkf 9xUDJG5d4tiBLNSPC8+E4YDl6W1bZ2H5NhOeNpOKVXfDUdzQVSLutECVh/uCOgBbExbs JoEqOUIW9JtJvYC3TRehXL/UuEn5L9ie7LZv/fcWjd3Nuei/wioLqtNc/74DY2BQcsxO O8vXEda8QnWmCbg3Xb+K0pvm28qiT30XatVvl2TdKn3Wfece4HqGm1Nd2kXk6+4SzirB PEJ4Uk1iS6ngMThTPQ3W6m/YnMRFzQm74LCS8GgsUCyThooXYZc1bluvbakwuE8TXo5K dohg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QF/LrY7iuL/AJgxskEfZ1z5Dz2J5Os8EfJ/RaKbgPVQ=; b=SHXYBMcApZ+FK08bc+kspHa4NKd6YYIDqNL0uSCQNoPJvroWFbuHiSUJELk83Zh4bm HQTPJrQZnrOAyK8cVf1iT1gxGU0kyV7P1cv6mHgq33HyIlOnUwCCcppIMzxrVjFSiOJy 49Wo9U5g/BZitFZIdl/jO12LbpSmAl0lCjLCYXXVmVxKTPBieyuUkozcRgYitaA9D3k6 FrLna1uBUbXaxcyKYYPnJ5UhDrsYndNwB6Z5S9VYs3pj7marGiRV79WbyFXQ1MdlIfbs 9MPBswQRgGZWlCL/ExXsit/rP36JdamqSKoxQ04oDYR68O+TRvFGoa3xDs99X35d2XSi tGdw== X-Gm-Message-State: ABuFfohTJ5DG2VPp2iMLcCUBYWSLMNb6+bpuZfcfQjhbhbtQ5gf8QOCf GJVYJnEKqD/lHjmW5FxZ0g8= X-Received: by 2002:a17:902:bf44:: with SMTP id u4-v6mr2975568pls.48.1539889986567; Thu, 18 Oct 2018 12:13:06 -0700 (PDT) Received: from [192.168.1.70] (c-24-6-192-50.hsd1.ca.comcast.net. [24.6.192.50]) by smtp.gmail.com with ESMTPSA id 25-v6sm45982117pfm.36.2018.10.18.12.13.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 12:13:06 -0700 (PDT) Subject: Re: [PATCH v4 09/18] of: overlay: validate overlay properties #address-cells and #size-cells To: Rob Herring Cc: Pantelis Antoniou , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Alan Tull , Moritz Fischer , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-fpga@vger.kernel.org References: <1539657458-24401-1-git-send-email-frowand.list@gmail.com> <1539657458-24401-10-git-send-email-frowand.list@gmail.com> <20181018181338.GD15557@bogus> From: Frank Rowand Message-ID: Date: Thu, 18 Oct 2018 12:13:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181018181338.GD15557@bogus> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/18 11:13, Rob Herring wrote: > On Mon, Oct 15, 2018 at 07:37:29PM -0700, frowand.list@gmail.com wrote: >> From: Frank Rowand >> >> 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 and > > Still missing the rest... > > And what about my other comments too? Apologies, paper bag. Will fix all. -Frank > >> >> Signed-off-by: Frank Rowand >> --- >> 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(-) >