From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932460AbdKFOsr (ORCPT ); Mon, 6 Nov 2017 09:48:47 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36446 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753206AbdKFOsq (ORCPT ); Mon, 6 Nov 2017 09:48:46 -0500 From: Sudeep Holla To: linux-kernel@vger.kernel.org Cc: Sudeep Holla , Daniel Lezcano , Thomas Gleixner Subject: [PATCH] clocksource: timer-of: drop __init annotations in timer_*_exit functions Date: Mon, 6 Nov 2017 14:48:36 +0000 Message-Id: <1509979716-10646-1-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org timer_{base,clk,irq}_exit functions have __init annotations. Commit f48729a999ee ("clocksource/drivers/timer-of: Add timer_of_exit function") added timer_of_exit to undo what has been done by the timer_of_init() function, which means we need to drop __init to use timer_*_exit functions. It also generates the build time warning: "WARNING: vmlinux.o: Section mismatch in reference from the function timer_of_exit() to the variable .init.text:$x The function timer_of_exit() references the variable __init $x. This is often because timer_of_exit lacks a __init annotation or the annotation of $x is wrong." This patch fixes the above build warning. Fixes: f48729a999ee ("clocksource/drivers/timer-of: Add timer_of_exit function") Cc: Daniel Lezcano Cc: Thomas Gleixner Signed-off-by: Sudeep Holla --- drivers/clocksource/timer-of.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index 7c64a5c1bfc1..701b476ccc7c 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -24,7 +24,7 @@ #include "timer-of.h" -static __init void timer_irq_exit(struct of_timer_irq *of_irq) +static void timer_irq_exit(struct of_timer_irq *of_irq) { struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); @@ -72,7 +72,7 @@ static __init int timer_irq_init(struct device_node *np, return 0; } -static __init void timer_clk_exit(struct of_timer_clk *of_clk) +static void timer_clk_exit(struct of_timer_clk *of_clk) { of_clk->rate = 0; clk_disable_unprepare(of_clk->clk); @@ -116,7 +116,7 @@ static __init int timer_clk_init(struct device_node *np, goto out; } -static __init void timer_base_exit(struct of_timer_base *of_base) +static void timer_base_exit(struct of_timer_base *of_base) { iounmap(of_base->base); } -- 2.7.4