From: Arnd Bergmann <arnd@arndb.de>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 8/8] rtc: remove struct rtc_task
Date: Mon, 6 Aug 2018 11:06:07 +0200 [thread overview]
Message-ID: <CAK8P3a121CrinzrXPZ86f=KkK9yfnVHF70MQQYt2VVr-6jCnGQ@mail.gmail.com> (raw)
In-Reply-To: <20180726134056.18273-9-alexandre.belloni@bootlin.com>
On Thu, Jul 26, 2018 at 3:42 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> Include rtc_task members directly in rtc_timer member.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> drivers/rtc/interface.c | 8 ++++----
> include/linux/rtc.h | 9 ++-------
> 2 files changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
> index d0983ed6c842..a962540faf2e 100644
> --- a/drivers/rtc/interface.c
> +++ b/drivers/rtc/interface.c
> @@ -912,8 +912,8 @@ void rtc_timer_do_work(struct work_struct *work)
> timerqueue_del(&rtc->timerqueue, &timer->node);
> trace_rtc_timer_dequeue(timer);
> timer->enabled = 0;
> - if (timer->task.func)
> - timer->task.func(timer->task.private_data);
> + if (timer->func)
> + timer->func(timer->private_data);
>
> trace_rtc_timer_fired(timer);
> /* Re-add/fwd periodic timers */
> @@ -968,8 +968,8 @@ void rtc_timer_init(struct rtc_timer *timer, void (*f)(void *p), void *data)
> {
> timerqueue_init(&timer->node);
> timer->enabled = 0;
> - timer->task.func = f;
> - timer->task.private_data = data;
> + timer->func = f;
> + timer->private_data = data;
> }
From what I can see, all remaining users pass the rtc_device pointer as
'private_data', so maybe make that explicit now instead of the void pointer?
Arnd
prev parent reply other threads:[~2018-08-06 9:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 13:40 [PATCH 0/8] rtc: cleanup task handling Alexandre Belloni
2018-07-26 13:40 ` [PATCH 1/8] rtc: sa1100: don't set PIE frequency Alexandre Belloni
2018-07-26 13:40 ` [PATCH 2/8] rtc: sh: remove dead code Alexandre Belloni
2018-07-26 13:40 ` [PATCH 3/8] rtc: remove rtc_irq_register/rtc_irq_unregister Alexandre Belloni
2018-07-26 13:40 ` [PATCH 4/8] rtc: remove irq_task and irq_task_lock Alexandre Belloni
2018-07-26 13:40 ` [PATCH 5/8] rtc: simplify rtc_irq_set_state/rtc_irq_set_freq Alexandre Belloni
2018-07-26 13:40 ` [PATCH 6/8] rtc: unexport rtc_irq_set_* Alexandre Belloni
2018-07-26 13:40 ` [PATCH 7/8] char: rtc: remove task handling Alexandre Belloni
2018-08-02 8:30 ` Greg Kroah-Hartman
2018-07-26 13:40 ` [PATCH 8/8] rtc: remove struct rtc_task Alexandre Belloni
2018-08-06 9:06 ` Arnd Bergmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK8P3a121CrinzrXPZ86f=KkK9yfnVHF70MQQYt2VVr-6jCnGQ@mail.gmail.com' \
--to=arnd@arndb.de \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).