Re: [PATCH v1 02/28] video: fbcon: Use pr_debug() in fbcon
Hi Joe. On Fri, Nov 27, 2020 at 01:16:41PM -0800, Joe Perches wrote: > On Fri, 2020-11-27 at 20:57 +0100, Sam Ravnborg wrote: > > Replacing DPRINTK() statements with pr_debug fixes > > W=1 warnings. > > And moves to a more standard logging setup at the same time. > [] > > diff --git a/drivers/video/fbdev/core/fbcon.c > > b/drivers/video/fbdev/core/fbcon.c > [] > > @@ -1015,9 +1007,9 @@ static const char *fbcon_startup(void) > > rows /= vc->vc_font.height; > > vc_resize(vc, cols, rows); > > > > > > - DPRINTK("mode: %s\n", info->fix.id); > > - DPRINTK("visual: %d\n", info->fix.visual); > > - DPRINTK("res:%dx%d-%d\n", info->var.xres, > > + pr_debug("mode: %s\n", info->fix.id); > > + pr_debug("visual: %d\n", info->fix.visual); > > + pr_debug("res:%dx%d-%d\n", info->var.xres, > > info->var.yres, > > info->var.bits_per_pixel); > > It'd be nicer to reindent the subsequent lines too. > > > @@ -3299,7 +3291,7 @@ static void fbcon_exit(void) > > > > > > if (info->queue.func) > > pending = cancel_work_sync(>queue); > > - DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" : > > + pr_debug("fbcon: %s pending work\n", (pending ? "canceled" : > > "no")); > > perhaps: > > pr_debug("fbcon: %s pending work\n", pending ? "canceled" : > "no"); > Good suggestions, I will update accordingly in v2 or when applying in case someone acks/r-b's the patches. Sam ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v1 02/28] video: fbcon: Use pr_debug() in fbcon
On Fri, 2020-11-27 at 20:57 +0100, Sam Ravnborg wrote: > Replacing DPRINTK() statements with pr_debug fixes > W=1 warnings. > And moves to a more standard logging setup at the same time. [] > diff --git a/drivers/video/fbdev/core/fbcon.c > b/drivers/video/fbdev/core/fbcon.c [] > @@ -1015,9 +1007,9 @@ static const char *fbcon_startup(void) > rows /= vc->vc_font.height; > vc_resize(vc, cols, rows); > > > - DPRINTK("mode: %s\n", info->fix.id); > - DPRINTK("visual: %d\n", info->fix.visual); > - DPRINTK("res:%dx%d-%d\n", info->var.xres, > + pr_debug("mode: %s\n", info->fix.id); > + pr_debug("visual: %d\n", info->fix.visual); > + pr_debug("res:%dx%d-%d\n", info->var.xres, > info->var.yres, > info->var.bits_per_pixel); It'd be nicer to reindent the subsequent lines too. > @@ -3299,7 +3291,7 @@ static void fbcon_exit(void) > > > if (info->queue.func) > pending = cancel_work_sync(>queue); > - DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" : > + pr_debug("fbcon: %s pending work\n", (pending ? "canceled" : > "no")); perhaps: pr_debug("fbcon: %s pending work\n", pending ? "canceled" : "no"); ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 02/28] video: fbcon: Use pr_debug() in fbcon
Replacing DPRINTK() statements with pr_debug fixes W=1 warnings. And moves to a more standard logging setup at the same time. Signed-off-by: Sam Ravnborg Cc: Greg Kroah-Hartman Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Sam Ravnborg Cc: Jiri Slaby Cc: Peilin Ye Cc: Tetsuo Handa Cc: George Kennedy Cc: Nathan Chancellor Cc: Peter Rosin --- drivers/video/fbdev/core/fbcon.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index bf61598bf1c3..2edf90f638f3 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -56,8 +56,6 @@ * more details. */ -#undef FBCONDEBUG - #include #include #include @@ -82,12 +80,6 @@ #include "fbcon.h" -#ifdef FBCONDEBUG -# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args) -#else -# define DPRINTK(fmt, args...) -#endif - /* * FIXME: Locking * @@ -1015,9 +1007,9 @@ static const char *fbcon_startup(void) rows /= vc->vc_font.height; vc_resize(vc, cols, rows); - DPRINTK("mode: %s\n", info->fix.id); - DPRINTK("visual: %d\n", info->fix.visual); - DPRINTK("res:%dx%d-%d\n", info->var.xres, + pr_debug("mode: %s\n", info->fix.id); + pr_debug("visual: %d\n", info->fix.visual); + pr_debug("res:%dx%d-%d\n", info->var.xres, info->var.yres, info->var.bits_per_pixel); @@ -2013,7 +2005,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, y_diff < 0 || y_diff > virt_fh) { const struct fb_videomode *mode; - DPRINTK("attempting resize %ix%i\n", var.xres, var.yres); + pr_debug("attempting resize %ix%i\n", var.xres, var.yres); mode = fb_find_best_mode(, >modelist); if (mode == NULL) return -EINVAL; @@ -2023,7 +2015,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, if (virt_w > var.xres/virt_fw || virt_h > var.yres/virt_fh) return -EINVAL; - DPRINTK("resize now %ix%i\n", var.xres, var.yres); + pr_debug("resize now %ix%i\n", var.xres, var.yres); if (con_is_visible(vc)) { var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; @@ -3299,7 +3291,7 @@ static void fbcon_exit(void) if (info->queue.func) pending = cancel_work_sync(>queue); - DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" : + pr_debug("fbcon: %s pending work\n", (pending ? "canceled" : "no")); for (j = first_fb_vc; j <= last_fb_vc; j++) { -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel