From: Minu Jin <s9430939@naver.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, Minu Jin <s9430939@naver.com>
Subject: [PATCH] char: mem: fix typo and use pr_err() for logging
Date: Fri, 2 Jan 2026 15:27:59 +0900 [thread overview]
Message-ID: <20260102062759.3749606-1-s9430939@naver.com> (raw)
Fix a typo in the comment of read_mem(): funcion -> function
Replace a raw printk() call in chr_dev_init() with pr_err().
The original call lacked a log level, which is discouraged.
Using pr_err() ensures the error is properly categorized and
follows modern logging practices.
Signed-off-by: Minu Jin <s9430939@naver.com>
---
drivers/char/mem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 52039fae1594..4c6bb10d1508 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -76,7 +76,7 @@ static inline bool should_stop_iteration(void)
}
/*
- * This funcion reads the *physical* memory. The f_pos points directly to the
+ * This function reads the *physical* memory. The f_pos points directly to the
* memory location.
*/
static ssize_t read_mem(struct file *file, char __user *buf,
@@ -765,7 +765,7 @@ static int __init chr_dev_init(void)
int minor;
if (register_chrdev(MEM_MAJOR, "mem", &memory_fops))
- printk("unable to get major %d for memory devs\n", MEM_MAJOR);
+ pr_err("unable to get major %d for memory devs\n", MEM_MAJOR);
retval = class_register(&mem_class);
if (retval)
--
2.43.0
next reply other threads:[~2026-01-02 6:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 6:27 Minu Jin [this message]
2026-01-16 15:28 ` Greg KH
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=20260102062759.3749606-1-s9430939@naver.com \
--to=s9430939@naver.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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®