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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 F2F77C433E6 for ; Tue, 9 Mar 2021 07:37:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C2525652B2 for ; Tue, 9 Mar 2021 07:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbhCIHhK (ORCPT ); Tue, 9 Mar 2021 02:37:10 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:40610 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbhCIHgp (ORCPT ); Tue, 9 Mar 2021 02:36:45 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4Dvn8V5RM2z9txlJ; Tue, 9 Mar 2021 08:36:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id fO6AsbOF6a1J; Tue, 9 Mar 2021 08:36:42 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4Dvn8V3Bz5z9txlH; Tue, 9 Mar 2021 08:36:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 763338B7CE; Tue, 9 Mar 2021 08:36:43 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id m52LPb2e7w7l; Tue, 9 Mar 2021 08:36:43 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A20F08B773; Tue, 9 Mar 2021 08:36:42 +0100 (CET) Subject: Re: [PATCH v2 2/7] CMDLINE: drivers: of: ifdef out cmdline section To: Daniel Walker , Will Deacon , Rob Herring , Daniel Gimpelevich , Andrew Morton , x86@kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, xe-linux-external@cisco.com, Rob Herring , Frank Rowand Cc: Ruslan Ruslichenko , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210309000247.2989531-3-danielwa@cisco.com> From: Christophe Leroy Message-ID: Date: Tue, 9 Mar 2021 08:36:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210309000247.2989531-3-danielwa@cisco.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 09/03/2021 à 01:02, 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..e25240d84632 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 > @@ -1050,6 +1051,16 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, > > /* Retrieve command line */ > p = of_get_flat_dt_prop(node, "bootargs", &l); > + > +#ifdef CONFIG_GENERIC_CMDLINE > + /* > + * The builtin command line will be added here, or it can override > + * with the DT bootargs. > + */ > + cmdline_add_builtin(data, > + (l > 0 ? p : NULL), /* This is sanity checking */ > + COMMAND_LINE_SIZE); I don't think the comment is needed. Without the comment, it should fit on a single line, would be better for readability and grepability. > +#else > if (p != NULL && l > 0) > strlcpy(data, p, min(l, COMMAND_LINE_SIZE)); > > @@ -1070,6 +1081,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, > strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); > #endif > #endif /* CONFIG_CMDLINE */ > +#endif /* CONFIG_GENERIC_CMDLINE */ > > pr_debug("Command line is: %s\n", (char *)data); > > Christophe 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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 CC97CC4332E for ; Tue, 9 Mar 2021 07:37:11 +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 EF76C65295 for ; Tue, 9 Mar 2021 07:37:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF76C65295 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu 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 4Dvn913CJ6z30Mm for ; Tue, 9 Mar 2021 18:37:09 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=csgroup.eu (client-ip=93.17.236.30; helo=pegase1.c-s.fr; envelope-from=christophe.leroy@csgroup.eu; receiver=) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) (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 4Dvn8d3qLHz30J0 for ; Tue, 9 Mar 2021 18:36:49 +1100 (AEDT) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4Dvn8V5RM2z9txlJ; Tue, 9 Mar 2021 08:36:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id fO6AsbOF6a1J; Tue, 9 Mar 2021 08:36:42 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4Dvn8V3Bz5z9txlH; Tue, 9 Mar 2021 08:36:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 763338B7CE; Tue, 9 Mar 2021 08:36:43 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id m52LPb2e7w7l; Tue, 9 Mar 2021 08:36:43 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A20F08B773; Tue, 9 Mar 2021 08:36:42 +0100 (CET) Subject: Re: [PATCH v2 2/7] CMDLINE: drivers: of: ifdef out cmdline section To: Daniel Walker , Will Deacon , Rob Herring , Daniel Gimpelevich , Andrew Morton , x86@kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, xe-linux-external@cisco.com, Rob Herring , Frank Rowand References: <20210309000247.2989531-3-danielwa@cisco.com> From: Christophe Leroy Message-ID: Date: Tue, 9 Mar 2021 08:36:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210309000247.2989531-3-danielwa@cisco.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit 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: devicetree@vger.kernel.org, Ruslan Ruslichenko , linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Le 09/03/2021 à 01:02, 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..e25240d84632 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 > @@ -1050,6 +1051,16 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, > > /* Retrieve command line */ > p = of_get_flat_dt_prop(node, "bootargs", &l); > + > +#ifdef CONFIG_GENERIC_CMDLINE > + /* > + * The builtin command line will be added here, or it can override > + * with the DT bootargs. > + */ > + cmdline_add_builtin(data, > + (l > 0 ? p : NULL), /* This is sanity checking */ > + COMMAND_LINE_SIZE); I don't think the comment is needed. Without the comment, it should fit on a single line, would be better for readability and grepability. > +#else > if (p != NULL && l > 0) > strlcpy(data, p, min(l, COMMAND_LINE_SIZE)); > > @@ -1070,6 +1081,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, > strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); > #endif > #endif /* CONFIG_CMDLINE */ > +#endif /* CONFIG_GENERIC_CMDLINE */ > > pr_debug("Command line is: %s\n", (char *)data); > > Christophe