fdev: i810: use appropriate log interface pr_info
Subsystems (2)
RFC PATCH 1/1 fdev: i810: use appropriate log interface pr_info
use appropriate logging interface pr_info instead of printk without KERN_INFO with it. It could be updated with proper logging interfaces.
Legacy printk() calls in the i810 fbdev driver can be replaced with the standard kernel logging interface pr_info() which will help to allow proper log level handling, making messages easier to filter and manage.
No functional changes to the driver behavior are introduced. Only the logging method has been updated to follow modern kernel coding guidelines.
--- drivers/video/fbdev/i810/i810_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/i810/i810_main.c +1 -1
@@ -2137,7 +2137,7 @@ static void i810fb_remove_pci(struct pci_dev *dev)unregister_framebuffer (info);i810fb_release_resource (info, par); -printk ("cleanup_module: unloaded i810 framebuffer device\n" ); +pr_info ("cleanup_module: unloaded i810 framebuffer device\n" ); }#ifndef MODULE
--
2.51.0
Helge Deller
maintainerQuoted 23 lines · Shi Hao
use appropriate logging interface
pr_infoinstead of printk withoutKERN_INFOwith it. It could be updated with proper logging interfaces.Legacy
printk()calls in the i810 fbdev driver can be replaced with the standard kernel logging interfacepr_info()which will help to allow proper log level handling, making messages easier to filter and manage.No functional changes to the driver behavior are introduced. Only the logging method has been updated to follow modern kernel coding guidelines.
Signed-off-by Shi Hao <[email protected]>--- drivers/video/fbdev/i810/i810_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/video/fbdev/i810/i810_main.c +0
-0
drivers/video/fbdev/i810/i810_main.c static void i810fb_remove_pci(struct pci_dev *dev) · line 2140
Quoted 5 lines
drivers/video/fbdev/i810/i810_main.c +1
-1@@ -2137,7 +2137,7 @@ static void i810fb_remove_pci(struct pci_dev *dev)unregister_framebuffer (info);i810fb_release_resource (info, par); -printk ("cleanup_module: unloaded i810 framebuffer device\n" ); +pr_info ("cleanup_module: unloaded i810 framebuffer device\n" );
Thanks for your patch!
It's possible to change it like this, but I wonder:
Why did you choose to change that specific line?
What about the other printk() in this file ?
Ideally we then should use dev_info() or dev_warn() [...] instead. and most important:
There is no actual reason to change it. Usually we touch such lines and clean then up when we anyway change code in this area.
So, your patch is appreciated, but I'm a little hesitant to take it (although it's basically correct!).
Helge