Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1631689pxb; Thu, 4 Mar 2021 17:00:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8Mos0HCStPMJwpxWLTLDmSOyYTSEqw3EP2+XNFoSH23OTEInDJgDZRdBQPNtrjZK2CFVi X-Received: by 2002:a05:6e02:1284:: with SMTP id y4mr6530090ilq.146.1614906037623; Thu, 04 Mar 2021 17:00:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614906037; cv=none; d=google.com; s=arc-20160816; b=oc0+Krar5gCVPgnRTGYT8TXBg4z7iVw/2XOe0VzWZNzhYvokU57QjtB5R0AueUB6JL lnmdHNphMka/279gsq2GejHw9CKoMgumOCm7Pvhv0H4Fv5xTQfybdIFqyNaFPDArBYxj 7tJLHU1a6X4fEtsD8IDwe9C6+jfIHoYY+cZX6vsrZL48EzmRMoNsm+QY00sCpkfcYPgN kaeGOIKtn4czyRbaOkDstfbDozCKrqIMnEkyzzUST/Qihxxcytyg52Oq3SmF0+LenGuU x7qEJaYSU8Tg4LSmY2zqxHgmFVZMZ3VmBhX4TP0WKF1gkSYrE3q2U7U+E0y9+f43UK2l TPpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=37iD5p6Fe0539waJP49VHdVUFPJMsvQsV5zdDgtwvZc=; b=CquMrxb+RdGVwjrG7UYI5l4bXCZlW6pnnONrkRlhugLCNCvfjCpouyPvDsjFXaPRCm 2LjrupFK9lQrT4VcmbiSU3oHacpXQ2T+qbWfe2yvJ+8oGgpRVMGyDCbMBz8zEtqfm6N/ aaBdbMF28nKg7dOx1aRmiFAxC4hVbv3304jxnGB3vRQDZ1m33Ahf2FqWXd2DorvWNmVb rDbG5RGDaIIO+vQ+LeHly5Z9Eo7FcYoRoIe0nfGk6J/Lio6FA/QjKoLj91zeQcx1jqzU v9txLSUiGZLQpdJQYPtYoHjhvAdIciDPuG2xnjtvWGE3Ss1k3K0pAncW9lPNpddCti8f UraQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XQfwlPeo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id a8si832549ilj.125.2021.03.04.17.00.24; Thu, 04 Mar 2021 17:00:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XQfwlPeo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231351AbhCDW3X (ORCPT + 99 others); Thu, 4 Mar 2021 17:29:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:55866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbhCDW3X (ORCPT ); Thu, 4 Mar 2021 17:29:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A024164FF4; Thu, 4 Mar 2021 22:29:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614896962; bh=ANwgarss26fhnHtMQx6kZPDetgPDjR7bGCtYWahlg/Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XQfwlPeoowQ9soQkxXtQOpFfuiwnfosGn+xFjVB8aJ/JGgfx5BhuMvaCj9VfRg9d2 iIHF4gmkfIG2J0MEi1JhYjHQOFzqUadDKl40wvUBLfo+p1yFeDd1hNee5c4YdBd3Jf pUgDk65LdRHx5tP6CKcQOKReQMH2xqLWjqYKhBNl/sw786tXNG3BJIqTWHgMPtcxtx 4XfF3xGUlx36SoifC5FZVxJscC7ODiBgtiHz9mT8mJelMlrf3tQOybZDB6tjRk94dl V5wjlX3EttoInTx779Z/h59tyjyz3ulpQMJrbghFayktiBRMFkW9h225/BFgt5sqZp ipSzxlBDS4eKQ== Received: by mail-qt1-f178.google.com with SMTP id w6so245706qti.6; Thu, 04 Mar 2021 14:29:22 -0800 (PST) X-Gm-Message-State: AOAM531sI7O7JMoLUGjnRyat6aqdhS2B7DB2xcL4r4HeZx68cOFBOP7t DMHEEISGC9TcfmS7MXX4fF0+3BxGZlbnYxG4kA== X-Received: by 2002:ac8:70d1:: with SMTP id g17mr4802329qtp.380.1614896961860; Thu, 04 Mar 2021 14:29:21 -0800 (PST) MIME-Version: 1.0 References: <20210304044803.812204-2-danielwa@cisco.com> <2b0081aa-52af-a4ab-7481-6e125bd103d6@csgroup.eu> <20210304212448.GK109100@zorba> In-Reply-To: <20210304212448.GK109100@zorba> From: Rob Herring Date: Thu, 4 Mar 2021 16:29:09 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/5] CMDLINE: drivers: of: ifdef out cmdline section To: Daniel Walker Cc: Christophe Leroy , Will Deacon , Daniel Gimpelevich , Andrew Morton , X86 ML , "open list:MIPS" , linuxppc-dev , Frank Rowand , xe-linux-external@cisco.com, Ruslan Ruslichenko , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 4, 2021 at 3:24 PM Daniel Walker wrote: > > On Thu, Mar 04, 2021 at 08:09:52AM +0100, Christophe Leroy wrote: > > > > > > Le 04/03/2021 =C3=A0 05:47, Daniel Walker a =C3=A9crit : > > > 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 =3D of_get_flat_dt_prop(node, "bootargs", &l); > > > + > > > + /* > > > + * The builtin command line will be added here, or it can overrid= e > > > + * with the DT bootargs. > > > + */ > > > + cmdline_add_builtin(data, > > > + ((p !=3D 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. It's an obvious improvement and LGTM.