lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260102062759.3749606-1-s9430939@naver.com>
Date: Fri,  2 Jan 2026 15:27:59 +0900
From: Minu Jin <s9430939@...er.com>
To: arnd@...db.de,
	gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org,
	Minu Jin <s9430939@...er.com>
Subject: [PATCH] char: mem: fix typo and use pr_err() for logging

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@...er.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ