[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201101160830.GA1526929@PWN>
Date: Sun, 1 Nov 2020 11:08:30 -0500
From: Peilin Ye <yepeilin.cs@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Daniel Vetter <daniel.vetter@...ll.ch>,
Sam Ravnborg <sam@...nborg.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Jiri Slaby <jirislaby@...nel.org>,
dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fbcon: Replace printk() with pr_*()
On Sun, Nov 01, 2020 at 04:41:13PM +0100, Greg Kroah-Hartman wrote:
> On Sun, Nov 01, 2020 at 09:49:04AM -0500, Peilin Ye wrote:
> > Replace printk() with pr_err(), pr_warn() and pr_info(). Do not split long
> > strings, for easier grepping. Use `__func__` whenever applicable.
> >
> > fbcon_prepare_logo() has more than one callers, use "fbcon_prepare_logo:"
> > instead of "fbcon_init:", for less confusion.
> >
> > Suggested-by: Sam Ravnborg <sam@...nborg.org>
> > Signed-off-by: Peilin Ye <yepeilin.cs@...il.com>
> > ---
> > drivers/video/fbdev/core/fbcon.c | 42 +++++++++++++-------------------
> > 1 file changed, 17 insertions(+), 25 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> > index cef437817b0d..a3e87ab0e523 100644
> > --- a/drivers/video/fbdev/core/fbcon.c
> > +++ b/drivers/video/fbdev/core/fbcon.c
> > @@ -659,8 +659,7 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
> >
> > if (logo_lines > vc->vc_bottom) {
> > logo_shown = FBCON_LOGO_CANSHOW;
> > - printk(KERN_INFO
> > - "fbcon_init: disable boot-logo (boot-logo bigger than screen).\n");
> > + pr_info("%s: disable boot-logo (boot-logo bigger than screen).\n", __func__);
>
> Shouldn't this be:
> dev_info(info->dev, "...");
> instead?
>
> It's a driver, and you have access to the struct device that is being
> worked on, so always try to use the dev_* versions of these calls
> instead when ever possible.
Ah, I see. I'll fix them in v2, thank you!
Peilin
Powered by blists - more mailing lists