RE: [PATCH v2 09/20] DSPBRIDGE: checkpatch - printk() should include KERN_ facility level

Menon, Nishanth
2009-12-01T03:57:13Z

> From: Ramirez Luna, Omar
> Sent: Monday, November 30, 2009 11:55 PM
> To: linux-omap
> Cc: Ramirez Luna, Omar; Menon, Nishanth
> Subject: [PATCH v2 09/20] DSPBRIDGE: checkpatch - printk() should include
> KERN_ facility level
>
> WARNING: printk() should include KERN_ facility level

Any reason why we would like to stick with printk(KERN_ERR when we can use pr_err ?

>
> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
> CC: Nishant Menon <nm@ti.com>
> ---
> arch/arm/plat-omap/include/dspbridge/dbc.h | 2 +-
> arch/arm/plat-omap/include/dspbridge/gt.h | 2 +-
> drivers/dsp/bridge/gen/_gt_para.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/dspbridge/dbc.h b/arch/arm/plat-
> omap/include/dspbridge/dbc.h
> index e9cb548..13b1ff6 100644
> --- a/arch/arm/plat-omap/include/dspbridge/dbc.h
> +++ b/arch/arm/plat-omap/include/dspbridge/dbc.h
> @@ -36,7 +36,7 @@
>
> #define DBC_Assert(exp) \
> if (!(exp)) \
> - printk("%s, line %d: Assertion (" #exp ") failed.\n", \
> + printk(KERN_ERR "%s, line %d: Assertion (" #exp ") failed.\n", \
> __FILE__, __LINE__)
> #define DBC_Require DBC_Assert /* Function Precondition. */
> #define DBC_Ensure DBC_Assert /* Function Postcondition. */
> diff --git a/arch/arm/plat-omap/include/dspbridge/gt.h b/arch/arm/plat-
> omap/include/dspbridge/gt.h
> index b43b1e7..c110234 100644
> --- a/arch/arm/plat-omap/include/dspbridge/gt.h
> +++ b/arch/arm/plat-omap/include/dspbridge/gt.h
> @@ -232,7 +232,7 @@ extern struct GT_Config _GT_params;
>
> #define GT_assert(mask, expr) \
> (!(expr) ? \
> - printk("assertion violation: %s, line %d\n", \
> + printk(KERN_ERR "assertion violation: %s, line %d\n", \
> __FILE__, __LINE__), NULL : NULL)
>
> #define GT_config(config) (_GT_params = *(config))
> diff --git a/drivers/dsp/bridge/gen/_gt_para.c
> b/drivers/dsp/bridge/gen/_gt_para.c
> index 9f8246b..dd22f77 100644
> --- a/drivers/dsp/bridge/gen/_gt_para.c
> +++ b/drivers/dsp/bridge/gen/_gt_para.c
> @@ -77,7 +77,7 @@ static void error(char *fmt, ...)
>
> va_end(va);
>
> - printk("ERROR: ");
> + printk(KERN_ERR "ERROR: ");
> printk(fmt, arg1, arg2, arg3, arg4, arg5, arg6);
>
> #if defined(DEBUG) || defined(DDSP_DEBUG_PRODUCT)
> --
> 1.6.2.4

Regards,
Nishanth Menon