Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6597408yba; Tue, 14 May 2019 10:08:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGXNHDVCa9IWCnvCT6xPdGj1fv9Kvtht//qjrAUJIU2EO2n2QvSUDxUnkleAGsoDzaFA2N X-Received: by 2002:a17:902:e9:: with SMTP id a96mr12404939pla.37.1557853729862; Tue, 14 May 2019 10:08:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557853729; cv=none; d=google.com; s=arc-20160816; b=JnJBh70iZWpyEQiXx2Pt4iId0tC0ViSwbmqWN/JCRnVKDjpxgsmfPNCpXv4JposQD7 BE9zfEahNf/5d6MyaErqTx91p4EQ0RtjhEUh++cO9QBqxKgKbkRh5Hal9krZmlIsiRuT 92jjBZrhTfdj2VtNox8UD0Aku5D0X0/esKfXdAGX7wJXzNjSMeWST2Nw3iC4UHd7y/JG AeF2fEUtXJ4JWpzCGhC1ZatRd6kMoWt8mjqzHO2XyxiEp83nIxfc05a61wWf1D/qR2bd nYfegUOK4R6JX5RsbIhoLP75rLr71/v9k8HYGQ3n32/wbE3JEEOllmsD03RMSEh2YkB5 b9iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FMG8hYj8oLiihcVpzfYQPTr1akDEU8YE2dY314AElLk=; b=yNdDWf4/oLQv/ibY11tFDidrVfSkqYWcEmgWo677HvNF76Pt+wBp2z8o3apFanGOWW Q+mXacCzFVih/XTq82x3i79i4rMMqYQmgT0OFOxvcaI0NZICd6VHS8zePNUspCLTP8ZE mk8j1q2X5iY+iPzyH/PJywjMj4erVFpVjm3j/gOn1r9B9ktblsWDBA5gh24gH1Zw4f3E BCoGRLj2Hv89fb7PHPBPsH9Ne1FY3stqgKO5m8h2B9XncW/quaz1Hi2CgRed5j1Wz9pb HHN3KTEbesbeVCPZZUzSgy59B/N2unZZJM26/yqjkr3gEVhtvTwGeEzQWAAlPFVsUy2r DjKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0jC7UTr5; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si14487975plz.280.2019.05.14.10.08.34; Tue, 14 May 2019 10:08:49 -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=@kernel.org header.s=default header.b=0jC7UTr5; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726820AbfENRHG (ORCPT + 99 others); Tue, 14 May 2019 13:07:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:36628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfENRHG (ORCPT ); Tue, 14 May 2019 13:07:06 -0400 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CCE35216FD; Tue, 14 May 2019 17:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557853624; bh=ynl8AFpFEpjI9vrYRvobxmIYCbtOF48tRyFqccv//zc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=0jC7UTr5HM4px+Sfy1o8XrnmDRQhV3GR3xyqaUtsZiWD1U9yFi/kfCt5cODPnixjC Y18nLsql0XLr3UClDjWX8gLmjpdL2joxJLgYLllFC5Kj2PfDbKt62fUR9YaIxEsvXz IZv7apDW+MobPpB1TJiFPar0xjIJi4A0ZnyFe2SI= Received: by mail-qk1-f178.google.com with SMTP id n68so8171207qka.1; Tue, 14 May 2019 10:07:04 -0700 (PDT) X-Gm-Message-State: APjAAAVy39DKyQt7OQ3qTQTGBBhWcivq7rGr2XfDFvpGc+r1L5eZLlUU tdBqbDycm+xKIn+zINwcxGLfWusTBDY/pkCedA== X-Received: by 2002:a37:7982:: with SMTP id u124mr29199541qkc.79.1557853624097; Tue, 14 May 2019 10:07:04 -0700 (PDT) MIME-Version: 1.0 References: <20190509215538.93346-1-swboyd@chromium.org> In-Reply-To: <20190509215538.93346-1-swboyd@chromium.org> From: Rob Herring Date: Tue, 14 May 2019 12:06:48 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] of/fdt: Remove dead code and mark functions with __init To: Stephen Boyd Cc: Frank Rowand , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, Hsin-Yi Wang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 9, 2019 at 4:55 PM Stephen Boyd wrote: > > Some functions in here are never called, and others are only called > during __init. Remove the dead code and some dead exports for functions > that don't exist (I'm looking at you of_fdt_get_string!). Mark some > functions with __init so we can throw them away after we boot up and > poke at the FDT blob too. Some of these aren't called, but there are cases where they could be used instead of accessing initial_boot_params directly. The question is what direction do we want to go. Make initial_boot_params private or do away with the wrapper api and expect users to use libfdt api only. I guess I lean toward the latter because that aligns with my goal to move all the code in drivers/of/ somewhere else so I have nothing to maintain. :) > > Cc: Hsin-Yi Wang > Signed-off-by: Stephen Boyd > --- > .../devicetree/bindings/common-properties.txt | 4 +- > drivers/of/fdt.c | 37 +++---------------- > include/linux/of_fdt.h | 11 ------ > 3 files changed, 7 insertions(+), 45 deletions(-) > > diff --git a/Documentation/devicetree/bindings/common-properties.txt b/Documentation/devicetree/bindings/common-properties.txt > index a3448bfa1c82..1c50d8700ab5 100644 > --- a/Documentation/devicetree/bindings/common-properties.txt > +++ b/Documentation/devicetree/bindings/common-properties.txt > @@ -25,8 +25,8 @@ Optional properties: > If a binding supports these properties, then the binding should also > specify the default behavior if none of these properties are present. > In such cases, little-endian is the preferred default, but it is not > -a requirement. The of_device_is_big_endian() and of_fdt_is_big_endian() > -helper functions do assume that little-endian is the default, because > +a requirement. The of_device_is_big_endian() Hum, we shouldn't have kernel functions in binding docs. Can you reword to remove both functions. > +helper function assumes that little-endian is the default, because > most existing (PCI-based) drivers implicitly default to LE by using > readl/writel for MMIO accesses. >