From: Tyler Baicar <tbaicar@codeaurora.org>
To: Kees Cook <keescook@chromium.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>, Tony Luck <tony.luck@intel.com>,
Borislav Petkov <bp@alien8.de>, Will Deacon <will.deacon@arm.com>,
James Morse <james.morse@arm.com>,
"Jonathan (Zhixiong) Zhang" <zjzhang@codeaurora.org>,
Shiju Jose <shiju.jose@huawei.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI / APEI: Convert timers to use timer_setup()
Date: Tue, 17 Oct 2017 09:48:32 -0400 [thread overview]
Message-ID: <056ca6a5-6612-0794-c6a0-fdebb68e9937@codeaurora.org> (raw)
In-Reply-To: <20171016232135.GA100431@beast>
On 10/16/2017 7:21 PM, Kees Cook wrote:
> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly.
>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Tyler Baicar <tbaicar@codeaurora.org>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: James Morse <james.morse@arm.com>
> Cc: "Jonathan (Zhixiong) Zhang" <zjzhang@codeaurora.org>
> Cc: Shiju Jose <shiju.jose@huawei.com>
> Cc: linux-acpi@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
Verified that the polled error sources still work with this timer setup.
Thanks,
Tyler
> ---
> drivers/acpi/apei/ghes.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 3c3a37b8503b..ebaa51ba8a22 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -774,9 +774,9 @@ static void ghes_add_timer(struct ghes *ghes)
> add_timer(&ghes->timer);
> }
>
> -static void ghes_poll_func(unsigned long data)
> +static void ghes_poll_func(struct timer_list *t)
> {
> - struct ghes *ghes = (void *)data;
> + struct ghes *ghes = from_timer(ghes, t, timer);
>
> ghes_proc(ghes);
> if (!(ghes->flags & GHES_EXITING))
> @@ -1147,8 +1147,7 @@ static int ghes_probe(struct platform_device *ghes_dev)
>
> switch (generic->notify.type) {
> case ACPI_HEST_NOTIFY_POLLED:
> - setup_deferrable_timer(&ghes->timer, ghes_poll_func,
> - (unsigned long)ghes);
> + timer_setup(&ghes->timer, ghes_poll_func, TIMER_DEFERRABLE);
> ghes_add_timer(ghes);
> break;
> case ACPI_HEST_NOTIFY_EXTERNAL:
prev parent reply other threads:[~2017-10-17 13:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 23:21 Kees Cook
2017-10-17 13:48 ` Tyler Baicar [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=056ca6a5-6612-0794-c6a0-fdebb68e9937@codeaurora.org \
--to=tbaicar@codeaurora.org \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=keescook@chromium.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=shiju.jose@huawei.com \
--cc=tony.luck@intel.com \
--cc=will.deacon@arm.com \
--cc=zjzhang@codeaurora.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
all inboxes | Powered by JetHome®