From patchwork Sat Oct 12 20:43:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Burton X-Patchwork-Id: 11186981 X-Patchwork-Delegate: paulburton@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E5AF76 for ; Sat, 12 Oct 2019 20:43:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2C8B2089C for ; Sat, 12 Oct 2019 20:43:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=wavecomp.com header.i=@wavecomp.com header.b="n6eQMXgH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729594AbfJLUnl (ORCPT ); Sat, 12 Oct 2019 16:43:41 -0400 Received: from mail-eopbgr740101.outbound.protection.outlook.com ([40.107.74.101]:53632 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729516AbfJLUnl (ORCPT ); Sat, 12 Oct 2019 16:43:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gvkPsg5UnoRGnkKYcVxXdxrG4aHBFpYDgye5C9bzXveArYGps7LhBeWeKdBAW+ZNAfNqXiVn+t8TlSGBmeJVBLgdeXyoRDGjk4gCd5EsjTwLwVma7QpD0JLDSozevDMr0vlSyjXgHjCOYaMk/NIMVJzi95AXGjRlZj7Jf9JDph5Y+YUkfMtxZzgt2oB1xiZN2Zwbhr0suYIgtOoWhK3wDTUna/iJbtgRE15Pubahaf9b9HJIDsPdQgPKwEEjd8WTz9X3L+eSUAVBMq5DsdEZkh0rNVNv9SbFzqej4sVbZKrmep4X5IFPyAE+pH9k/E/LAMaX3yBiGDn2bzN5lNx74w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iGs50rnRhhh69vD4kz6lxRknb3HPAQeWn+FYNOPADjw=; b=UEmjUAemLMzE+/bnIA2+RW81Bm6huFCZ+LO2emsqOQ1mAUEVCdzxSUPaSKmFUNA47o5GMFBZEm78fsFoZeMDJSYzFpKmEPwjkmTpNd5An4fIfActWPZHII+Skh0P/dbO8iUv0RTFhKSxUuJeUQ9qFEeG+e8Ypa+mr5/T/kNPCXOV0SpDIHPvNONV6pnz8n9bVLS75GWAgwyRxl1e/i8RoaluObRMyK6DOVbyPVNKrjigUTwnowR8+tzLHJpczLdaOqHC4sCqoxkG+S2mYrQn0f0ex4rCusjyoaY94iNiTe5OPOXU/vJtp14c8a8fSnxD/CRh5+WAtBG+TMnrjZTGIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wavecomp.com; dmarc=pass action=none header.from=mips.com; dkim=pass header.d=mips.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavecomp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iGs50rnRhhh69vD4kz6lxRknb3HPAQeWn+FYNOPADjw=; b=n6eQMXgHlWA2wlrIlWksJvHFXXEuyXCq99Dtt5qV2BCHrPijb/thiTIwn0IWTeTrJ7+579xYXRLC+QCM6gHYZMqIolvPTGtf0HwiTCOmZncJYGTshNmRPuV47tY6DSBISP5B4fqwKiIFOqCAn8vPToXSch2MS7CDqxc03Akxi84= Received: from MWHPR2201MB1277.namprd22.prod.outlook.com (10.172.60.12) by MWHPR2201MB1536.namprd22.prod.outlook.com (10.174.170.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.21; Sat, 12 Oct 2019 20:43:36 +0000 Received: from MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::c1dc:dba3:230c:e7f0]) by MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::c1dc:dba3:230c:e7f0%8]) with mapi id 15.20.2347.021; Sat, 12 Oct 2019 20:43:36 +0000 From: Paul Burton To: "linux-mips@vger.kernel.org" CC: Paul Burton , kbuild test robot , Nathan Chancellor Subject: [PATCH 1/3] MIPS: Always define builtin_cmdline Thread-Topic: [PATCH 1/3] MIPS: Always define builtin_cmdline Thread-Index: AQHVgT248msMlm/E7UGQ68Q2elJDbg== Date: Sat, 12 Oct 2019 20:43:36 +0000 Message-ID: <20191012204326.2564623-1-paul.burton@mips.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0050.namprd02.prod.outlook.com (2603:10b6:a03:54::27) To MWHPR2201MB1277.namprd22.prod.outlook.com (2603:10b6:301:18::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pburton@wavecomp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.23.0 x-originating-ip: [2601:646:8a00:9810:9d6:9cca:ff8c:efe0] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 37ee5bb3-20d1-4277-dad1-08d74f54da84 x-ms-traffictypediagnostic: MWHPR2201MB1536: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 0188D66E61 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(396003)(366004)(136003)(39840400004)(199004)(189003)(25786009)(71190400001)(2351001)(71200400001)(36756003)(256004)(305945005)(6916009)(14454004)(478600001)(4326008)(6116002)(7736002)(1076003)(99286004)(81166006)(81156014)(8676002)(46003)(316002)(5640700003)(42882007)(2616005)(52116002)(8936002)(50226002)(476003)(186003)(102836004)(54906003)(6506007)(386003)(6486002)(2906002)(6436002)(66476007)(66446008)(486006)(66946007)(64756008)(44832011)(2501003)(66556008)(5660300002)(6512007);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR2201MB1536;H:MWHPR2201MB1277.namprd22.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: wavecomp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: N6VWcbYOEhODZJf5O4WzW5AA9ljIu4E4hljyh5eQXrzKsMhA8L4JiltWt8Z6jrP02AatnKs0z+/0vFXyj4ijOiHt1R2u9bitLA3ylVqloQmqXZrybreUmb9dtHNmshaAA61WNzb7LdyzqU/mfFtEf41EaAbCNqESShA39X2UGItsoBdrQ+OajFmOUIyqR0SJJQcvD+nV2xD5SKD+JRfqwdY6ys92ZgfIeZp9w++tAehubFxNlmA+ae7X+U/M7/ZM1r5II6fWrPHLH4MBBQMpJvm4PHbi6q3BUfxI4EslF08fsbSUi8S8kTy3yo922fhsfDClIsvPe5wJNESz/cknb8Tn7cC+Glm2ph6PudR11cLvjENE/VdzkqVX2E89d3OI8sD2F1//+YtLcwUZMf4Zg5P46ZEEeD6qo6rJiT+8h5g= MIME-Version: 1.0 X-OriginatorOrg: mips.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37ee5bb3-20d1-4277-dad1-08d74f54da84 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2019 20:43:36.1839 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 463607d3-1db3-40a0-8a29-970c56230104 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HrbKfKU7s84U5F+arv8Ywo0RCsWuGqYipz+GL4Y27AR3gqtJRqb0BJ/XqcNs6nSaHg8VVI3yGvNXos5VL539DQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR2201MB1536 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Commit 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") made use of builtin_cmdline conditional upon plain C if statements rather than preprocessor #ifdef's. This caused build failures for configurations with CONFIG_CMDLINE_BOOL=n where builtin_cmdline wasn't defined, for example: arch/mips/kernel/setup.c: In function 'bootcmdline_init': >> arch/mips/kernel/setup.c:582:30: error: 'builtin_cmdline' undeclared (first use in this function); did you mean 'builtin_driver'? strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); ^~~~~~~~~~~~~~~ builtin_driver arch/mips/kernel/setup.c:582:30: note: each undeclared identifier is reported only once for each function it appears in Fix this by defining builtin_cmdline as an empty string in the affected configurations. All of the paths that use it should be optimized out anyway so the data itself gets optimized away too. Signed-off-by: Paul Burton Fixes: 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") Reported-by: kbuild test robot Reported-by: Nathan Chancellor --- arch/mips/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 4aeba3122972..119999d31558 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -68,6 +68,8 @@ char __initdata arcs_cmdline[COMMAND_LINE_SIZE]; #ifdef CONFIG_CMDLINE_BOOL static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE; +#else +static const char builtin_cmdline[] __initconst = ""; #endif /* From patchwork Sat Oct 12 20:43:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Burton X-Patchwork-Id: 11186979 X-Patchwork-Delegate: paulburton@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 945B91575 for ; Sat, 12 Oct 2019 20:43:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55470206A1 for ; Sat, 12 Oct 2019 20:43:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=wavecomp.com header.i=@wavecomp.com header.b="Nlb8iXv+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729563AbfJLUnk (ORCPT ); Sat, 12 Oct 2019 16:43:40 -0400 Received: from mail-eopbgr740101.outbound.protection.outlook.com ([40.107.74.101]:53632 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729432AbfJLUnj (ORCPT ); Sat, 12 Oct 2019 16:43:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EwYM6WXS7BWTRW5n1IRR6uEh397XoLWzGMzi2m2uDnVGicX7hMSw8wrB0DimDL9uzIwKomdXoCqAwuqZn4XOZCsJXdxazJDwQUxM8c6k6F39SNXm2p73Qd2RNAAr09J42dM023Pe9s9rnTp5k909mgwn4WTHKzKLzzTrp+DktAfWgAWbED+Tbj3hFEhavhjJ8BQ8hLIkMSQj4bnqQFsdM6zAxyyS4yr+55wYGzRnXZ+if0hpsHdQvn5zC3H8uhKpbTDwiDl/AbwbsJFrM4oQrYBPlr7XYLaMukbFf+r3pn0x4beEBB4Fe0r5hLjPBJMN19X2WEfplt6RvMcPCW0jwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A5sudP7ea20s+qVO30X1cE2JvR0EAHMh+gU8lADVars=; b=FNkmeYgIj/nLrJUQO8DIM2lLuWn2ZTLomVvJNFhbkweQ5TVDYIZMtZSHWPiDtR2hCEdRowhHRERaH8dvZFlWIgdWYEZM9v6oumnnC6pcrYSMf+GePSpjXPB7iVvmEF7G5228Trzxle9bbBCdK0OCNXe5/Kd6kAbL0f1jcKdY6MbhGqi7K6adjn67z1D9zMKWaFbQ7MtshQZEH9Y1pwbYCifeCIh17rTlrnqMddrkcirvhyr7ojm54mGwj6uawkNH38VBlRb9oz1qGLX6lq7xU3Isf8qXG4ta0vLAJnWqREmyH0L9xeVHiz7KUPIKjmiDR6FOPIZhGQwSRquwSJ7l5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wavecomp.com; dmarc=pass action=none header.from=mips.com; dkim=pass header.d=mips.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavecomp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A5sudP7ea20s+qVO30X1cE2JvR0EAHMh+gU8lADVars=; b=Nlb8iXv+/WMfOHiE3281n9ep7k5ONrgaHG5vVpHtupJV6MI8C6pYrqn7fjYivDDim8Im8i9+kDX37o7MKQDNq1KIpmiqRaTxy7BFmNdgWS5UJ2lHbmVzCYE0dMCR/Uy36WPQcKS5f66uy9Qq1Hce/XJdkUiBJu6cWUteXA43yOU= Received: from MWHPR2201MB1277.namprd22.prod.outlook.com (10.172.60.12) by MWHPR2201MB1536.namprd22.prod.outlook.com (10.174.170.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.21; Sat, 12 Oct 2019 20:43:37 +0000 Received: from MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::c1dc:dba3:230c:e7f0]) by MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::c1dc:dba3:230c:e7f0%8]) with mapi id 15.20.2347.021; Sat, 12 Oct 2019 20:43:37 +0000 From: Paul Burton To: "linux-mips@vger.kernel.org" CC: Paul Burton , kbuild test robot Subject: [PATCH 2/3] MIPS: Fix CONFIG_OF_EARLY_FLATTREE=n builds Thread-Topic: [PATCH 2/3] MIPS: Fix CONFIG_OF_EARLY_FLATTREE=n builds Thread-Index: AQHVgT24liWPWOQHqkCXhN4EuapzCg== Date: Sat, 12 Oct 2019 20:43:37 +0000 Message-ID: <20191012204326.2564623-2-paul.burton@mips.com> References: <20191012204326.2564623-1-paul.burton@mips.com> In-Reply-To: <20191012204326.2564623-1-paul.burton@mips.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0050.namprd02.prod.outlook.com (2603:10b6:a03:54::27) To MWHPR2201MB1277.namprd22.prod.outlook.com (2603:10b6:301:18::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pburton@wavecomp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.23.0 x-originating-ip: [2601:646:8a00:9810:9d6:9cca:ff8c:efe0] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 36d6de62-a12c-4fed-6fbd-08d74f54db27 x-ms-traffictypediagnostic: MWHPR2201MB1536: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:89; x-forefront-prvs: 0188D66E61 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(396003)(366004)(136003)(39840400004)(199004)(189003)(25786009)(71190400001)(2351001)(71200400001)(36756003)(256004)(305945005)(6916009)(14454004)(478600001)(4326008)(6116002)(7736002)(1076003)(99286004)(81166006)(81156014)(8676002)(46003)(446003)(316002)(11346002)(5640700003)(42882007)(2616005)(52116002)(8936002)(50226002)(476003)(76176011)(186003)(102836004)(54906003)(6506007)(386003)(6486002)(2906002)(6436002)(66476007)(66446008)(486006)(66946007)(64756008)(44832011)(2501003)(66556008)(5660300002)(6512007);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR2201MB1536;H:MWHPR2201MB1277.namprd22.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: wavecomp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lDubhBXG504qNp3RlscTVYdpoCEV3E3dnqKY/JJNYowKzMuR8xxU46iNms0AZ1fsBK30MNLZzVX7NjTMhWyhl4SBMD1HmCI5vHVGtSCkfKI8gdnTihwOZuZir7hlo5yConRsm/lc7xeOGiKk3Vfg59tQSRPXdveDF0sd0aidwUvEwBcLMPlBH7eiaTSA0ak1sSIqniqefYUKZwZXAUvuZ1zKJkGmT1ymeQan+ZHOwCAmFa13Y8PRMZEK17Z32aM26RFJsvKv5tY+/oA94FCQQlAJVMAI9DhLJ7ijpiDDwGJ9cr8T4eOOVn4yHjUKJeKfjWqJ1E4waFpotWKyFzfA8Q4s83LhgT8PHQ1nmdQxWZjL5TjUXBFZwQSoxqgtXh64wKliq27gmEIXdh+408sVKDrGalzIXFJCkG7M3ayta90= MIME-Version: 1.0 X-OriginatorOrg: mips.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36d6de62-a12c-4fed-6fbd-08d74f54db27 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2019 20:43:37.1955 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 463607d3-1db3-40a0-8a29-970c56230104 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Up6ASVGL8LpGONVVo3wP7bckZzWhp5mjne893wBsJdgcyqmjpsUpVnYWLcsb8FszquD9dzmuikeFebQC9iQizQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR2201MB1536 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Configurations with CONFIG_OF_EARLY_FLATTREE=n fail to build since commit 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") because of_scan_flat_dt() & of_scan_flat_dt() are not defined in these configurations. Fix this by #ifdef'ing the affected code... Signed-off-by: Paul Burton Fixes: 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") Reported-by: kbuild test robot --- arch/mips/kernel/setup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 119999d31558..7ccc8a9e1bfe 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -551,6 +551,8 @@ static void __init bootcmdline_append(const char *s, size_t max) strlcat(boot_command_line, s, max); } +#ifdef CONFIG_OF_EARLY_FLATTREE + static int __init bootcmdline_scan_chosen(unsigned long node, const char *uname, int depth, void *data) { @@ -571,6 +573,8 @@ static int __init bootcmdline_scan_chosen(unsigned long node, const char *uname, return 1; } +#endif /* CONFIG_OF_EARLY_FLATTREE */ + static void __init bootcmdline_init(char **cmdline_p) { bool dt_bootargs = false; @@ -597,12 +601,14 @@ static void __init bootcmdline_init(char **cmdline_p) else boot_command_line[0] = 0; +#ifdef CONFIG_OF_EARLY_FLATTREE /* * If we're configured to take boot arguments from DT, look for those * now. */ if (IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB)) of_scan_flat_dt(bootcmdline_scan_chosen, &dt_bootargs); +#endif /* * If we didn't get any arguments from DT (regardless of whether that's From patchwork Sat Oct 12 20:43:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Burton X-Patchwork-Id: 11186983 X-Patchwork-Delegate: paulburton@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 828DE76 for ; Sat, 12 Oct 2019 20:43:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 622B9206A1 for ; Sat, 12 Oct 2019 20:43:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=wavecomp.com header.i=@wavecomp.com header.b="j4hO+ICG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729516AbfJLUnn (ORCPT ); Sat, 12 Oct 2019 16:43:43 -0400 Received: from mail-eopbgr740101.outbound.protection.outlook.com ([40.107.74.101]:53632 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729432AbfJLUnn (ORCPT ); Sat, 12 Oct 2019 16:43:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gMy5RahR0oOSQfah4t017TuKF7yNXvCQzTog1to3s2h/RrdnPI6neJGs6VZsotC6HCGcCQduTmtBykgtUvKbbW7MsNmn31947s6OqCaDKz1TQTgVWIGGTPqF8g/ky6YK3QTykC5CP/zQgtIKN7zo+nprO0ocvZPfhXwA0rOGhhhqHE3OGH/+S7+F1U2YezU98CVmvGYcpwoMgo9IPJAYaCoKmBsBQ0yxb8HiKodLqbY29FOTxWr45C3ChP/Kp1zBFvabiyXkC1Uu+tgxshPPhAD/+XzsbuNwq/7DAH+Fc12OTJAhJ8IK8m+c2JrCOFD747AYhv5ECd9Owuo4M/W68Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wy+XJkD5468na4b2QAHn5LoazFNJuvrOQEbOsugHHWI=; b=FcRR1xtLlpR99ygHflp/zCacpGaRyR2HVtfw7uT8YaNTNVejacbrkZWl5W8PyFi2Y7XJCWTuYXpRLZMEO4E2UW6/CM/sfl551o0eP1K0h7MhZSlpb+0k70TrCfjob9Qh5AnMdTEUWX7VqA12QYDcX+/XLcnliBS+uDMBfW3DWi2PTJbbQY1uPJdOWLu6LwiLCyWCwfr1JxDfxQUD3oMCMBuNzfp+/EQ4ZuUMmxZ5EZWWcEM5PkilltcxepPLUejQsW4xaPxPoOOrA9ti1uLHCtSGO4cyJ58d78wPalKYaYquwBV0r2HM3YvUO7ErfuZVL8zkGyJLa0rFo0AkRGyLNQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wavecomp.com; dmarc=pass action=none header.from=mips.com; dkim=pass header.d=mips.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavecomp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wy+XJkD5468na4b2QAHn5LoazFNJuvrOQEbOsugHHWI=; b=j4hO+ICGMOHC0Ifz2XXStJStPrfchYEsaMCd63DWlStJZ1bAYFzmqp8fG923B5QxuyOyOGAu3cTUzplYMIvNf0VYo/7u1mdlepG0rJkV7PmnidTGcYKFT2ImRuJV7vXR4zR3zk7FgD97OyiEFHa0Z7GLt7DGAnx2NuJfw6rA8C8= Received: from MWHPR2201MB1277.namprd22.prod.outlook.com (10.172.60.12) by MWHPR2201MB1536.namprd22.prod.outlook.com (10.174.170.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.21; Sat, 12 Oct 2019 20:43:38 +0000 Received: from MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::c1dc:dba3:230c:e7f0]) by MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::c1dc:dba3:230c:e7f0%8]) with mapi id 15.20.2347.021; Sat, 12 Oct 2019 20:43:38 +0000 From: Paul Burton To: "linux-mips@vger.kernel.org" CC: Paul Burton Subject: [PATCH 3/3] MIPS: Make builtin_cmdline const & variable length Thread-Topic: [PATCH 3/3] MIPS: Make builtin_cmdline const & variable length Thread-Index: AQHVgT255dhw8QW2Vki5iYc5OdbMNA== Date: Sat, 12 Oct 2019 20:43:38 +0000 Message-ID: <20191012204326.2564623-3-paul.burton@mips.com> References: <20191012204326.2564623-1-paul.burton@mips.com> In-Reply-To: <20191012204326.2564623-1-paul.burton@mips.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0050.namprd02.prod.outlook.com (2603:10b6:a03:54::27) To MWHPR2201MB1277.namprd22.prod.outlook.com (2603:10b6:301:18::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pburton@wavecomp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.23.0 x-originating-ip: [2601:646:8a00:9810:9d6:9cca:ff8c:efe0] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f9a4a6da-946f-4ebe-d187-08d74f54dbb4 x-ms-traffictypediagnostic: MWHPR2201MB1536: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0188D66E61 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(396003)(366004)(136003)(39840400004)(199004)(189003)(52314003)(25786009)(71190400001)(2351001)(71200400001)(14444005)(36756003)(256004)(305945005)(6916009)(107886003)(14454004)(478600001)(4326008)(6116002)(7736002)(1076003)(99286004)(81166006)(81156014)(8676002)(46003)(446003)(316002)(11346002)(5640700003)(42882007)(2616005)(52116002)(8936002)(50226002)(476003)(76176011)(186003)(102836004)(6506007)(386003)(6486002)(2906002)(6436002)(66476007)(66446008)(486006)(66946007)(64756008)(44832011)(2501003)(66556008)(5660300002)(6512007);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR2201MB1536;H:MWHPR2201MB1277.namprd22.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: wavecomp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fUx6EkxyE0NfJsfUH61I0/NpsOHyh5gzt1ocn8yHmth99l5aMbk/du9QC23TqmjD1uxoKTEVx0BlIFTauFPnsUG1USjZTSa3WhTOveZ9SYKhTZ2F5jbnUqWOTRFAprF81FSVjaqLTY6B3f6dNWZLdjuijD1VO8cTyFV6vUHP51qqj+6iSbUf/GcoCu9vJw04HHRLAVAAhrsXXh1pMcSSsDvLsqtFeTB+zTCh7fP2Ss63mb6QMzLjTesrkH/x9wO8JRcXBYVQCKHZe/oy+n4/2nMKRk4JXhtIdPEpY1QtgTO3B0M/NW4lEH0SlY4HgDk/toogC4cn5ArPmzrXBvmSPiG2WnV9O70oJtjZOruV65q0yk96YMQbj7MkCV6UyqNXA2YM+hr1iMXxl9xoAj0cLMHZEEzP9wtMn/7UBn7URJw= MIME-Version: 1.0 X-OriginatorOrg: mips.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9a4a6da-946f-4ebe-d187-08d74f54dbb4 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2019 20:43:38.1640 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 463607d3-1db3-40a0-8a29-970c56230104 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: s3xoTTeauxICNMA/rPSSHRtVfjwzGL6TYvfdjs7KzI8b4FUPSWTA9XlkLwAlyyM/UJjR1rjK7af+i9/ei4oIUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR2201MB1536 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org We have no need for the builtin_cmdline array to be fixed at the length of COMMAND_LINE_SIZE - we'll only copy out the string it contains up to its NULL terminator anyway, and cap the size at COMMAND_LINE_SIZE when copying into or concatenating with boot_command_line. The string value is also constant, so we can declare it as such to place it in the .init.rodata section. Signed-off-by: Paul Burton --- arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 7ccc8a9e1bfe..2af05879772f 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -67,7 +67,7 @@ static char __initdata command_line[COMMAND_LINE_SIZE]; char __initdata arcs_cmdline[COMMAND_LINE_SIZE]; #ifdef CONFIG_CMDLINE_BOOL -static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE; +static const char builtin_cmdline[] __initconst = CONFIG_CMDLINE; #else static const char builtin_cmdline[] __initconst = ""; #endif