Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1283773

Re: [PATCH 6/7] spi: lm70llp: remove printk

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 6/7] spi: lm70llp: remove printk
Date 2015-12-04 13:20 +0100
Message-ID <qBXvc-2xR-9@gated-at.bofh.it> (permalink)
References <qBBO1-5tU-1@gated-at.bofh.it> <qBBO2-5tU-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] spi: lm70llp: remove multiple blank lines Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-03 14:10 +0100
  [PATCH 3/7] spi: lm70llp: remove cast to void Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-03 14:10 +0100
  [PATCH 7/7] spi: lm70llp: use new parport device model Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-03 14:10 +0100
  [PATCH 6/7] spi: lm70llp: remove printk Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-03 14:10 +0100
    Re: [PATCH 6/7] spi: lm70llp: remove printk Mark Brown <broonie@kernel.org> - 2015-12-04 13:20 +0100
  [PATCH 4/7] spi: lm70llp: correct alignment Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-03 14:10 +0100
  [PATCH 5/7] spi: lm70llp: remove space Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-03 14:10 +0100
  [PATCH 2/7] spi: lm70llp: add blank line after declaration Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-03 14:10 +0100

csiph-web