From patchwork Tue Jun 18 02:24:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11000827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37321924 for ; Tue, 18 Jun 2019 02:24:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2896B289AF for ; Tue, 18 Jun 2019 02:24:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B22C289BD; Tue, 18 Jun 2019 02:24:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABC6C289AF for ; Tue, 18 Jun 2019 02:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725870AbfFRCYQ (ORCPT ); Mon, 17 Jun 2019 22:24:16 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:39625 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727399AbfFRCYQ (ORCPT ); Mon, 17 Jun 2019 22:24:16 -0400 Received: by mail-ed1-f68.google.com with SMTP id m10so19179139edv.6; Mon, 17 Jun 2019 19:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lx4lm8ezQLxxXg3cFWwVWTQoCE1WyQJtp8daTAQGnAE=; b=jlP6OPiaGGXIC88z3BmvU0tzqiZKK0Fu03WqTR4mlUBJ/9Nmrf/bztr+YMPrHFEBHN 4OtXRSalf315AkYk2Sb1ZJdvxbF44nnow/W6T1VH2B8HhOuKTGpwkgUMhbZu7M3QVsFx Oyjvg9uVF8a8Fk1L4nrrrcvx18cZBd2qVHUbm6L98nGWzAMzF64ITvsxzoAszFnup8Z2 yEs21DUkTKQnCQb0O3e5ALSd04ciENiZXpwkxUDLlOJpwaLt8mApuZCgOtMT8d9YRs2r BXNUKJsBTLS0Eo0Q0JV+MrWV+m49QQjl9opBWlRhHtHEg+1f/JEdQFssE0rqa6WZh5Vl CUGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lx4lm8ezQLxxXg3cFWwVWTQoCE1WyQJtp8daTAQGnAE=; b=NBSkgVUZ5aPjHRAW2fbJIqRra1OsJw892IAui3q75leFxvQJsdutyFiUxHX4+yX4R6 7NjFW4Nu/XWdcGyASUCDy+B5vYqa6e1EVx7uKOf4JM1YsdsZ3KI2YkMjFu24RTP96rnJ NEfb8UuJP76L88H8snz/LZanToaNwNlkHigqRRmBLCX48vxzctCoiysrQDR8V9RGPVNh 1iN/a6l0dQf83+MB1dTDUpWRPgYoblwxpKE/Kpn4fD0wP00G8hezqXf6dLUcc4vFlbXu i5WvdXXkI5O4Ot0sfHazXlkRSA7e714RAtZmuVCnd+gsuNgCXne2c5HSlrURgTLC2POd RFLA== X-Gm-Message-State: APjAAAUm+jFfLGPe5hfWrOS6nE+pB76c3tJiuSLfgY5Nhl9ktYQFkVrl ekjzvIgwG++0it/aFIKct7A= X-Google-Smtp-Source: APXvYqyG3IJ3H2I8Zal9OtLEww9Kb70iUkIe3c10nl8TyAfukGGZgdUW4a9aSQn2zNroQWQqhwolKg== X-Received: by 2002:aa7:c99a:: with SMTP id c26mr28682275edt.118.1560824654244; Mon, 17 Jun 2019 19:24:14 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f9:2b:2b15::2]) by smtp.gmail.com with ESMTPSA id m3sm4064055edi.33.2019.06.17.19.24.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 17 Jun 2019 19:24:13 -0700 (PDT) From: Nathan Chancellor To: Abel Vesa , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer Cc: 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, Nathan Chancellor , Nick Desaulniers Subject: [PATCH] clk: imx6q: Annotate imx6q_obtain_fixed_clk_hw with __init Date: Mon, 17 Jun 2019 19:24:05 -0700 Message-Id: <20190618022405.27952-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;