From patchwork Fri Jul 24 19:24:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 51464 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 419F822D98 for ; Fri, 24 Jul 2015 19:24:56 +0000 (UTC) Received: by wicmm11 with SMTP id mm11sf9845871wic.3 for ; Fri, 24 Jul 2015 12:24:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :user-agent:mime-version:content-type:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=NrmKReUjsoBuW6wC21+w7PEgjjWqpjGOW+McABr5u8E=; b=Kb7R8oRDdO2NWszo/Pnxa8ja9cEmJWSVnIxQu0Bfiv/LYPbeey4j+WWEh9Rx44PBo5 o1Xlt2OtyBwI8/dqo+S279smlgPdSbtdzikCvfPdomxZAjme1pnA/UJj+vyb8QEQiIDg 7g/mRLr6uA97sPvr5JZ45jhWdvpkX2BTuC7/ulbQKEQXh2hiGpvgv1eg460lTUJqm6P2 8ITjhPB0N+pZ7K8Wf9pZg+KiTNG3299H5gDVYXE0gpkRRm1CjWUOtdyHF24vIdDjhzWy 1GXtJd8pfkP6YcNKMTJ8d7uN0l151uEdTLekpQl7inewj/6By+aAX80a8kf35wk4XliU CFAg== X-Gm-Message-State: ALoCoQknRp+xsMT/rGIS9oYTh8nSAg9B9uHu1KfOq9sFOsZtKaedxoZqKM5sEU2riYpJ1B7T9HEI X-Received: by 10.152.1.105 with SMTP id 9mr6766360lal.3.1437765895482; Fri, 24 Jul 2015 12:24:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.200 with SMTP id u8ls401327lau.55.gmail; Fri, 24 Jul 2015 12:24:55 -0700 (PDT) X-Received: by 10.152.42.205 with SMTP id q13mr15039533lal.119.1437765895305; Fri, 24 Jul 2015 12:24:55 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id r9si4192387lal.64.2015.07.24.12.24.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 12:24:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbyj8 with SMTP id yj8so21206526lbb.0 for ; Fri, 24 Jul 2015 12:24:54 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr15471562lbb.35.1437765894887; Fri, 24 Jul 2015 12:24:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp173795lba; Fri, 24 Jul 2015 12:24:53 -0700 (PDT) X-Received: by 10.66.65.229 with SMTP id a5mr34757030pat.11.1437765893048; Fri, 24 Jul 2015 12:24:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si22765027pdq.207.2015.07.24.12.24.51; Fri, 24 Jul 2015 12:24:53 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753935AbbGXTYt (ORCPT + 28 others); Fri, 24 Jul 2015 15:24:49 -0400 Received: from mail-qg0-f50.google.com ([209.85.192.50]:35736 "EHLO mail-qg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751824AbbGXTYs (ORCPT ); Fri, 24 Jul 2015 15:24:48 -0400 Received: by qgii95 with SMTP id i95so15254399qgi.2 for ; Fri, 24 Jul 2015 12:24:47 -0700 (PDT) X-Received: by 10.140.132.68 with SMTP id 65mr24117805qhe.6.1437765887676; Fri, 24 Jul 2015 12:24:47 -0700 (PDT) Received: from xanadu.home (modemcable065.157-23-96.mc.videotron.ca. [96.23.157.65]) by smtp.gmail.com with ESMTPSA id 76sm4487207qhg.49.2015.07.24.12.24.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 12:24:46 -0700 (PDT) Date: Fri, 24 Jul 2015 15:24:45 -0400 (EDT) From: Nicolas Pitre To: Jason Cooper , Thomas Gleixner cc: linux-kernel@vger.kernel.org Subject: [PATCH] irqchip: appropriate __init annotation for const data Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Init data marked const should be annotated with __initconst for correctness and not __initdata. And for those already __initconst, they should be qualified as const at the compiler level too. This also fixes LTO builds that otherwise fail with section mismatch errors. Signed-off-by: Nicolas Pitre --- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c index dae3604b32..602f40a14c 100644 --- a/drivers/irqchip/irq-atmel-aic.c +++ b/drivers/irqchip/irq-atmel-aic.c @@ -225,7 +225,7 @@ static void __init at91sam9g45_aic_irq_fixup(struct device_node *root) aic_common_rtt_irq_fixup(root); } -static const struct of_device_id __initdata aic_irq_fixups[] = { +static const struct of_device_id aic_irq_fixups[] __initconst = { { .compatible = "atmel,at91rm9200", .data = at91rm9200_aic_irq_fixup }, { .compatible = "atmel,at91sam9g45", .data = at91sam9g45_aic_irq_fixup }, { .compatible = "atmel,at91sam9n12", .data = at91rm9200_aic_irq_fixup }, diff --git a/drivers/irqchip/irq-atmel-aic5.c b/drivers/irqchip/irq-atmel-aic5.c index 459bf4429d..2b4ec729b0 100644 --- a/drivers/irqchip/irq-atmel-aic5.c +++ b/drivers/irqchip/irq-atmel-aic5.c @@ -290,7 +290,7 @@ static void __init sama5d3_aic_irq_fixup(struct device_node *root) aic_common_rtc_irq_fixup(root); } -static const struct of_device_id __initdata aic5_irq_fixups[] = { +static const struct of_device_id aic5_irq_fixups[] __initconst = { { .compatible = "atmel,sama5d3", .data = sama5d3_aic_irq_fixup }, { .compatible = "atmel,sama5d4", .data = sama5d3_aic_irq_fixup }, { /* sentinel */ }, diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c index e68c3b60a6..bd70222b25 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -76,10 +76,10 @@ #define NR_BANKS 3 #define IRQS_PER_BANK 32 -static int reg_pending[] __initconst = { 0x00, 0x04, 0x08 }; -static int reg_enable[] __initconst = { 0x18, 0x10, 0x14 }; -static int reg_disable[] __initconst = { 0x24, 0x1c, 0x20 }; -static int bank_irqs[] __initconst = { 8, 32, 32 }; +static const int reg_pending[] __initconst = { 0x00, 0x04, 0x08 }; +static const int reg_enable[] __initconst = { 0x18, 0x10, 0x14 }; +static const int reg_disable[] __initconst = { 0x24, 0x1c, 0x20 }; +static const int bank_irqs[] __initconst = { 8, 32, 32 }; static const int shortcuts[] = { 7, 9, 10, 18, 19, /* Bank 1 */