public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jorgyano Vieira <jorgyano@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, nsankar@broadcom.com,
	jarod@wilsonet.com
Subject: Re: [PATCH 3/3 v2] Staging: crystalhd: Replace the BCMLOG_ERR macro with pr_err
Date: Sat, 18 Feb 2012 14:31:50 -0800	[thread overview]
Message-ID: <1329604310.1753.30.camel@joe2Laptop> (raw)
In-Reply-To: <1329603020-5302-1-git-send-email-jorgyano@gmail.com>

On Sat, 2012-02-18 at 20:10 -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.

Hi Jorgyano.

Couple of generic comments.

o Please look for and fix spelling errors at the same time.
o Coalesce formats, don't worry about 80 columns for that.
o pr_fmt needs to be #defined before any #include that might
  directly or indirectly #include kernel.h/printk.h
  use 'strings <path>/built-in.o | grep "^<.>"' to verify. 
o [kv][kzm]alloc failures don't need specific OOM messages
  as the generic function does a dump_stack
o argument alignment could be after the open parenthesis.

for example...

>  	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
>  		if (ctx->user[i].mode == DTS_DIAG_MODE ||
>  		    ctx->user[i].mode == DTS_PLAYBACK_MODE) {
> -			BCMLOG_ERR("multiple playback sessions are not "
> +			pr_err("multiple playback sessions are not "
[]
> @@ -766,7 +767,7 @@ static enum BC_STATUS crystalhd_hw_fill_desc(struct crystalhd_dio_req *ioreq,
>  	crystalhd_hw_dump_desc(desc, last_desc_ix, 1);
>  
>  	if (count != xfr_sz) {
> -		BCMLOG_ERR("interal error sz curr:%x exp:%x\n", count, xfr_sz);
> +		pr_err("interal error sz curr:%x exp:%x\n", count, xfr_sz);
>  		return BC_STS_ERROR;
>  	}
[]
> @@ -1950,7 +1951,7 @@ enum BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *hw)
>  	for (i = 0; i < BC_RX_LIST_CNT; i++) {
>  		rpkt = kzalloc(sizeof(*rpkt), GFP_KERNEL);
>  		if (!rpkt) {
> -			BCMLOG_ERR("Insufficient Memory For RX\n");
> +			pr_err("Insufficient Memory For RX\n");
>  			crystalhd_hw_free_dma_rings(hw);
>  			return BC_STS_INSUFF_RES;
>  		}
> @@ -1959,7 +1960,7 @@ enum BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *hw)
>  		if (mem) {
>  			memset(mem, 0, mem_len);
>  		} else {
> -			BCMLOG_ERR("Insufficient Memory For RX\n");
> +			pr_err("Insufficient Memory For RX\n");
>  			crystalhd_hw_free_dma_rings(hw);
>  			kfree(rpkt);
>  			return BC_STS_INSUFF_RES;
[]
> @@ -177,7 +177,7 @@ static int chd_dec_release_cdata(struct crystalhd_adp *adp,
>  		rc = crystalhd_user_data(ua_off, io->add_cdata,
>  					io->add_cdata_sz, 1);
>  		if (rc) {
> -			BCMLOG_ERR("failed to push add_cdata sz:%x ua_off:%x\n",
> +			pr_err("failed to push add_cdata sz:%x ua_off:%x\n",
>  				   io->add_cdata_sz, (unsigned int)ua_off);
>  			return -ENODATA;
>  		}
[]
> @@ -383,7 +383,7 @@ void *bc_kern_dma_alloc(struct crystalhd_adp *adp, uint32_t sz,
>  	void *temp = NULL;
>  
>  	if (!adp || !sz || !phy_addr) {
> -		BCMLOG_ERR("Invalide Arg..\n");
> +		pr_err("%s: Invalide Arg..\n", __func__);
>  		return temp;
>  	}
>  



  reply	other threads:[~2012-02-18 22:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-18 22:10 [PATCH 3/3 v2] Staging: crystalhd: Replace the BCMLOG_ERR macro with pr_err Jorgyano Vieira
2012-02-18 22:31 ` Joe Perches [this message]
2012-02-18 23:08   ` Jorgyano vieira
2012-02-18 23:14     ` Joe Perches
2012-02-18 23:34       ` Jorgyano vieira
2012-02-18 23:45         ` Joe Perches
2012-02-24 19:49 ` Greg KH
2012-02-25  5:23   ` Jorgyano vieira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329604310.1753.30.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jarod@wilsonet.com \
    --cc=jorgyano@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsankar@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox