mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Fabio Falzoi <fabio.falzoi84@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] Staging: rts5139: pr_warn(...) in place of printk(KERN_WARNING ...)
Date: Mon, 07 Apr 2014 13:34:47 -0700	[thread overview]
Message-ID: <1396902887.2874.62.camel@joe-AO722> (raw)
In-Reply-To: <1396902468-27906-5-git-send-email-fabio.falzoi84@gmail.com>

On Mon, 2014-04-07 at 22:27 +0200, Fabio Falzoi wrote:
> All printk(KERN_WARNING ...) replaced with pr_warn(...).

Please remove the RTS51X_TIP prefix and and and use

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

before any #include so that pr_<level> uses
are prefixed in a standard way.

> diff --git a/drivers/staging/rts5139/rts51x.c b/drivers/staging/rts5139/rts51x.c
[]
> @@ -725,8 +725,8 @@ static int rts51x_probe(struct usb_interface *intf,
>  
>  	rts51x = kzalloc(sizeof(struct rts51x_usb), GFP_KERNEL);
>  	if (!rts51x) {
> -		printk(KERN_WARNING RTS51X_TIP
> -		       "Unable to allocate rts51x_usb\n");
> +		pr_warn(RTS51X_TIP
> +			"Unable to allocate rts51x_usb\n");

This could be deleted.

alloc OOM messages aren't necessary as there's a generic
OOM message with a dump_stack() already done.

> @@ -736,8 +736,8 @@ static int rts51x_probe(struct usb_interface *intf,
>  	 */
>  	host = scsi_host_alloc(&rts51x_host_template, sizeof(*chip));
>  	if (!host) {
> -		printk(KERN_WARNING RTS51X_TIP
> -		       "Unable to allocate the scsi host\n");
> +		pr_warn(RTS51X_TIP
> +			"Unable to allocate the scsi host\n");

This could be on a single line

		pr_warn("Unable to allocate the scsi host\n");

> @@ -778,8 +778,8 @@ static int rts51x_probe(struct usb_interface *intf,
>  	/* Start up our control thread */
>  	th = kthread_run(rts51x_control_thread, chip, RTS51X_CTL_THREAD);
>  	if (IS_ERR(th)) {
> -		printk(KERN_WARNING RTS51X_TIP
> -		       "Unable to start control thread\n");
> +		pr_warn(RTS51X_TIP
> +			"Unable to start control thread\n");

single line, etc.



  reply	other threads:[~2014-04-07 20:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-06 22:45 [PATCH] Staging: rts5139: fix coding style Fabio Falzoi
2014-04-07  0:33 ` Greg KH
2014-04-07 20:27   ` [PATCH v2 0/5] Staging: rts5139: Fix " Fabio Falzoi
2014-04-07 20:27     ` [PATCH v2 1/5] Staging: rts5139: Camel case labels replaced Fabio Falzoi
2014-04-07 20:27     ` [PATCH v2 2/5] Staging: rts5139: Fixed multi-line code alignment Fabio Falzoi
2014-04-07 20:27     ` [PATCH v2 3/5] Staging: rts5139: Splitted one-line multiple assignment Fabio Falzoi
2014-04-07 20:27     ` [PATCH v2 4/5] Staging: rts5139: pr_warn(...) in place of printk(KERN_WARNING ...) Fabio Falzoi
2014-04-07 20:34       ` Joe Perches [this message]
2014-04-07 20:56         ` Greg KH
2014-04-07 22:03           ` Joe Perches
2014-04-07 20:27     ` [PATCH v2 5/5] Staging: rts5139: More appropriate sizeof operand Fabio Falzoi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396902887.2874.62.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=fabio.falzoi84@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®