Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1239021pxb; Fri, 20 Aug 2021 00:47:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiiwZbuBs2rqUJnhNVYjjvR5CnJb2yNLRnqUtGVnehECJrUkyPDUfvuh+K6f8GX1j9Jo+l X-Received: by 2002:a6b:8f4a:: with SMTP id r71mr15219289iod.12.1629445650839; Fri, 20 Aug 2021 00:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629445650; cv=none; d=google.com; s=arc-20160816; b=eP2prXnYXHV+f2GY6lVhd6KRP8FeVVbXf5qBCOjHDReVqwJiAocMTzyF04zGiNo3gb lw0zJDWHjV/AEGDErD8GJPyac8z62bFYkgAuBxAku9pcaJtx/6mETbFjfqgwDSWlrYuF +rw/AdLiLiKTGa9oBYF7k1hDZmt6484mj8iCGZ7ebSxrhlphi2J6ckiJtgi2r16lsoo1 zg7M8WF1DeyCzyT4m0U3wp1dAYyjQYEaf3QinlJ+cv9Uuqnq0nbZjidIUa6fV1nQwniA uK9gasLCYL2GeEcAmYr9IwyH0HErhQ1PZXy6x3cIaJKJ/BD7u+Y0hrN7FbIvfoFOwHto fo0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=wrh5aTHFw1rDGV2LUmxrOJzfsOn3grMx5hf1y0ucAAA=; b=KYqggQ1ew2fAe/B8TABGNpFOUiAK6qi08qzBayvGwmhlr34Lv5P6VK3O2Il03CaoFc 2iFnbY7OkzbsbNkE1Ishd89I31WSuWYgA1moqgRMjre8GCHVUc8xRWobI2WUIwNgZmUc 3WE9w9fr8Gt0P8301PBpGObsgi5zIq1D0FYMb/TYDRfF7VaDB68ERI/xw0xpG/lLANPf uKlUyNiUnC2rUpXkAncGvv7hxGBOIUc6YP/EW9l78x9+fbO8UqZPllXtspcAR88x+/Ld 84bNY4TULOqhLUx0bTwXOMFyNZKWDssqQi054xsW6PqyYQKs0QY0cNdcUvtJ1GC1m5t+ IEgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tpxs+IEW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si5750702ilu.92.2021.08.20.00.47.19; Fri, 20 Aug 2021 00:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tpxs+IEW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238872AbhHTHqk (ORCPT + 99 others); Fri, 20 Aug 2021 03:46:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238848AbhHTHqi (ORCPT ); Fri, 20 Aug 2021 03:46:38 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC895C061575 for ; Fri, 20 Aug 2021 00:46:00 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id k5-20020a05600c1c85b02902e699a4d20cso5493907wms.2 for ; Fri, 20 Aug 2021 00:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=wrh5aTHFw1rDGV2LUmxrOJzfsOn3grMx5hf1y0ucAAA=; b=tpxs+IEWmXP0TcWAQUzwXnlouoWAii35SszoWv1AMJrhp5gZ8tfJpapBmI1OXR1IA6 Z0E4ZL9m33jVt4VY2AGOq2j9lIGvcgrqioiYrYdNyTNC+HokbmTskLsTpw0hMlVtqNOK Y5fRNV0qnbZdftioNn3JlmmSmLckG443NL7167gq2lOyRKCfltotPWW4ubo0IocbH+sU z0bLXsedsAZGp21aXLwj1tHJlt0q9dLf3/stSySQl4NwOm2ThzIEhwww2/qEm3FYHCkP nK4R4z1hEznEk5rZQk7/BXByKZc6gNuNG55wqxEhpP5DrBeIRrHokRZJr7MSaIn9BXwx MBZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=wrh5aTHFw1rDGV2LUmxrOJzfsOn3grMx5hf1y0ucAAA=; b=EReTL3mcmYnKrWHXTEgBQXEtOsv1s/ctJ9X565eSJ4jMMqJ8tuZu6LVW0IejJRXfk5 ZAIhiBBeKrxkhMYrgDL1SDa7rGKbPG1IuwhXZURSkpEzfyED85IF7UwUcmXdZiPU+g0X h3NpLv90i12XGBIKoYk/GWCuUZZTx8aDSzh33Wd/kDm5+dCETGk4SsogUQqTWaEGmL31 vITIR7OBs8hcQgHYAYu4ETQXKOtOycdz4+fTfg73Vf7mk/f7q62+1Fv4xf4ccGSeZXlr hr57y4jKUrjxtSA/p/ETXuPSbfTa7PB+bpVULM7PRyQgzjJpDFgbOOvg0gDkNhfY6JBL UI5A== X-Gm-Message-State: AOAM530KMm6+AxIiNKb/eH+EJBPxmDL2XwX4b6LXnZaTZ66fqBHdmFR9 9TcgiYuWS0IrjT3wSBrp+KasosZ/u4ym0EacOAc= X-Received: by 2002:a05:600c:1906:: with SMTP id j6mr2454966wmq.166.1629445559399; Fri, 20 Aug 2021 00:45:59 -0700 (PDT) MIME-Version: 1.0 References: <20210715065455.392923-1-zhang.lyra@gmail.com> <20210715065455.392923-2-zhang.lyra@gmail.com> <3a173a51-2abe-c1bf-41a5-d0be15290452@linaro.org> In-Reply-To: <3a173a51-2abe-c1bf-41a5-d0be15290452@linaro.org> From: Chunyan Zhang Date: Fri, 20 Aug 2021 15:45:22 +0800 Message-ID: Subject: Re: [PATCH v2 1/3] drivers/clocksource/timer-of: Remove __init markings To: Daniel Lezcano Cc: Thomas Gleixner , Saravana Kannan , Baolin Wang , Orson Zhai , Chunyan Zhang , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Aug 2021 at 21:34, Daniel Lezcano wr= ote: > > On 15/07/2021 08:54, Chunyan Zhang wrote: > > From: Saravana Kannan > > > > This allows timer drivers to be compiled as modules. > > Why ? > > These changes will create a precedence with the timers being loaded as > modules. A longer description is important. > > Also, loading the timers may be fine but unloading them is not supported > AFAICT from the time framework. That should be described also and the > code should make sure the unloading will be never supported in any > module conversion. Ok, I will change to use builtin_platform_driver() to replace module_platform_driver(), that can make sure to support loading only. And will add a description for that in the next version patch-2. Thanks, Chunyan > > > Signed-off-by: Saravana Kannan > > Signed-off-by: Chunyan Zhang > > --- > > drivers/clocksource/timer-of.c | 17 +++++++++-------- > > drivers/clocksource/timer-of.h | 4 ++-- > > 2 files changed, 11 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer= -of.c > > index 529cc6a51cdb..7f108978fd51 100644 > > --- a/drivers/clocksource/timer-of.c > > +++ b/drivers/clocksource/timer-of.c > > @@ -19,7 +19,7 @@ > > * > > * Free the irq resource > > */ > > -static __init void timer_of_irq_exit(struct of_timer_irq *of_irq) > > +static void timer_of_irq_exit(struct of_timer_irq *of_irq) > > { > > struct timer_of *to =3D container_of(of_irq, struct timer_of, of_= irq); > > > > @@ -47,7 +47,7 @@ static __init void timer_of_irq_exit(struct of_timer_= irq *of_irq) > > * > > * Returns 0 on success, < 0 otherwise > > */ > > -static __init int timer_of_irq_init(struct device_node *np, > > +static int timer_of_irq_init(struct device_node *np, > > struct of_timer_irq *of_irq) > > { > > int ret; > > @@ -91,7 +91,7 @@ static __init int timer_of_irq_init(struct device_nod= e *np, > > * > > * Disables and releases the refcount on the clk > > */ > > -static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) > > +static void timer_of_clk_exit(struct of_timer_clk *of_clk) > > { > > of_clk->rate =3D 0; > > clk_disable_unprepare(of_clk->clk); > > @@ -107,7 +107,7 @@ static __init void timer_of_clk_exit(struct of_time= r_clk *of_clk) > > * > > * Returns 0 on success, < 0 otherwise > > */ > > -static __init int timer_of_clk_init(struct device_node *np, > > +static int timer_of_clk_init(struct device_node *np, > > struct of_timer_clk *of_clk) > > { > > int ret; > > @@ -146,12 +146,12 @@ static __init int timer_of_clk_init(struct device= _node *np, > > goto out; > > } > > > > -static __init void timer_of_base_exit(struct of_timer_base *of_base) > > +static void timer_of_base_exit(struct of_timer_base *of_base) > > { > > iounmap(of_base->base); > > } > > > > -static __init int timer_of_base_init(struct device_node *np, > > +static int timer_of_base_init(struct device_node *np, > > struct of_timer_base *of_base) > > { > > of_base->base =3D of_base->name ? > > @@ -165,7 +165,7 @@ static __init int timer_of_base_init(struct device_= node *np, > > return 0; > > } > > > > -int __init timer_of_init(struct device_node *np, struct timer_of *to) > > +int timer_of_init(struct device_node *np, struct timer_of *to) > > { > > int ret =3D -EINVAL; > > int flags =3D 0; > > @@ -209,6 +209,7 @@ int __init timer_of_init(struct device_node *np, st= ruct timer_of *to) > > timer_of_base_exit(&to->of_base); > > return ret; > > } > > +EXPORT_SYMBOL_GPL(timer_of_init); > > > > /** > > * timer_of_cleanup - release timer_of resources > > @@ -217,7 +218,7 @@ int __init timer_of_init(struct device_node *np, st= ruct timer_of *to) > > * Release the resources that has been used in timer_of_init(). > > * This function should be called in init error cases > > */ > > -void __init timer_of_cleanup(struct timer_of *to) > > +void timer_of_cleanup(struct timer_of *to) > > { > > if (to->flags & TIMER_OF_IRQ) > > timer_of_irq_exit(&to->of_irq); > > diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer= -of.h > > index a5478f3e8589..1b8cfac5900a 100644 > > --- a/drivers/clocksource/timer-of.h > > +++ b/drivers/clocksource/timer-of.h > > @@ -66,9 +66,9 @@ static inline unsigned long timer_of_period(struct ti= mer_of *to) > > return to->of_clk.period; > > } > > > > -extern int __init timer_of_init(struct device_node *np, > > +extern int timer_of_init(struct device_node *np, > > struct timer_of *to); > > > > -extern void __init timer_of_cleanup(struct timer_of *to); > > +extern void timer_of_cleanup(struct timer_of *to); > > > > #endif > > > > > -- > Linaro.org =E2=94=82 Open source software for AR= M SoCs > > Follow Linaro: Facebook | > Twitter | > Blog