public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI / APEI: use setup_deferrable_timer
@ 2017-03-11  0:46 Geliang Tang
  2017-03-14 18:06 ` Baicar, Tyler
  2017-04-18 14:41 ` Rafael J. Wysocki
  0 siblings, 2 replies; 4+ messages in thread
From: Geliang Tang @ 2017-03-11  0:46 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Borislav Petkov
  Cc: Geliang Tang, linux-acpi, linux-kernel

Use setup_deferrable_timer() instead of init_timer_deferrable() to
simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/acpi/apei/ghes.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index b192b42..33ca196 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1005,9 +1005,8 @@ static int ghes_probe(struct platform_device *ghes_dev)
 
 	switch (generic->notify.type) {
 	case ACPI_HEST_NOTIFY_POLLED:
-		ghes->timer.function = ghes_poll_func;
-		ghes->timer.data = (unsigned long)ghes;
-		init_timer_deferrable(&ghes->timer);
+		setup_deferrable_timer(&ghes->timer, ghes_poll_func,
+				       (unsigned long)ghes);
 		ghes_add_timer(ghes);
 		break;
 	case ACPI_HEST_NOTIFY_EXTERNAL:
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI / APEI: use setup_deferrable_timer
  2017-03-11  0:46 [PATCH] ACPI / APEI: use setup_deferrable_timer Geliang Tang
@ 2017-03-14 18:06 ` Baicar, Tyler
  2017-04-18 14:41 ` Rafael J. Wysocki
  1 sibling, 0 replies; 4+ messages in thread
From: Baicar, Tyler @ 2017-03-14 18:06 UTC (permalink / raw)
  To: Geliang Tang, Rafael J. Wysocki, Len Brown, Borislav Petkov
  Cc: linux-acpi, linux-kernel

Works for me!

On 3/10/2017 5:46 PM, Geliang Tang wrote:
> Use setup_deferrable_timer() instead of init_timer_deferrable() to
> simplify the code.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
> ---
>   drivers/acpi/apei/ghes.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index b192b42..33ca196 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -1005,9 +1005,8 @@ static int ghes_probe(struct platform_device *ghes_dev)
>   
>   	switch (generic->notify.type) {
>   	case ACPI_HEST_NOTIFY_POLLED:
> -		ghes->timer.function = ghes_poll_func;
> -		ghes->timer.data = (unsigned long)ghes;
> -		init_timer_deferrable(&ghes->timer);
> +		setup_deferrable_timer(&ghes->timer, ghes_poll_func,
> +				       (unsigned long)ghes);
>   		ghes_add_timer(ghes);
>   		break;
>   	case ACPI_HEST_NOTIFY_EXTERNAL:

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI / APEI: use setup_deferrable_timer
  2017-03-11  0:46 [PATCH] ACPI / APEI: use setup_deferrable_timer Geliang Tang
  2017-03-14 18:06 ` Baicar, Tyler
@ 2017-04-18 14:41 ` Rafael J. Wysocki
  2017-04-18 17:21   ` Borislav Petkov
  1 sibling, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2017-04-18 14:41 UTC (permalink / raw)
  To: Geliang Tang, Borislav Petkov, Luck, Tony
  Cc: Len Brown, linux-acpi, linux-kernel

On Saturday, March 11, 2017 08:46:55 AM Geliang Tang wrote:
> Use setup_deferrable_timer() instead of init_timer_deferrable() to
> simplify the code.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>

Boris, Tony, any concerns?

If not, do you want to route this through the RAS tree?

> ---
>  drivers/acpi/apei/ghes.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index b192b42..33ca196 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -1005,9 +1005,8 @@ static int ghes_probe(struct platform_device *ghes_dev)
>  
>  	switch (generic->notify.type) {
>  	case ACPI_HEST_NOTIFY_POLLED:
> -		ghes->timer.function = ghes_poll_func;
> -		ghes->timer.data = (unsigned long)ghes;
> -		init_timer_deferrable(&ghes->timer);
> +		setup_deferrable_timer(&ghes->timer, ghes_poll_func,
> +				       (unsigned long)ghes);
>  		ghes_add_timer(ghes);
>  		break;
>  	case ACPI_HEST_NOTIFY_EXTERNAL:
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI / APEI: use setup_deferrable_timer
  2017-04-18 14:41 ` Rafael J. Wysocki
@ 2017-04-18 17:21   ` Borislav Petkov
  0 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2017-04-18 17:21 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Geliang Tang, Luck, Tony, Len Brown, linux-acpi, linux-kernel

On Tue, Apr 18, 2017 at 04:41:55PM +0200, Rafael J. Wysocki wrote:
> On Saturday, March 11, 2017 08:46:55 AM Geliang Tang wrote:
> > Use setup_deferrable_timer() instead of init_timer_deferrable() to
> > simplify the code.
> > 
> > Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> 
> Boris, Tony, any concerns?
> 
> If not, do you want to route this through the RAS tree?

Sure, applied, thanks.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-18 17:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11  0:46 [PATCH] ACPI / APEI: use setup_deferrable_timer Geliang Tang
2017-03-14 18:06 ` Baicar, Tyler
2017-04-18 14:41 ` Rafael J. Wysocki
2017-04-18 17:21   ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox