Re: [PATCH 2/3] w1: use pr_* instead of printk

From: Joe Perches
Date: Wed Jun 18 2014 - 21:07:22 EST


On Thu, 2014-06-19 at 02:52 +0200, Fjodor Schelichow wrote:
> This patch replaces all calls to the "printk" function within the main "w1"
> directory by calls to the appropriate "pr_*" function thus addressing
> the following warning generated by the checkpatch script:
[]
> diff --git a/drivers/w1/w1_log.h b/drivers/w1/w1_log.h
[]
> @@ -29,8 +29,8 @@
> #else
> # define assert(expr) \
> if(unlikely(!(expr))) { \
> - printk(KERN_ERR "Assertion failed! %s,%s,%s,line=%d\n", \
> - #expr, __FILE__, __func__, __LINE__); \
> + pr_err("Assertion failed! %s,%s,%s,line=%d\n", \
> + #expr, __FILE__, __func__, __LINE__); \
> }

These macros should really be surrounded by a do { ... } while (0)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/