All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-skeleton][PATCH 1/2] hello-mod/hello.c: convert to module_init/module_exit
@ 2021-09-15  0:38 Trevor Woerner
  2021-09-15  0:38 ` [meta-skeleton][PATCH 2/2] hello-mod/hello.c: convert printk to pr_xxx Trevor Woerner
  2021-09-15 10:52 ` [OE-core] [meta-skeleton][PATCH 1/2] hello-mod/hello.c: convert to module_init/module_exit Quentin Schulz
  0 siblings, 2 replies; 6+ messages in thread
From: Trevor Woerner @ 2021-09-15  0:38 UTC (permalink / raw)
  To: openembedded-core

Switch away from the old init_module/cleanup_module function names for the
main entry points. Change them to the documented method with module_init()
and module_exit() markers next to static functions.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 meta-skeleton/recipes-kernel/hello-mod/files/hello.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
index f3c0d372eb..b68b0c348e 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
+++ b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
@@ -19,15 +19,17 @@
 
 #include <linux/module.h>
 
-int init_module(void)
+static int __init hello_init(void)
 {
 	printk("Hello World!\n");
 	return 0;
 }
 
-void cleanup_module(void)
+static void __exit hello_exit(void)
 {
 	printk("Goodbye Cruel World!\n");
 }
 
+module_init(hello_init);
+module_exit(hello_exit);
 MODULE_LICENSE("GPL");
-- 
2.30.0.rc0


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

* [meta-skeleton][PATCH 2/2] hello-mod/hello.c: convert printk to pr_xxx
  2021-09-15  0:38 [meta-skeleton][PATCH 1/2] hello-mod/hello.c: convert to module_init/module_exit Trevor Woerner
@ 2021-09-15  0:38 ` Trevor Woerner
  2021-09-15 10:53   ` [OE-core] " Quentin Schulz
  2021-09-15 10:52 ` [OE-core] [meta-skeleton][PATCH 1/2] hello-mod/hello.c: convert to module_init/module_exit Quentin Schulz
  1 sibling, 1 reply; 6+ messages in thread
From: Trevor Woerner @ 2021-09-15  0:38 UTC (permalink / raw)
  To: openembedded-core

Convert to the newer pr_xxx aliases for logging, which embed the log level in
the macro names.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 meta-skeleton/recipes-kernel/hello-mod/files/hello.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
index b68b0c348e..6b73a79524 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
+++ b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
@@ -21,13 +21,13 @@
 
 static int __init hello_init(void)
 {
-	printk("Hello World!\n");
+	pr_info("Hello World!\n");
 	return 0;
 }
 
 static void __exit hello_exit(void)
 {
-	printk("Goodbye Cruel World!\n");
+	pr_info("Goodbye Cruel World!\n");
 }
 
 module_init(hello_init);
-- 
2.30.0.rc0


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

* Re: [OE-core] [meta-skeleton][PATCH 1/2] hello-mod/hello.c: convert to module_init/module_exit
  2021-09-15  0:38 [meta-skeleton][PATCH 1/2] hello-mod/hello.c: convert to module_init/module_exit Trevor Woerner
  2021-09-15  0:38 ` [meta-skeleton][PATCH 2/2] hello-mod/hello.c: convert printk to pr_xxx Trevor Woerner
@ 2021-09-15 10:52 ` Quentin Schulz
  1 sibling, 0 replies; 6+ messages in thread
From: Quentin Schulz @ 2021-09-15 10:52 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: openembedded-core

Hi Trevor,

On Tue, Sep 14, 2021 at 08:38:03PM -0400, Trevor Woerner wrote:
> Switch away from the old init_module/cleanup_module function names for the
> main entry points. Change them to the documented method with module_init()
> and module_exit() markers next to static functions.
> 
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>

Reviewed-by: Quentin Schulz <foss@0leil.net>

Thanks!
Quentin

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

* Re: [OE-core] [meta-skeleton][PATCH 2/2] hello-mod/hello.c: convert printk to pr_xxx
  2021-09-15  0:38 ` [meta-skeleton][PATCH 2/2] hello-mod/hello.c: convert printk to pr_xxx Trevor Woerner
@ 2021-09-15 10:53   ` Quentin Schulz
  2021-09-27  7:42     ` Trevor Woerner
  0 siblings, 1 reply; 6+ messages in thread
From: Quentin Schulz @ 2021-09-15 10:53 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: openembedded-core

Hi Trevor,

On Tue, Sep 14, 2021 at 08:38:04PM -0400, Trevor Woerner wrote:
> Convert to the newer pr_xxx aliases for logging, which embed the log level in
> the macro names.
> 
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>

Reviewed-by: Quentin Schulz <foss@0leil.net>

Thanks!
Quentin

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

* Re: [OE-core] [meta-skeleton][PATCH 2/2] hello-mod/hello.c: convert printk to pr_xxx
  2021-09-15 10:53   ` [OE-core] " Quentin Schulz
@ 2021-09-27  7:42     ` Trevor Woerner
  2021-09-27  8:41       ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Trevor Woerner @ 2021-09-27  7:42 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

ping?

It seems 1/2 got applied, but I didn't see an NAKs for 2/2?

On Wed, Sep 15, 2021 at 6:53 AM Quentin Schulz <
quentin.schulz@theobroma-systems.com> wrote:

> Hi Trevor,
>
> On Tue, Sep 14, 2021 at 08:38:04PM -0400, Trevor Woerner wrote:
> > Convert to the newer pr_xxx aliases for logging, which embed the log
> level in
> > the macro names.
> >
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>
> Reviewed-by: Quentin Schulz <foss@0leil.net>
>
> Thanks!
> Quentin
>

[-- Attachment #2: Type: text/html, Size: 972 bytes --]

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

* Re: [OE-core] [meta-skeleton][PATCH 2/2] hello-mod/hello.c: convert printk to pr_xxx
  2021-09-27  7:42     ` Trevor Woerner
@ 2021-09-27  8:41       ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2021-09-27  8:41 UTC (permalink / raw)
  To: Trevor Woerner, Quentin Schulz
  Cc: Patches and discussions about the oe-core layer

On Mon, 2021-09-27 at 03:42 -0400, Trevor Woerner wrote:
> ping?
> 
> It seems 1/2 got applied, but I didn't see an NAKs for 2/2?

My intention was to apply both, not sure what happened, sorry. I've queued it.

Cheers,

Richard



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

end of thread, other threads:[~2021-09-27  8:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15  0:38 [meta-skeleton][PATCH 1/2] hello-mod/hello.c: convert to module_init/module_exit Trevor Woerner
2021-09-15  0:38 ` [meta-skeleton][PATCH 2/2] hello-mod/hello.c: convert printk to pr_xxx Trevor Woerner
2021-09-15 10:53   ` [OE-core] " Quentin Schulz
2021-09-27  7:42     ` Trevor Woerner
2021-09-27  8:41       ` Richard Purdie
2021-09-15 10:52 ` [OE-core] [meta-skeleton][PATCH 1/2] hello-mod/hello.c: convert to module_init/module_exit Quentin Schulz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.