lkml.org 
[lkml]   [2015]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/7] spi: lm70llp: remove printk
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-12-04 13:41    [W:0.052 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site