Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3798538ybi; Tue, 18 Jun 2019 06:44:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzywczKStwb9nMaiD6Di9w3yYlZa+odBWLROA+GCCqWU1yReHmY2Ti38t2abw0oyFdr2LXf X-Received: by 2002:a65:5787:: with SMTP id b7mr2818916pgr.148.1560865469271; Tue, 18 Jun 2019 06:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560865469; cv=none; d=google.com; s=arc-20160816; b=V6xA2Ys4EbQdygQ7nptI/sSnSqqo+zl1EsRMQiSOW5ud6M+r2YDc1mjyjKMLUTCDZx 1LA7MVvURsnC8S8vr+ooQ3Kmmy09VF3X4kl0cxF64MMotJAJhq1B4yr2XEbX8pLgCjDq S+N5XX2BAzQvbIgkND1LNHxqTgl8aOSWO6KFfjbUO2hwt3ix624+GomebM0W8UFe95ho ooc7divf1rN0ykxz1ogt9gQoW8r0n/GZG7Twv2aUOkgiV1VAtz1wKtz7BbOzcUoBoxxA ipLUBl6v5dAUAMyIuHGQd4l/A4wtGpOytvacIY28Xv8+uJfNMhBAP0CsvOASR6lj+Cts P/EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ODMmoGMuVVg+mFLj0LnKULIN9ay7HM6qdPCBmpiov0E=; b=gMrm1Po1ipsloRVoXYnrSEVtkUBv4Ec5IftpJ05rjz5IslDDrL0t+4SexMG3YejJKl 481n7yNmWqUZPX+Yd0Jv1fV/NPbzmMNixzUtZgRo5ur5+JEDOJ7bctimjuMY+AOlKxWB LSqKW1ypABP5u87TzmdQhOKRFK5DVKymkt+Bv06TBTgBktqsTDsRGxZMXBSA4M+mA6aX OVMINv/wtJSXToTrHZ1l151Er9ULQlNdL9rq2MT52MQwumnSdu+/yHGgT7r8XgjCTyix LY0hgX5iloa8fITGw9RXuSVYITRpLyDSBz1WfHqRRLwu4yJHIrw3RK3P7yEO3L4QOuLq HZuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dlTPHTxw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si13205443plz.57.2019.06.18.06.44.13; Tue, 18 Jun 2019 06:44:29 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dlTPHTxw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729188AbfFRNoC (ORCPT + 99 others); Tue, 18 Jun 2019 09:44:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:59154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbfFRNoB (ORCPT ); Tue, 18 Jun 2019 09:44:01 -0400 Received: from dragon (li1322-146.members.linode.com [45.79.223.146]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7B70A2084B; Tue, 18 Jun 2019 13:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560865441; bh=jpwi1yqOwmzINvYa264hjoNAwgtlAPkdvF2LHsGZuSw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dlTPHTxwnt6PhDNTjiSnVbxHAQANydojYv4DrMm3pkhiAXugUYFIMnhX+G7B2B7Wx IG8xYOWcz/LHNiHMjHJYNcz/eV7MO8/42BaSqdopxg+ZmAT3HztnggMQ4JswjFOzPp YkXA7B1KnSAyciFqCVVrG3o61qq6FrwjrNCZv4R8= Date: Tue, 18 Jun 2019 21:42:55 +0800 From: Shawn Guo To: Nathan Chancellor Cc: Abel Vesa , Michael Turquette , Stephen Boyd , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nick Desaulniers Subject: Re: [PATCH] clk: imx6q: Annotate imx6q_obtain_fixed_clk_hw with __init Message-ID: <20190618134253.GK1959@dragon> References: <20190618022405.27952-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190618022405.27952-1-natechancellor@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 17, 2019 at 07:24:05PM -0700, Nathan Chancellor wrote: > When building with clang, the following modpost warning occurs: > > WARNING: vmlinux.o(.text+0x974dbc): Section mismatch in reference from > the function imx6q_obtain_fixed_clk_hw() to the function > .init.text:imx_obtain_fixed_clock_hw() > The function imx6q_obtain_fixed_clk_hw() references > the function __init imx_obtain_fixed_clock_hw(). > This is often because imx6q_obtain_fixed_clk_hw lacks a __init > annotation or the annotation of imx_obtain_fixed_clock_hw is wrong. > > imx6q_obtain_fixed_clk_hw is only used in imx6q_clocks_init, which is > marked __init so do that to imx6q_obtain_fixed_clk_hw to avoid this > warning. > > Fixes: 992b703b5b38 ("clk: imx6q: Switch to clk_hw based API") > Link: https://github.com/ClangBuiltLinux/linux/issues/541 > Reported-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor Thanks for the patch, Nathan. But we already queued up a patch [1] from Arnd for that. Shawn [1] https://lkml.org/lkml/2019/6/17/317 > --- > drivers/clk/imx/clk-imx6q.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c > index 2caa71e91119..18914e0a1850 100644 > --- a/drivers/clk/imx/clk-imx6q.c > +++ b/drivers/clk/imx/clk-imx6q.c > @@ -418,8 +418,9 @@ static void disable_anatop_clocks(void __iomem *anatop_base) > writel_relaxed(reg, anatop_base + CCM_ANALOG_PLL_VIDEO); > } > > -static struct clk_hw *imx6q_obtain_fixed_clk_hw(struct device_node *np, > - const char *name, unsigned long rate) > +static struct clk_hw __init *imx6q_obtain_fixed_clk_hw(struct device_node *np, > + const char *name, > + unsigned long rate) > { > struct clk *clk = of_clk_get_by_name(np, name); > struct clk_hw *hw; > -- > 2.22.0 >