mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH 6/7] spi: lm70llp: remove printk
Date: Fri, 4 Dec 2015 12:16:23 +0000	[thread overview]
Message-ID: <20151204121623.GA26072@sirena.org.uk> (raw)
In-Reply-To: <1449147599-26705-6-git-send-email-sudipm.mukherjee@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 768 bytes --]

On Thu, Dec 03, 2015 at 06:29:58PM +0530, Sudip Mukherjee wrote:
> Using pr_* macros are more prefferable than using printk. Start using
> pr_* family of macros and define pr_fmt to be used with it.
> While at it remove DRVNAME from an existing pr_info() as the name is now
> being printed by pr_fmt.

> @@ -246,9 +245,7 @@ static void spi_lm70llp_attach(struct parport *p)
>  	 */
>  	status = spi_bitbang_start(&pp->bitbang);
>  	if (status < 0) {
> -		printk(KERN_WARNING
> -			"%s: spi_bitbang_start failed with status %d\n",
> -			DRVNAME, status);
> +		pr_warn("spi_bitbang_start failed with status %d\n", status);
>  		goto out_off_and_release;
>  	}
>  

When we have a struct device available it's even better to use
dev_warn() and so on.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-12-04 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 12:59 [PATCH 1/7] spi: lm70llp: remove multiple blank lines Sudip Mukherjee
2015-12-03 12:59 ` [PATCH 2/7] spi: lm70llp: add blank line after declaration Sudip Mukherjee
2015-12-03 12:59 ` [PATCH 3/7] spi: lm70llp: remove cast to void Sudip Mukherjee
2015-12-03 12:59 ` [PATCH 4/7] spi: lm70llp: correct alignment Sudip Mukherjee
2015-12-03 12:59 ` [PATCH 5/7] spi: lm70llp: remove space Sudip Mukherjee
2015-12-03 12:59 ` [PATCH 6/7] spi: lm70llp: remove printk Sudip Mukherjee
2015-12-04 12:16   ` Mark Brown [this message]
2015-12-03 12:59 ` [PATCH 7/7] spi: lm70llp: use new parport device model Sudip Mukherjee

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=20151204121623.GA26072@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /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®