From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2684EC433E0 for ; Thu, 4 Mar 2021 21:25:26 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24FD464FE1 for ; Thu, 4 Mar 2021 21:25:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24FD464FE1 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=cisco.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Ds3mz5kH1z3dBV for ; Fri, 5 Mar 2021 08:25:23 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256 header.s=iport header.b=cMWrdirE; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=cisco.com (client-ip=173.37.142.88; helo=alln-iport-1.cisco.com; envelope-from=danielwa@cisco.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=cisco.com header.i=@cisco.com header.a=rsa-sha256 header.s=iport header.b=cMWrdirE; dkim-atps=neutral Received: from alln-iport-1.cisco.com (alln-iport-1.cisco.com [173.37.142.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Ds3mR4GPpz3cXL for ; Fri, 5 Mar 2021 08:24:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1694; q=dns/txt; s=iport; t=1614893095; x=1616102695; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=9ULi3lxtKwy2ziPDY/q6Yuz9DuWL9aXRDve/CHdZaFA=; b=cMWrdirEiivdcc5nfG+kpeZQeN4uMoLwsN0yWi9ziHAdSTaY0/YsWVet PIEHvMI56wkSWOKUXkUEm9z1UvgvppoukJAniJhRKXWIfcmoXC5NBEDg0 /BO0QpQh/gtQlbjhTlYnsnxauLe2O1g1JQIJNT20DvadoDnh5Un9YPfUa 4=; X-IPAS-Result: =?us-ascii?q?A0AVAABfTkFgmIcNJK1iHAEBAQEBAQcBARIBAQQEAQFAg?= =?us-ascii?q?TwGAQELAYN2ATkxlh6PehaKP4F8CwEBAQ0BATQEAQGBFIM0AwICgXoCJTUID?= =?us-ascii?q?gIDAQEBAwIDAQEBAQUBAQECAQYEFAEBAQEBAQEBhkOGRQEFMgFGEAsYLjwbB?= =?us-ascii?q?hOCcIMIrhJ0gTSJH4FEFA6BFgGNQiYcgUlCgRGDGj6KMwSCQAeBDoIoEpN7i?= =?us-ascii?q?i6be4MGgR+acjEQo0a2cgIEBgUCFoFWATWBWTMaCBsVgyRQGQ2OOI5QIAMvO?= =?us-ascii?q?AIGAQkBAQMJjBMBAQ?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="5.81,223,1610409600"; d="scan'208";a="656967522" Received: from alln-core-2.cisco.com ([173.36.13.135]) by alln-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 04 Mar 2021 21:24:51 +0000 Received: from zorba ([10.24.1.42]) by alln-core-2.cisco.com (8.15.2/8.15.2) with ESMTPS id 124LOnLb005860 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Mar 2021 21:24:50 GMT Date: Thu, 4 Mar 2021 13:24:48 -0800 From: Daniel Walker To: Christophe Leroy Subject: Re: [PATCH 2/5] CMDLINE: drivers: of: ifdef out cmdline section Message-ID: <20210304212448.GK109100@zorba> References: <20210304044803.812204-2-danielwa@cisco.com> <2b0081aa-52af-a4ab-7481-6e125bd103d6@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2b0081aa-52af-a4ab-7481-6e125bd103d6@csgroup.eu> X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.24.1.42, [10.24.1.42] X-Outbound-Node: alln-core-2.cisco.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ob Herring , Ruslan Ruslichenko , Daniel Gimpelevich , Frank Rowand , devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , xe-linux-external@cisco.com, Andrew Morton , Will Deacon Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Mar 04, 2021 at 08:09:52AM +0100, Christophe Leroy wrote: > > > Le 04/03/2021 à 05:47, Daniel Walker a écrit : > > It looks like there's some seepage of cmdline stuff into > > the generic device tree code. This conflicts with the > > generic cmdline implementation so I remove it in the case > > when that's enabled. > > > > Cc: xe-linux-external@cisco.com > > Signed-off-by: Ruslan Ruslichenko > > Signed-off-by: Daniel Walker > > --- > > drivers/of/fdt.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c > > index feb0f2d67fc5..cfe4f8d3c9f5 100644 > > --- a/drivers/of/fdt.c > > +++ b/drivers/of/fdt.c > > @@ -25,6 +25,7 @@ > > #include > > #include > > #include > > +#include > > #include /* for COMMAND_LINE_SIZE */ > > #include > > @@ -1048,8 +1049,18 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, > > early_init_dt_check_for_initrd(node); > > +#ifdef CONFIG_GENERIC_CMDLINE > > /* Retrieve command line */ > > p = of_get_flat_dt_prop(node, "bootargs", &l); > > + > > + /* > > + * The builtin command line will be added here, or it can override > > + * with the DT bootargs. > > + */ > > + cmdline_add_builtin(data, > > + ((p != NULL && l > 0) ? p : NULL), /* This is sanity checking */ > > Can we do more simple ? If p is NULL, p is already NULL, so (l > 0 ? p : NULL) should be enough. I believe Rob gave me this line. Maybe he can comment on it. Daniel