From: Alan Ott <alan@signal11.us>
To: Varka Bhadram <varkabhadram@gmail.com>,
linux-wpan@vger.kernel.org, linux-bluetooth@vger.kernel.org
Cc: Varka Bhadram <varkab@cdac.in>
Subject: Re: [PATCH bluetooth-next 3/3] ieee802154: mrf24j40: use pr_* / dev_*
Date: Thu, 18 Sep 2014 19:01:04 -0400 [thread overview]
Message-ID: <541B6430.80108@signal11.us> (raw)
In-Reply-To: <1410842922-10564-4-git-send-email-varkab@cdac.in>
Take out the "ieee802154." Make the first line of the commit message:
mrf24j40: use pr_* / dev_* instead of printk()
On 09/16/2014 12:48 AM, Varka Bhadram wrote:
> This patch replace printk() with dev_* if dev is available
> or replace with pr_*
Take out "this patch." Make it:
Replace printk() with dev_*() pr_*()
>
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> ---
> drivers/net/ieee802154/mrf24j40.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
> index 2c617e3..80b6adf 100644
> --- a/drivers/net/ieee802154/mrf24j40.c
> +++ b/drivers/net/ieee802154/mrf24j40.c
> @@ -323,8 +323,8 @@ static int mrf24j40_read_rx_buf(struct mrf24j40 *devrec,
> #ifdef DEBUG
> print_hex_dump(KERN_DEBUG, "mrf24j40 rx: ",
> DUMP_PREFIX_OFFSET, 16, 1, data, *len, 0);
> - printk(KERN_DEBUG "mrf24j40 rx: lqi: %02hhx rssi: %02hhx\n",
> - lqi_rssi[0], lqi_rssi[1]);
> + pr_debug("mrf24j40 rx: lqi: %02hhx rssi: %02hhx\n",
> + lqi_rssi[0], lqi_rssi[1]);
> #endif
>
> out:
> @@ -385,7 +385,7 @@ err:
> static int mrf24j40_ed(struct ieee802154_dev *dev, u8 *level)
> {
> /* TODO: */
> - printk(KERN_WARNING "mrf24j40: ed not implemented\n");
> + pr_warn("mrf24j40: ed not implemented\n");
> *level = 0;
> return 0;
> }
> @@ -482,12 +482,10 @@ static int mrf24j40_filter(struct ieee802154_dev *dev,
> for (i = 0; i < 8; i++)
> write_short_reg(devrec, REG_EADR0 + i, addr[i]);
>
> -#ifdef DEBUG
> - printk(KERN_DEBUG "Set long addr to: ");
> + pr_debug("Set long addr to: ");
> for (i = 0; i < 8; i++)
> - printk("%02hhx ", addr[7 - i]);
> - printk(KERN_DEBUG "\n");
> -#endif
> + pr_debug("%02hhx ", addr[7 - i]);
> + pr_debug("\n");
Hmm... You took out the #ifdef DEBUG, but there's still a loop in there
that will execute (optimizer aside). The pr_debug is ok, but leave it
all inside the #ifdef DEBUG.
> }
>
> if (changed & IEEE802515_AFILT_PANID_CHANGED) {
> @@ -702,7 +700,7 @@ static int mrf24j40_probe(struct spi_device *spi)
> int ret = -ENOMEM;
> struct mrf24j40 *devrec;
>
> - printk(KERN_INFO "mrf24j40: probe(). IRQ: %d\n", spi->irq);
> + dev_info(&spi->dev, "probe(). IRQ: %d\n", spi->irq);
>
> devrec = devm_kzalloc(&spi->dev, sizeof(struct mrf24j40), GFP_KERNEL);
> if (!devrec)
The rest looks ok. Thanks Varka.
Alan.
next prev parent reply other threads:[~2014-09-18 23:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 4:48 [PATCH bluetooth-next 0/3] ieee802154: cleanup for mrf24j40 Varka Bhadram
2014-09-16 4:48 ` [PATCH bluetooth-next 1/3] ieee802154: mrf24j40: fix Missing a blank line after declarations Varka Bhadram
2014-09-18 22:54 ` Alan Ott
2014-09-19 3:22 ` Varka Bhadram
2014-09-16 4:48 ` [PATCH bluetooth-next 2/3] ieee802154: mrf24j40: remove return statement Varka Bhadram
2014-09-18 22:55 ` Alan Ott
2014-09-19 3:21 ` Varka Bhadram
2014-09-16 4:48 ` [PATCH bluetooth-next 3/3] ieee802154: mrf24j40: use pr_* / dev_* Varka Bhadram
2014-09-18 23:01 ` Alan Ott [this message]
[not found] ` <541BA2AB.2030503@gmail.com>
2014-09-19 4:25 ` Alan Ott
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=541B6430.80108@signal11.us \
--to=alan@signal11.us \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=varkab@cdac.in \
--cc=varkabhadram@gmail.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;
as well as URLs for NNTP newsgroup(s).