public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: a <osalexandeko@gmail.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org,
	a <a@JS-Host.myguest.virtualbox.org>,
	Alex Kazansky <osalexandeko@gmail.com>
Subject: [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers
Date: Sun, 19 Apr 2026 07:03:08 +0300	[thread overview]
Message-ID: <20260419040308.4239-1-a@JS-Host.myguest.virtualbox.org> (raw)

Replace printk(KERN_*) with pr_*() helpers for improved readability
and consistency with current kernel logging style.

Add pr_fmt() to avoid repeating module name in log messages.

No functional change intended.

Signed-off-by: Alex Kazansky <osalexandeko@gmail.com>
---
 drivers/misc/dummy-irq.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/misc/dummy-irq.c b/drivers/misc/dummy-irq.c
index fe3bfcb31a4c..d1cefd8f6e0a 100644
--- a/drivers/misc/dummy-irq.c
+++ b/drivers/misc/dummy-irq.c
@@ -14,16 +14,16 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 static int irq = -1;
 
 static irqreturn_t dummy_interrupt(int irq, void *dev_id)
 {
-	static int count = 0;
+	static int count;
 
 	if (count == 0) {
-		printk(KERN_INFO "dummy-irq: interrupt occurred on IRQ %d\n",
-				irq);
+		pr_info("interrupt occurred on IRQ %d\n", irq);
 		count++;
 	}
 
@@ -33,20 +33,20 @@ static irqreturn_t dummy_interrupt(int irq, void *dev_id)
 static int __init dummy_irq_init(void)
 {
 	if (irq < 0) {
-		printk(KERN_ERR "dummy-irq: no IRQ given.  Use irq=N\n");
+		pr_err("no IRQ given. Use irq=N\n");
 		return -EIO;
 	}
 	if (request_irq(irq, &dummy_interrupt, IRQF_SHARED, "dummy_irq", &irq)) {
-		printk(KERN_ERR "dummy-irq: cannot register IRQ %d\n", irq);
+		pr_err("cannot register IRQ %d\n", irq);
 		return -EIO;
 	}
-	printk(KERN_INFO "dummy-irq: registered for IRQ %d\n", irq);
+	pr_info("registered for IRQ %d\n", irq);
 	return 0;
 }
 
 static void __exit dummy_irq_exit(void)
 {
-	printk(KERN_INFO "dummy-irq unloaded\n");
+	pr_info("unloaded\n");
 	free_irq(irq, &irq);
 }
 
-- 
2.34.1


             reply	other threads:[~2026-04-19  4:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19  4:03 a [this message]
2026-04-19  5:28 ` [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers Greg KH
2026-04-30  3:06 ` kernel test robot

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=20260419040308.4239-1-a@JS-Host.myguest.virtualbox.org \
    --to=osalexandeko@gmail.com \
    --cc=a@JS-Host.myguest.virtualbox.org \
    --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