public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers
@ 2026-04-19  4:03 a
  2026-04-19  5:28 ` Greg KH
  2026-04-30  3:06 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: a @ 2026-04-19  4:03 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: linux-kernel, a, Alex Kazansky

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


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

* Re: [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers
  2026-04-19  4:03 [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers a
@ 2026-04-19  5:28 ` Greg KH
  2026-04-30  3:06 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2026-04-19  5:28 UTC (permalink / raw)
  To: a; +Cc: arnd, linux-kernel, a

On Sun, Apr 19, 2026 at 07:03:08AM +0300, a wrote:
> 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.

You created functional changes, and your email "From:" line was
incorrect.

Please work on basic cleanup patches in drivers/staging/ first, before
going out into other areas of the kernel, so that you get the proper
experience of the workflow correct.

thanks,

greg k-h

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

* Re: [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers
  2026-04-19  4:03 [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers a
  2026-04-19  5:28 ` Greg KH
@ 2026-04-30  3:06 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-04-30  3:06 UTC (permalink / raw)
  To: a, arnd, gregkh; +Cc: oe-kbuild-all, linux-kernel, a, Alex Kazansky

Hi a,

kernel test robot noticed the following build warnings:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus soc/for-next staging/staging-testing staging/staging-next staging/staging-linus linus/master v7.1-rc1 next-20260429]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/a/drivers-misc-dummy-irq-use-pr_-logging-helpers/20260426-190343
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20260419040308.4239-1-a%40JS-Host.myguest.virtualbox.org
patch subject: [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers
config: csky-randconfig-002-20260430 (https://download.01.org/0day-ci/archive/20260430/202604301104.37n6lDbO-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/202604301104.37n6lDbO-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604301104.37n6lDbO-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/misc/dummy-irq.c:17:9: warning: "pr_fmt" redefined
      17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
         |         ^~~~~~
   In file included from include/asm-generic/bug.h:31,
                    from arch/csky/include/asm/bug.h:18,
                    from include/linux/bug.h:5,
                    from include/linux/instrumented.h:10,
                    from include/linux/atomic/atomic-instrumented.h:17,
                    from include/linux/atomic.h:82,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/csky/include/asm/bitops.h:69,
                    from include/linux/bitops.h:67,
                    from include/linux/log2.h:12,
                    from include/asm-generic/div64.h:55,
                    from ./arch/csky/include/generated/asm/div64.h:1,
                    from include/linux/math.h:6,
                    from include/linux/math64.h:6,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from drivers/misc/dummy-irq.c:14:
   include/linux/printk.h:401:9: note: this is the location of the previous definition
     401 | #define pr_fmt(fmt) fmt
         |         ^~~~~~


vim +/pr_fmt +17 drivers/misc/dummy-irq.c

  > 17	#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
    18	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2026-04-30  3:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-19  4:03 [PATCH] [PATCH] drivers/misc: dummy-irq: use pr_* logging helpers a
2026-04-19  5:28 ` Greg KH
2026-04-30  3:06 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox