drivers/misc: dummy-irq: use pr_* logging helpers
PATCH 1/1 drivers/misc: dummy-irq: use pr_* logging helpers
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.
--- drivers/misc/dummy-irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/misc/dummy-irq.c +7 -7
@@ -14,16 +14,16 @@#include <linux/module.h> #include <linux/irq.h> #include <linux/interrupt.h> +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmtstatic 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); }
Signature · 1 line
2.34.1
Greg KH
maintainerQuoted 6 lines · 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
kernel test robot
build botkernel test robot noticed the following build warnings:
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/[email protected]/config) compiler: csky-linux-gcc (GCC) 14.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
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 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki