From patchwork Wed Aug 19 18:40:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 7038741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ED2DB9F372 for ; Wed, 19 Aug 2015 18:43:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A49920462 for ; Wed, 19 Aug 2015 18:43:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D3442045A for ; Wed, 19 Aug 2015 18:43:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZS8IU-0006PV-93; Wed, 19 Aug 2015 18:41:14 +0000 Received: from mail-qk0-f177.google.com ([209.85.220.177]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZS8IR-0006Ni-VD for linux-arm-kernel@lists.infradead.org; Wed, 19 Aug 2015 18:41:12 +0000 Received: by qkep139 with SMTP id p139so5614617qke.3 for ; Wed, 19 Aug 2015 11:40:50 -0700 (PDT) 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:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=GI8v0oL2Qv2G6TAlW0ORBI5nMQ41IwJf5vE86iugJ2Y=; b=EPnQDFQv5u9iwiwAd/43CpLVrCdUuW6V+xSmdZVkvPg6Wbyy5oUO1JHtY8FW0FuSze ppaRrdwYcXZ0fYcEvH1UK+qJaYWqK8lU5C5Tvn+3yWIBdMKPskEqR+GqQCrzoc/fB5+g u7xPWknP+LmgxBXmQvf/RAe1UjHDSDRq8ER+QdowANA31PoAtkv6Cda/4FU8xz+r+PwN ybKQcW+3ziLTwYsPodPAslqaTm28THjfhfFbyNlfqeDA0VzaJgMbJjkFoBn6hN0fmip3 12IxpVPa+OWAqLGTqB10LBTE/0M12idpH98+LLidSsLxO0E/XdL7Wl18i2C5f9vJITXq 2E+Q== X-Gm-Message-State: ALoCoQn38sLCI46m/1MbX8D3MOeKGAjFIczvnGV4ey/pkYkP3BzHxpIHWQjlXkgnNtT9EsPME5kZ X-Received: by 10.55.201.27 with SMTP id q27mr25034156qki.57.1440009649980; Wed, 19 Aug 2015 11:40:49 -0700 (PDT) Received: from xanadu.home (modemcable065.157-23-96.mc.videotron.ca. [96.23.157.65]) by smtp.gmail.com with ESMTPSA id h78sm810524qhc.47.2015.08.19.11.40.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 11:40:49 -0700 (PDT) Date: Wed, 19 Aug 2015 14:40:47 -0400 (EDT) From: Nicolas Pitre To: Michael Turquette Subject: Re: [PATCH] drivers/clk: appropriate __init annotation for const data In-Reply-To: <20150811231416.31346.83289@quantum> Message-ID: References: <20150811231416.31346.83289@quantum> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150819_114112_081164_5D18B162 X-CRM114-Status: GOOD ( 14.90 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 11 Aug 2015, Michael Turquette wrote: > Quoting Nicolas Pitre (2015-07-28 16:43:20) > > > > 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 > > Thanks for the patch Nico. Applied. Is it possible for you to amend that patch with the following? Turns out that sys_parents[] is actually written to. Nicolas diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index 5404a001c3..3f6f7ad394 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -293,7 +293,7 @@ stm32f4_rcc_lookup_clk(struct of_phandle_args *clkspec, void *data) return clks[i]; } -static const char *const sys_parents[] __initconst = { "hsi", NULL, "pll" }; +static const char *sys_parents[] __initdata = { "hsi", NULL, "pll" }; static const struct clk_div_table ahb_div_table[] = { { 0x0, 1 }, { 0x1, 1 }, { 0x2, 1 }, { 0x3, 1 },