public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* Re: [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code
  2020-09-14  6:53 [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code Liu Shixin
@ 2020-09-14  6:38 ` Joel Stanley
  2020-09-16 17:22 ` Borislav Petkov
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Stanley @ 2020-09-14  6:38 UTC (permalink / raw)
  To: Liu Shixin
  Cc: Tony Luck, Robert Richter, James Morse, linux-aspeed,
	Andrew Jeffery, Linux Kernel Mailing List, Borislav Petkov,
	Stefan Schaeckeler, Mauro Carvalho Chehab, Linux ARM, linux-edac

On Mon, 14 Sep 2020 at 06:31, Liu Shixin <liushixin2@huawei.com> wrote:
>
> module_platform_driver() makes the code simpler by eliminating
> boilerplate code.
>
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>

Reviewed-by: Joel Stanley <joel@jms.id.au>

> ---
>  drivers/edac/aspeed_edac.c | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> index fbec28dc661d..fde809efc520 100644
> --- a/drivers/edac/aspeed_edac.c
> +++ b/drivers/edac/aspeed_edac.c
> @@ -388,23 +388,7 @@ static struct platform_driver aspeed_driver = {
>         .probe          = aspeed_probe,
>         .remove         = aspeed_remove
>  };
> -
> -
> -static int __init aspeed_init(void)
> -{
> -       return platform_driver_register(&aspeed_driver);
> -}
> -
> -
> -static void __exit aspeed_exit(void)
> -{
> -       platform_driver_unregister(&aspeed_driver);
> -}
> -
> -
> -module_init(aspeed_init);
> -module_exit(aspeed_exit);
> -
> +module_platform_driver(aspeed_driver);
>
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Stefan Schaeckeler <sschaeck@cisco.com>");
> --
> 2.25.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code
@ 2020-09-14  6:53 Liu Shixin
  2020-09-14  6:38 ` Joel Stanley
  2020-09-16 17:22 ` Borislav Petkov
  0 siblings, 2 replies; 3+ messages in thread
From: Liu Shixin @ 2020-09-14  6:53 UTC (permalink / raw)
  To: Stefan Schaeckeler, Borislav Petkov, Mauro Carvalho Chehab,
	Tony Luck, James Morse, Robert Richter, Joel Stanley,
	Andrew Jeffery
  Cc: Liu Shixin, linux-kernel, linux-aspeed, linux-arm-kernel,
	linux-edac

module_platform_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/edac/aspeed_edac.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index fbec28dc661d..fde809efc520 100644
--- a/drivers/edac/aspeed_edac.c
+++ b/drivers/edac/aspeed_edac.c
@@ -388,23 +388,7 @@ static struct platform_driver aspeed_driver = {
 	.probe		= aspeed_probe,
 	.remove		= aspeed_remove
 };
-
-
-static int __init aspeed_init(void)
-{
-	return platform_driver_register(&aspeed_driver);
-}
-
-
-static void __exit aspeed_exit(void)
-{
-	platform_driver_unregister(&aspeed_driver);
-}
-
-
-module_init(aspeed_init);
-module_exit(aspeed_exit);
-
+module_platform_driver(aspeed_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Stefan Schaeckeler <sschaeck@cisco.com>");
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code
  2020-09-14  6:53 [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code Liu Shixin
  2020-09-14  6:38 ` Joel Stanley
@ 2020-09-16 17:22 ` Borislav Petkov
  1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2020-09-16 17:22 UTC (permalink / raw)
  To: Liu Shixin
  Cc: Tony Luck, Robert Richter, linux-aspeed, Andrew Jeffery,
	linux-kernel, James Morse, Joel Stanley, Stefan Schaeckeler,
	Mauro Carvalho Chehab, linux-arm-kernel, linux-edac

On Mon, Sep 14, 2020 at 02:53:58PM +0800, Liu Shixin wrote:
> module_platform_driver() makes the code simpler by eliminating
> boilerplate code.
> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
>  drivers/edac/aspeed_edac.c | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
> 
> diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> index fbec28dc661d..fde809efc520 100644
> --- a/drivers/edac/aspeed_edac.c
> +++ b/drivers/edac/aspeed_edac.c
> @@ -388,23 +388,7 @@ static struct platform_driver aspeed_driver = {
>  	.probe		= aspeed_probe,
>  	.remove		= aspeed_remove
>  };
> -
> -
> -static int __init aspeed_init(void)
> -{
> -	return platform_driver_register(&aspeed_driver);
> -}
> -
> -
> -static void __exit aspeed_exit(void)
> -{
> -	platform_driver_unregister(&aspeed_driver);
> -}
> -
> -
> -module_init(aspeed_init);
> -module_exit(aspeed_exit);
> -
> +module_platform_driver(aspeed_driver);
>  
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Stefan Schaeckeler <sschaeck@cisco.com>");
> -- 

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-09-16 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-14  6:53 [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code Liu Shixin
2020-09-14  6:38 ` Joel Stanley
2020-09-16 17:22 ` Borislav Petkov

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