From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A0C9C31E51 for ; Tue, 18 Jun 2019 13:44:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D37B320873 for ; Tue, 18 Jun 2019 13:44:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n9aYFDsy"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="dlTPHTxw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D37B320873 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R7WI3VsZGKTVwD+rJ7U/ZTt9RYsHReM7yTlI1yK0G4w=; b=n9aYFDsye/yg1h V5OXWp6b4PxozST8PwEnnDs4SO8gWXHquWbebKrmuGbYdg2yNvsS6tWPpkD/Wd+axbiVxy7/lslGr jHSwJjxxF1TM5tsrRqaVMPDI/B2pB0I7glG+Vi9ZdIYn4kVb62cHivftLHedfW7dyNdUhmP9yR6jT AONGF7FjaHDx4uDQkKQhJXkvuqfccD8vQGm9iknflSu/n6ZzXDlo68Jdn3PnTf/ogWtqe+jnBOwui Q07MOEpEizK1y4FgD4A+5ZGmTu2VbEFCDrAJrmVp64wHhfZYqV3GGubL63E9T8sg4DIenIE3DsTxq yKihiF5+ur8/B8ZFmmLA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hdEP7-0003WB-4q; Tue, 18 Jun 2019 13:44:05 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdEP3-0003Vs-C4 for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2019 13:44:02 +0000 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 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-Disposition: inline In-Reply-To: <20190618022405.27952-1-natechancellor@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190618_064401_431694_05C290D5 X-CRM114-Status: GOOD ( 16.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Abel Vesa , Stephen Boyd , Michael Turquette , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, clang-built-linux@googlegroups.com, NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , Sascha Hauer , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel