Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750993AbeABP6f (ORCPT + 1 other); Tue, 2 Jan 2018 10:58:35 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:43920 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeABP6d (ORCPT ); Tue, 2 Jan 2018 10:58:33 -0500 X-Google-Smtp-Source: ACJfBovc436YLg/jR5Ij8qVFV1982OdOl05eCAb6/klgq95SR6YYpC6FNdEGC778dCpkLOklk3FEE4GgAIZN8aB98To= MIME-Version: 1.0 In-Reply-To: <20180102150848.11314-8-paul@crapouillou.net> References: <20180102150848.11314-1-paul@crapouillou.net> <20180102150848.11314-8-paul@crapouillou.net> From: PrasannaKumar Muralidharan Date: Tue, 2 Jan 2018 21:28:31 +0530 Message-ID: Subject: Re: [PATCH v5 08/15] MIPS: ingenic: Use common cmdline handling code To: Paul Cercueil Cc: Ralf Baechle , Maarten ter Huurne , devicetree@vger.kernel.org, open list , linux-mips@linux-mips.org, linux-clk@vger.kernel.org, Paul Burton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Paul, On 2 January 2018 at 20:38, Paul Cercueil wrote: > From: Paul Burton > > jz4740_init_cmdline appends all arguments from argv (in fw_arg1) to > arcs_cmdline, up to argc (in fw_arg0). The common code in > fw_init_cmdline will do the exact same thing when run on a system where > fw_arg0 isn't a pointer to kseg0 (it'll also set _fw_envp but we don't > use it). Remove the custom implementation & use the generic code. > > Signed-off-by: Paul Burton > --- > arch/mips/jz4740/prom.c | 24 ++---------------------- > 1 file changed, 2 insertions(+), 22 deletions(-) > > v2: No change > v3: No change > v4: No change > v5: No change > > diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c > index 47e857194ce6..a62dd8e6ecf9 100644 > --- a/arch/mips/jz4740/prom.c > +++ b/arch/mips/jz4740/prom.c > @@ -20,33 +20,13 @@ > #include > > #include > +#include > #include > > -static __init void jz4740_init_cmdline(int argc, char *argv[]) > -{ > - unsigned int count = COMMAND_LINE_SIZE - 1; > - int i; > - char *dst = &(arcs_cmdline[0]); > - char *src; > - > - for (i = 1; i < argc && count; ++i) { > - src = argv[i]; > - while (*src && count) { > - *dst++ = *src++; > - --count; > - } > - *dst++ = ' '; > - } > - if (i > 1) > - --dst; > - > - *dst = 0; > -} > - > void __init prom_init(void) > { > - jz4740_init_cmdline((int)fw_arg0, (char **)fw_arg1); > mips_machtype = MACH_INGENIC_JZ4740; > + fw_init_cmdline(); > } > > void __init prom_free_prom_memory(void) > -- > 2.11.0 > > Looks good to me. Reviewed-by: PrasannaKumar Muralidharan