All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@osg.samsung.com>
To: linux-wpan@vger.kernel.org
Cc: Alexander Aring <aring@mojatatu.com>,
	michael.hennerich@analog.com, h.morris@cascoda.com,
	linuxdev@cascoda.com, varkabhadram@gmail.com, alan@signal11.us,
	Stefan Schmidt <stefan@osg.samsung.com>
Subject: [PATCH 03/14] ieee802154: at86rf230: use __func__ macro for debug messages
Date: Fri, 22 Sep 2017 14:13:54 +0200	[thread overview]
Message-ID: <20170922121405.31789-4-stefan@osg.samsung.com> (raw)
In-Reply-To: <20170922121405.31789-1-stefan@osg.samsung.com>

Instead of having the function name hard-coded (it might change and we
forgot to update them in the debug output) we can use __func__ instead
and also shorter the line so we do not need to break it. Also fix an
extra blank line while being here.
Found by checkpatch.

Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
---
 drivers/net/ieee802154/at86rf230.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index ea1704a4b4b9..5c48bdb6f678 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1121,8 +1121,7 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
 	if (changed & IEEE802154_AFILT_SADDR_CHANGED) {
 		u16 addr = le16_to_cpu(filt->short_addr);
 
-		dev_vdbg(&lp->spi->dev,
-			 "at86rf230_set_hw_addr_filt called for saddr\n");
+		dev_vdbg(&lp->spi->dev, "%s called for saddr\n", __func__);
 		__at86rf230_write(lp, RG_SHORT_ADDR_0, addr);
 		__at86rf230_write(lp, RG_SHORT_ADDR_1, addr >> 8);
 	}
@@ -1130,8 +1129,7 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
 	if (changed & IEEE802154_AFILT_PANID_CHANGED) {
 		u16 pan = le16_to_cpu(filt->pan_id);
 
-		dev_vdbg(&lp->spi->dev,
-			 "at86rf230_set_hw_addr_filt called for pan id\n");
+		dev_vdbg(&lp->spi->dev, "%s called for pan id\n", __func__);
 		__at86rf230_write(lp, RG_PAN_ID_0, pan);
 		__at86rf230_write(lp, RG_PAN_ID_1, pan >> 8);
 	}
@@ -1140,15 +1138,13 @@ at86rf230_set_hw_addr_filt(struct ieee802154_hw *hw,
 		u8 i, addr[8];
 
 		memcpy(addr, &filt->ieee_addr, 8);
-		dev_vdbg(&lp->spi->dev,
-			 "at86rf230_set_hw_addr_filt called for IEEE addr\n");
+		dev_vdbg(&lp->spi->dev, "%s called for IEEE addr\n", __func__);
 		for (i = 0; i < 8; i++)
 			__at86rf230_write(lp, RG_IEEE_ADDR_0 + i, addr[i]);
 	}
 
 	if (changed & IEEE802154_AFILT_PANC_CHANGED) {
-		dev_vdbg(&lp->spi->dev,
-			 "at86rf230_set_hw_addr_filt called for panc change\n");
+		dev_vdbg(&lp->spi->dev, "%s called for panc change\n", __func__);
 		if (filt->pan_coord)
 			at86rf230_write_subreg(lp, SR_AACK_I_AM_COORD, 1);
 		else
@@ -1252,7 +1248,6 @@ at86rf230_set_cca_mode(struct ieee802154_hw *hw,
 	return at86rf230_write_subreg(lp, SR_CCA_MODE, val);
 }
 
-
 static int
 at86rf230_set_cca_ed_level(struct ieee802154_hw *hw, s32 mbm)
 {
-- 
2.13.5


  parent reply	other threads:[~2017-09-22 12:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 12:13 [PATCH 00/14] Checkpatch cleanup for ieee802154 drivers Stefan Schmidt
2017-09-22 12:13 ` [PATCH 01/14] ieee802154: adf7242: use unsigned int over only unsigned Stefan Schmidt
2017-11-06 15:37   ` Michael Hennerich
2017-11-06 15:39     ` Stefan Schmidt
2017-09-22 12:13 ` [PATCH 02/14] ieee802154: at86rf230: switch from BUG_ON() to WARN_ON() on problem Stefan Schmidt
2017-09-22 12:13 ` Stefan Schmidt [this message]
2017-09-22 12:13 ` [PATCH 04/14] ieee802154: atusb: switch from uint8_t to u8 Stefan Schmidt
2017-11-06 15:35   ` Stefan Schmidt
2017-09-22 12:13 ` [PATCH 05/14] ieee802154: atusb: use __func__ macro for debug messages Stefan Schmidt
2017-11-06 15:35   ` Stefan Schmidt
2017-09-22 12:13 ` [PATCH 06/14] ieee802154: atusb: fix some kernel coding style errors Stefan Schmidt
2017-11-06 15:36   ` Stefan Schmidt
2017-09-22 12:13 ` [PATCH 07/14] ieee802154: atusb: switch from BUG_ON() to WARN_ON() on problem Stefan Schmidt
2017-11-06 15:36   ` Stefan Schmidt
2017-09-22 12:13 ` [PATCH 08/14] ieee802154: mrf24j40: fix some kernel coding style errors Stefan Schmidt
2017-09-22 14:12   ` Alan Ott
2017-09-22 14:38     ` Stefan Schmidt
2017-09-22 12:14 ` [PATCH 09/14] ieee802154: ca8210: " Stefan Schmidt
2017-11-06 15:27   ` Harry Morris
2017-11-06 15:40     ` Stefan Schmidt
2017-09-22 12:14 ` [PATCH 10/14] ieee802154: ca8210: use __func__ macro for debug messages Stefan Schmidt
2017-11-06 15:32   ` Harry Morris
2017-11-06 15:40     ` Stefan Schmidt
2017-09-22 12:14 ` [PATCH 11/14] ieee802154: cc2520: fix some kernel coding style errors Stefan Schmidt
2017-11-06 15:34   ` Stefan Schmidt
2017-09-22 12:14 ` [PATCH 12/14] ieee802154: cc2520: use __func__ macro for debug messages Stefan Schmidt
     [not found]   ` <CAEUmHyZ1oaMjqzMHgNtMg+S2cmq2DvvgAkxBsP6-dkzYp0KyOw@mail.gmail.com>
2017-11-06 15:23     ` Stefan Schmidt
2017-11-06 15:34   ` Stefan Schmidt
2017-09-22 12:14 ` [PATCH 13/14] ieee802154: cc2520: switch from BUG_ON() to WARN_ON() on problem Stefan Schmidt
2017-11-06 15:32   ` Stefan Schmidt
2017-09-22 12:14 ` [PATCH 14/14] ieee802154: fakelb: " Stefan Schmidt
2017-11-06 14:25 ` [PATCH 00/14] Checkpatch cleanup for ieee802154 drivers Stefan Schmidt

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=20170922121405.31789-4-stefan@osg.samsung.com \
    --to=stefan@osg.samsung.com \
    --cc=alan@signal11.us \
    --cc=aring@mojatatu.com \
    --cc=h.morris@cascoda.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=linuxdev@cascoda.com \
    --cc=michael.hennerich@analog.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.