Re: [PATCH 3/3 v2] Staging: crystalhd: Replace the BCMLOG_ERR macrowith pr_err

From: Greg KH
Date: Fri Feb 24 2012 - 14:56:18 EST


On Sat, Feb 18, 2012 at 08:10:20PM -0200, Jorgyano Vieira wrote:
> Replace the usage of BCMLOG_ERR with pr_err and remove the macro definition.
> Also added pr_fmt to identify the driver error messages.
>
> Signed-ff-by: Jorgyano Vieira <jorgyano@xxxxxxxxx>
> ---
> drivers/staging/crystalhd/crystalhd_cmds.c | 68 ++++++++--------
> drivers/staging/crystalhd/crystalhd_hw.c | 119 ++++++++++++++--------------
> drivers/staging/crystalhd/crystalhd_lnx.c | 96 +++++++++++-----------
> drivers/staging/crystalhd/crystalhd_lnx.h | 4 +-
> drivers/staging/crystalhd/crystalhd_misc.c | 70 ++++++++--------
> drivers/staging/crystalhd/crystalhd_misc.h | 10 +--
> 6 files changed, 181 insertions(+), 186 deletions(-)
>
> diff --git a/drivers/staging/crystalhd/crystalhd_cmds.c b/drivers/staging/crystalhd/crystalhd_cmds.c
> index 3735ed3..46fac01 100644
> --- a/drivers/staging/crystalhd/crystalhd_cmds.c
> +++ b/drivers/staging/crystalhd/crystalhd_cmds.c
> @@ -75,12 +75,12 @@ static enum BC_STATUS bc_cproc_notify_mode(struct crystalhd_cmd *ctx,
> int rc = 0, i = 0;
>
> if (!ctx || !idata) {
> - BCMLOG_ERR("Invalid Arg!!\n");
> + pr_err("%s: Invalid Arg!!\n", __func__);

This is nice, but, as this is a driver, I really prefer the use of
dev_err() instead, which allows us to properly identify the device and
driver that spit out the error message. Care to redo this patch in that
style instead?

thanks,

greg k-h
--
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/