From patchwork Wed Apr 27 17:28:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 66806 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2317188qge; Wed, 27 Apr 2016 10:28:38 -0700 (PDT) X-Received: by 10.98.65.82 with SMTP id o79mr13602179pfa.115.1461778118309; Wed, 27 Apr 2016 10:28:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p126si5020556pfb.228.2016.04.27.10.28.38; Wed, 27 Apr 2016 10:28:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752841AbcD0R2g (ORCPT + 4 others); Wed, 27 Apr 2016 13:28:36 -0400 Received: from mail-qg0-f42.google.com ([209.85.192.42]:34362 "EHLO mail-qg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbcD0R2g (ORCPT ); Wed, 27 Apr 2016 13:28:36 -0400 Received: by mail-qg0-f42.google.com with SMTP id 90so4431558qgz.1 for ; Wed, 27 Apr 2016 10:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:user-agent:mime-version; bh=Kq2iUtizM4zSfIn6wgLYKP+E6SW0kE+M/xY32uAy+qA=; b=a50U3LrVp6+FanHR87kXYPst6KIUaJwqdpup3cg2YFJl8CiKRhH74h/tDrlxKFnIAR mQWzvLZC+0zkitdOFPwLWSP5xsnEJVBnu2loeRZl4mp116UzJM1/OBMQEQXx7kHnmJ6q x4vwV5BsUcuQYVhCbF5svW+/Zt3aPcO+W1rwk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version; bh=Kq2iUtizM4zSfIn6wgLYKP+E6SW0kE+M/xY32uAy+qA=; b=E9ej2UCmnTMqfSnrPAKonxOemIiES4mxBAPemFqLsOXFk4ThLeM8DwGQq2o95rIt2I sBXYrKCzNvD55kdkBChpq5/PnXGwa0XPFyK+14Oh1gZGz7nkFNiBRGaO6j5zFlNa12Pu +BntyMK4HRSGkyEKOGeQfoY5ngSHLQOpT+w8W3bh6vtPkCjb2+UccS6aeJgt+60Oe8Yj 7WS+teDex8oANG+Z/gLZZsWGMRk0Dy1l3/zUbRo+50UlH2i3tryKw8BVKS/z9DuWU/DF fuFMLxw6vZgotih8PzArOTHWON55v/tvQkVmMoXjhXvVVAP0tzFDa1lajdSu0LGFYxup 3+7g== X-Gm-Message-State: AOPr4FXjH9YPg09Imn9QviQ7aY6REr+OnKBKV9CiDLAgKwYUAWNSyZ84D5vxoiNgnDy/7Vy+ X-Received: by 10.140.229.69 with SMTP id z66mr9910260qhb.48.1461778114988; Wed, 27 Apr 2016 10:28:34 -0700 (PDT) Received: from xanadu.home ([2607:fa48:6e39:d410:feaa:14ff:fea7:ed77]) by smtp.gmail.com with ESMTPSA id i186sm1490550qki.15.2016.04.27.10.28.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Apr 2016 10:28:33 -0700 (PDT) Date: Wed, 27 Apr 2016 13:28:32 -0400 (EDT) From: Nicolas Pitre To: Alan Stern , linux-usb@vger.kernel.org Subject: [PATCH] usb/host/: const data must use __initconst not __initdata Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Init data marked const should be annotated with __initconst for correctness and not __initdata. 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-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index df538fd10a..42e5b66353 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -321,7 +321,7 @@ static struct platform_driver exynos_ehci_driver = { .of_match_table = of_match_ptr(exynos_ehci_match), } }; -static const struct ehci_driver_overrides exynos_overrides __initdata = { +static const struct ehci_driver_overrides exynos_overrides __initconst = { .extra_priv_size = sizeof(struct exynos_ehci_hcd), }; diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index 3e226ef6ca..d3afc89d00 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c @@ -229,7 +229,7 @@ static struct platform_driver ehci_msm_driver = { }, }; -static const struct ehci_driver_overrides msm_overrides __initdata = { +static const struct ehci_driver_overrides msm_overrides __initconst = { .reset = ehci_msm_reset, }; diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index a24720beb3..94ea9fff13 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -86,7 +86,7 @@ static inline u32 ehci_read(void __iomem *base, u32 reg) static struct hc_driver __read_mostly ehci_omap_hc_driver; -static const struct ehci_driver_overrides ehci_omap_overrides __initdata = { +static const struct ehci_driver_overrides ehci_omap_overrides __initconst = { .extra_priv_size = sizeof(struct omap_hcd), }; diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index 3c4e525395..1f25c7985f 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c @@ -163,7 +163,7 @@ static struct platform_driver spear_ehci_hcd_driver = { } }; -static const struct ehci_driver_overrides spear_overrides __initdata = { +static const struct ehci_driver_overrides spear_overrides __initconst = { .extra_priv_size = sizeof(struct spear_ehci), };