Received: by 10.223.164.202 with SMTP id h10csp4431172wrb; Wed, 29 Nov 2017 06:20:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMb8a3aOtEYF5ccvw1NIGp7uhp2fmuzJii8hSar/taFk8rWeEb8scBBopjyH3lKrFDJd6jRD X-Received: by 10.84.233.1 with SMTP id j1mr3099422plk.311.1511965206700; Wed, 29 Nov 2017 06:20:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511965206; cv=none; d=google.com; s=arc-20160816; b=QwjUw36rJ4gNB6V/etFmaonlOvOQKkgQlylicq/1Hr0SI6nTyxF63fxxZ3BXrwuXZ+ 1i5zVL+nDUszDhvjs4jORkfbh2SUREq6QFKVU9Cc3hPH8JOd98H2BCLeKbUKHZnz+y+q KJjnd3QFxsmBRsX7T+nuvd7oJkQMQ+nYsgdGJvvYOs/10Enkt7trW2TWDsZFhHgETIbA wA8tFP1exhmOL7b82KoIDfSFT5kSQlBmv3yBDmHPH+zUixNv4U5OyIAaMRn4li7ce3+R WCfVziNScGUTIjeiTqNC0rk8G+apRFTv3fmZV1w2NPCfuMzC8mO8zJ1xYjY46kfmzC6k mbyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=xiXYHM37+vXyt9rcOx7v6xA8kmMeEmZiqSUa32cDwW8=; b=XLSHz1g3MKsB5j9SIe4cQoGkRRuxDp4894znsCWMlxMPmPqqpfRtX/cwt4jiCOr5Ci /Qndy31zdkNwRXDuE0gzLQFxQnqzzEn7ejcKxxJMxtWIRXXREgABZ4VJkTpoP4NeawQC NljGMaZ83u9tPAna6TdDT1/yT1wjLkEkTSSzqx3Emun1Oz71yfZ63yNyJ4L53ASJTBHx xEroY5D58DZG9QlJUXmxQhdVYFUputrwnDc65tzFVTLrPs5DJ9J389+MXiHD2SWqlSvS UerLQS290ICh5/TJvcQ/x2WUokdbypWwtz/UjxRt6LyvVk4rfqF1ChCLvCBdyjhxygj7 3P1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=biviX0Ic; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i134si1329854pgc.583.2017.11.29.06.19.56; Wed, 29 Nov 2017 06:20:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=biviX0Ic; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932670AbdK2ODX (ORCPT + 70 others); Wed, 29 Nov 2017 09:03:23 -0500 Received: from mail-dm3nam03on0082.outbound.protection.outlook.com ([104.47.41.82]:27815 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932620AbdK2ODV (ORCPT ); Wed, 29 Nov 2017 09:03:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xiXYHM37+vXyt9rcOx7v6xA8kmMeEmZiqSUa32cDwW8=; b=biviX0IcsOYHxlPZOYcLUp16eO4rCdwYVn0ker1/jRlrwhPKoliCXtS6m/bJcnVMci4oLCnNIB+sRZDGwyAja1EkbR9QzROYK96BwyKIttHwibXQk8LlMnJs44etDdPN151LDH+T5eqkvYGJKQirEnQvzDv8nFXjho/GI5HelW8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (111.93.218.67) by SN4PR0701MB3839.namprd07.prod.outlook.com (2603:10b6:803:4f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Wed, 29 Nov 2017 14:03:18 +0000 From: Yury Norov To: Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Yury Norov , Alex Matveev , Alexander Potapenko , Andi Kleen , Ard Biesheuvel , Catalin Marinas , Kees Cook , Mark Rutland , Maxim Kuvyrkov , Nick Desaulniers , Peter Zijlstra , Sami Tolvanen , Stephen Boyd Subject: [PATCH v2] arm64: fix missing 'const' qualifiers Date: Wed, 29 Nov 2017 17:03:03 +0300 Message-Id: <20171129140303.14283-1-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: HE1PR0102CA0011.eurprd01.prod.exchangelabs.com (2603:10a6:7:14::24) To SN4PR0701MB3839.namprd07.prod.outlook.com (2603:10b6:803:4f::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 661a5fc8-31ea-4424-e879-08d53731f1a9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603199);SRVR:SN4PR0701MB3839; X-Microsoft-Exchange-Diagnostics: 1;SN4PR0701MB3839;3:oCaMMC2G81sVPQuFaMGy6DEglNSXcUtb7FxPQwK2IgWiqJHq5BiEIS9g1pcfyFmstelddEoEjFh7kWAIS7i1Uv5kFcWXQ9AkKnU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8pl5aUe7YkQRTNVxDSF1wENq3F4pDm7VG6wmR903JYcqX1kYTBxVkQsC0YPeICmoeh2uHD8bzoajPZXEwqLAblaqMmMJ0/1NVxhLzg1NCnQT0dY6+o3E3YPzB3KAGVDsEx6n/V+BCS/5aNMqI4XG3nC/OzIAfEHrNbPKvvvI+TYxxeE2pLCzR6zkJBECY9AIjYDznqWDMl2LNI4HEET+G2bDbKA+NB1L496bXtvBO/yL5p1wLln9Kw7VRRCIHUvu2iSwTcVeoXATIUcQMWuWvqn5ukA3bkXuOyXr31mistFjdUqElBhdn7AX8suB0ZBRkVoj4tQwITg03FL5rK3odqti0HWWOaOzo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211936372134217)(153496737603132); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3231022)(920507027)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(6072148)(201708071742011);SRVR:SN4PR0701MB3839;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:SN4PR0701MB3839; X-Microsoft-Exchange-Diagnostics: 1;SN4PR0701MB3839;4:tISAJbdoUGjdmDusXwHQmLXkCs6tJUcsP83dyL5j6czasiqHpbdGseiorAwfzkvh0GLS+/zgi/+OCzj5dy6a9OqID3JHWBT2WeQrtj6XiepqK3WVATL7ORSze/disunzLJv7tc6oGmy0H5PCus9uow4IvOxP0wxflOv1iqqZrb7+he2NOBbT12idVUlLLIIEfrAtfW40DPVZ3LNCtGqk1xiYHSq7rWhn8+GPh3bweshc0fheHKbaTPfKqfyxj4Epyk3P6tnm2rwQSjgTkKuuSnTA80LwQU3BJs9ya9d2Jl2U3ciRpas8WsdD3f8W3V7VrBNWohLR1s9KsVlpnh69AHHLQCEceh/YRzaMdu3H43A= X-Forefront-PRVS: 05066DEDBB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6069001)(366004)(346002)(376002)(199003)(189002)(5009440100003)(7416002)(8936002)(68736007)(478600001)(2870700001)(2906002)(50226002)(189998001)(39060400002)(53936002)(42882006)(6666003)(50986999)(101416001)(72206003)(4326008)(5660300001)(66066001)(47776003)(50466002)(106356001)(6486002)(36756003)(33646002)(105586002)(76506005)(316002)(54906003)(6496006)(34040400001)(16526018)(25786009)(23676004)(52116002)(97736004)(3846002)(6116002)(81156014)(8676002)(81166006)(305945005)(7736002)(1076002);DIR:OUT;SFP:1101;SCL:1;SRVR:SN4PR0701MB3839;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjRQUjA3MDFNQjM4Mzk7MjM6VEtwU3V0UWNZV0lxbnRqbVl0d1pwU1dp?= =?utf-8?B?a0R3OTI4V0Vrcmgyc3pPc1N0MjF2L05LaEpFbG4vOTB1OVJuMzdobkExN1N1?= =?utf-8?B?ZUhPd25oVHZTSEpoVlQ1SW9RQ1E0SU9MakQ5dDREZmxRUmkwU0tEYm1uOWFX?= =?utf-8?B?QXMxTkhWcCtWdU10YW02bmgzRU82dUQrbXV2UFoyR0RuUzQ2REhrYU1mRHRD?= =?utf-8?B?NlFIR3VGc1lseFRmNXdselRMaUgvUjBhQ0pFMXVIQlVPeTAwODBCSWo3SUtX?= =?utf-8?B?TXVRdDdoTjhyOSs1b3J0MVNDUURHbDgyUnByZ2ZlcEFpREZ5MHFRdXBnUUNU?= =?utf-8?B?ajVlbHJrbjBRdHRCNVVsL2JtWVFVOFRqakNpTFhWQzZCaHkzblVtaHZETHNv?= =?utf-8?B?VCsxeENURE5SQmNRcy9wZVl1Q2dpVzBWcEdRLy9XTitYWU1hcU9uQUwrb0NT?= =?utf-8?B?WWpXa0VHRFFZRFAwd0w5M2ZRYkRzSk5JUnpHY1AzTn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JCavyFOKxlMV5chd+RbocKgz7cyYNOf+Uz1GFum3YNHtGScOV+mZwGdbSfw4psrblRNWoCipvQ4NPl5JCUwWJZn3qostgYPbkhCbeUo5s5v9ab0Hi+0uMU/mWww/2UUyia31HFIdRdwYCrDl58aj5asL+QAuoa7n91dY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2017 14:03:18.2662 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 661a5fc8-31ea-4424-e879-08d53731f1a9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0701MB3839 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's inconsistency in variable declaration and section type. GCC doesn't throw error for usual build. But if LTO enabled, build becomes broken, like this: mm/percpu.c:2168:20: error: pcpu_fc_names causes a section type conflict with dt_supported_cpu_ops const char * const pcpu_fc_names[PCPU_FC_NR] __initconst = { ^ arch/arm64/kernel/cpu_ops.c:34:37: note: ‘dt_supported_cpu_ops’ was declared here static const struct cpu_operations *dt_supported_cpu_ops[] __initconst = { And so on. Fix it by adding missed const qualifiers. v2: more details in patch description. Signed-off-by: Yury Norov Reviewed-by: Nick Desaulniers --- arch/arm64/kernel/cpu_ops.c | 6 +++--- drivers/clk/hisilicon/crg-hi3516cv300.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/cpu_ops.c b/arch/arm64/kernel/cpu_ops.c index d16978213c5b..ea001241bdd4 100644 --- a/arch/arm64/kernel/cpu_ops.c +++ b/arch/arm64/kernel/cpu_ops.c @@ -31,13 +31,13 @@ extern const struct cpu_operations cpu_psci_ops; const struct cpu_operations *cpu_ops[NR_CPUS] __ro_after_init; -static const struct cpu_operations *dt_supported_cpu_ops[] __initconst = { +static const struct cpu_operations *const dt_supported_cpu_ops[] __initconst = { &smp_spin_table_ops, &cpu_psci_ops, NULL, }; -static const struct cpu_operations *acpi_supported_cpu_ops[] __initconst = { +static const struct cpu_operations *const acpi_supported_cpu_ops[] __initconst = { #ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL &acpi_parking_protocol_ops, #endif @@ -47,7 +47,7 @@ static const struct cpu_operations *acpi_supported_cpu_ops[] __initconst = { static const struct cpu_operations * __init cpu_get_ops(const char *name) { - const struct cpu_operations **ops; + const struct cpu_operations *const *ops; ops = acpi_disabled ? dt_supported_cpu_ops : acpi_supported_cpu_ops; diff --git a/drivers/clk/hisilicon/crg-hi3516cv300.c b/drivers/clk/hisilicon/crg-hi3516cv300.c index 2007123832bb..53450b651e4c 100644 --- a/drivers/clk/hisilicon/crg-hi3516cv300.c +++ b/drivers/clk/hisilicon/crg-hi3516cv300.c @@ -204,7 +204,7 @@ static const struct hisi_crg_funcs hi3516cv300_crg_funcs = { /* hi3516CV300 sysctrl CRG */ #define HI3516CV300_SYSCTRL_NR_CLKS 16 -static const char *wdt_mux_p[] __initconst = { "3m", "apb" }; +static const char *const wdt_mux_p[] __initconst = { "3m", "apb" }; static u32 wdt_mux_table[] = {0, 1}; static const struct hisi_mux_clock hi3516cv300_sysctrl_mux_clks[] = { -- 2.11.0 From 1585380242218964651@xxx Wed Nov 29 06:20:18 +0000 2017 X-GM-THRID: 1584123129615679479 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread