[v4a,04/38] clocksource/drivers/sp804: Do not use timer namespace for timer_shutdown() function
Message ID | 20221105060155.592778858@goodmis.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp829349wru; Fri, 4 Nov 2022 23:03:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kVJV90FfbV44GKGqftPwQMKTrtVBwp3c9JkMuz1YoEqPelKhttkyUAbO9bWL5wR6WgYaR X-Received: by 2002:a17:902:7689:b0:187:1461:9b27 with SMTP id m9-20020a170902768900b0018714619b27mr449457pll.165.1667628209185; Fri, 04 Nov 2022 23:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667628209; cv=none; d=google.com; s=arc-20160816; b=UJhO4NMmK/IoNl/5QNkz2Jcn83B9gA+/nWSphPCk2OrgurgWYEei+Ob9l/JdWpNeId 6O6Bt+MWOaDM4dStZI5AfB7iGGgEAIiWEVhRx2g19Zsk7g5mwxz7W1zEbRXN7eNU4SR1 UtHbpyJ9E++9iQezb6l1FUmrMjWvb/h+PfUFdNOGEvYyRYGncBC1HHWbgt++mIRZer1N JtBiqEfYdkG28Qb4WOfWXqaK4KDirdqY3rry/gcYjt9657QHnkMw4TNg8eupZZ4+LgMP xW3gcymydUV6UxmeMRPZ1ly6Nqyy5aB26YJYlUJxDJ8onzxepHJ+2v6OADYQNx/FH0Hd rqtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=wQ/9JX2FW1D7V7oy37/oHyM+7UeRX3yjhvj/TQvvxJU=; b=hMyl8bDMlTiqgO5zkqI7EYnjvXkO06mT80gtuhgppo0z3QjLW7w0DCfwCZXrjJFlJE aH0MvdaFVpeBymoSlty8h3c89KVhWppUgl1dbXDBtrZahLU3YRMOdpB0ZxxWKHzC6BuH Cv6tgtXe9+W2MMA7ZAF6MO0NCFyrEWZ05BY0y3338YfFEOD0xoh2HlJY/1JAFzbFCDoI UjOhVC43sRoNtCuss+WiQC46ikQb9EEX7lqPGJ+7k5YCJEC1TYTy3dxntPsi+33w+ybg GD9MdPMlgwGxBH0pL3FPsIe5oLqK8YtZ43Dy9TU+aD6TWeknuP3SXlJohnjXXA0jyHP8 wtZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a8-20020a63e848000000b0046ff70b1cf3si2000422pgk.463.2022.11.04.23.03.16; Fri, 04 Nov 2022 23:03:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbiKEGBp (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Sat, 5 Nov 2022 02:01:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbiKEGBa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 5 Nov 2022 02:01:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE40E30548 for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 23:01:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 47D01609EB for <linux-kernel@vger.kernel.org>; Sat, 5 Nov 2022 06:01:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F225C43148; Sat, 5 Nov 2022 06:01:27 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from <rostedt@goodmis.org>) id 1orCFf-007Oh6-2R; Sat, 05 Nov 2022 02:01:55 -0400 Message-ID: <20221105060155.592778858@goodmis.org> User-Agent: quilt/0.66 Date: Sat, 05 Nov 2022 02:00:28 -0400 From: Steven Rostedt <rostedt@goodmis.org> To: linux-kernel@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Stephen Boyd <sboyd@kernel.org>, Guenter Roeck <linux@roeck-us.net>, Anna-Maria Gleixner <anna-maria@linutronix.de>, Andrew Morton <akpm@linux-foundation.org>, Daniel Lezcano <daniel.lezcano@linaro.org> Subject: [PATCH v4a 04/38] clocksource/drivers/sp804: Do not use timer namespace for timer_shutdown() function References: <20221105060024.598488967@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748634917237832084?= X-GMAIL-MSGID: =?utf-8?q?1748634917237832084?= |
Series |
timers: Use timer_shutdown*() before freeing timers
|
|
Commit Message
Steven Rostedt
Nov. 5, 2022, 6 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org> A new "shutdown" timer state is being added to the generic timer code. One of the functions to change the timer into the state is called "timer_shutdown()". This means that there can not be other functions called "timer_shutdown()" as the timer code owns the "timer_*" name space. Rename timer_shutdown() to evt_timer_shutdown() to avoid this conflict. Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> --- drivers/clocksource/timer-sp804.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Sat, Nov 05, 2022 at 02:00:28AM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > A new "shutdown" timer state is being added to the generic timer code. One > of the functions to change the timer into the state is called > "timer_shutdown()". This means that there can not be other functions > called "timer_shutdown()" as the timer code owns the "timer_*" name space. > > Rename timer_shutdown() to evt_timer_shutdown() to avoid this conflict. > > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > Cc: Thomas Gleixner <tglx@linutronix.de> > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> > --- > drivers/clocksource/timer-sp804.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c > index e6a87f4af2b5..cd1916c05325 100644 > --- a/drivers/clocksource/timer-sp804.c > +++ b/drivers/clocksource/timer-sp804.c > @@ -155,14 +155,14 @@ static irqreturn_t sp804_timer_interrupt(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -static inline void timer_shutdown(struct clock_event_device *evt) > +static inline void evt_timer_shutdown(struct clock_event_device *evt) > { > writel(0, common_clkevt->ctrl); > } > > static int sp804_shutdown(struct clock_event_device *evt) > { > - timer_shutdown(evt); > + evt_timer_shutdown(evt); > return 0; > } > > @@ -171,7 +171,7 @@ static int sp804_set_periodic(struct clock_event_device *evt) > unsigned long ctrl = TIMER_CTRL_32BIT | TIMER_CTRL_IE | > TIMER_CTRL_PERIODIC | TIMER_CTRL_ENABLE; > > - timer_shutdown(evt); > + evt_timer_shutdown(evt); > writel(common_clkevt->reload, common_clkevt->load); > writel(ctrl, common_clkevt->ctrl); > return 0; > -- > 2.35.1
diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c index e6a87f4af2b5..cd1916c05325 100644 --- a/drivers/clocksource/timer-sp804.c +++ b/drivers/clocksource/timer-sp804.c @@ -155,14 +155,14 @@ static irqreturn_t sp804_timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static inline void timer_shutdown(struct clock_event_device *evt) +static inline void evt_timer_shutdown(struct clock_event_device *evt) { writel(0, common_clkevt->ctrl); } static int sp804_shutdown(struct clock_event_device *evt) { - timer_shutdown(evt); + evt_timer_shutdown(evt); return 0; } @@ -171,7 +171,7 @@ static int sp804_set_periodic(struct clock_event_device *evt) unsigned long ctrl = TIMER_CTRL_32BIT | TIMER_CTRL_IE | TIMER_CTRL_PERIODIC | TIMER_CTRL_ENABLE; - timer_shutdown(evt); + evt_timer_shutdown(evt); writel(common_clkevt->reload, common_clkevt->load); writel(ctrl, common_clkevt->ctrl); return 0;