[PATCH] example-module: use pr_info instead of printk

9 views
Skip to first unread message

srinuv...@siemens.com

unread,
Apr 10, 2026, 12:50:24 PM (8 days ago) Apr 10
to isar-...@googlegroups.com, Srinuvasan A
From: Srinuvasan A <srinuv...@siemens.com>

The initialization message was not visible in dmesg
when the module was loaded.

Switch to pr_info() to ensure the message is properly
logged and visible during module initialization.

Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
---
.../recipes-kernel/example-module/files/src/example-module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-isar/recipes-kernel/example-module/files/src/example-module.c b/meta-isar/recipes-kernel/example-module/files/src/example-module.c
index 4e74ee74..5a408726 100644
--- a/meta-isar/recipes-kernel/example-module/files/src/example-module.c
+++ b/meta-isar/recipes-kernel/example-module/files/src/example-module.c
@@ -10,7 +10,7 @@

static int __init example_module_init(void)
{
- printk("Just an example\n");
+ pr_info("Just an example\n");
return 0;
}

--
2.34.1

Jan Kiszka

unread,
Apr 10, 2026, 1:41:55 PM (8 days ago) Apr 10
to srinuv...@siemens.com, isar-...@googlegroups.com
On 10.04.26 18:50, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuv...@siemens.com>
>
> The initialization message was not visible in dmesg
> when the module was loaded.

That is a matter of log level settings on the target. We can still
change this if it helps.

>
> Switch to pr_info() to ensure the message is properly
> logged and visible during module initialization.
>

Which test case in Isar was affected by this? Or was this a downstream
target?

> Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
> ---
> .../recipes-kernel/example-module/files/src/example-module.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-isar/recipes-kernel/example-module/files/src/example-module.c b/meta-isar/recipes-kernel/example-module/files/src/example-module.c
> index 4e74ee74..5a408726 100644
> --- a/meta-isar/recipes-kernel/example-module/files/src/example-module.c
> +++ b/meta-isar/recipes-kernel/example-module/files/src/example-module.c
> @@ -10,7 +10,7 @@
>
> static int __init example_module_init(void)
> {
> - printk("Just an example\n");
> + pr_info("Just an example\n");
> return 0;
> }
>

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Arjunan, Srinu

unread,
Apr 17, 2026, 1:03:14 AM (yesterday) Apr 17
to Kiszka, Jan, isar-...@googlegroups.com
> Which test case in Isar was affected by this? Or was this a downstream target?

No Isar test cases are affected, this was observed only on a downstream target.

Your point is valid — we will look into adjusting the log level settings on our target instead of unconditionally ensuring the message appears in dmesg.

Many thanks,
Srinu

-----Original Message-----
From: Kiszka, Jan (FT RPD CED) <jan.k...@siemens.com>
Sent: 10 April 2026 23:12
To: Arjunan, Srinu (FT FDS CES LX PBU 2) <srinuv...@siemens.com>; isar-...@googlegroups.com
Subject: Re: [PATCH] example-module: use pr_info instead of printk

On 10.04.26 18:50, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuv...@siemens.com>
>
> The initialization message was not visible in dmesg when the module
> was loaded.

That is a matter of log level settings on the target. We can still change this if it helps.

>
> Switch to pr_info() to ensure the message is properly logged and
> visible during module initialization.
>

Which test case in Isar was affected by this? Or was this a downstream target?

> Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
> ---
> .../recipes-kernel/example-module/files/src/example-module.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
> a/meta-isar/recipes-kernel/example-module/files/src/example-module.c
> b/meta-isar/recipes-kernel/example-module/files/src/example-module.c
> index 4e74ee74..5a408726 100644
> ---
> a/meta-isar/recipes-kernel/example-module/files/src/example-module.c
> +++ b/meta-isar/recipes-kernel/example-module/files/src/example-module
> +++ .c
Reply all
Reply to author
Forward
0 new messages