Skip to content

Commit a8ab042

Browse files
author
Stefan Schmidt
committed
ieee802154: cc2520: use __func__ macro for debug messages
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. Found by checkpatch. Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com> Acked-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
1 parent 3ee0275 commit a8ab042

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/net/ieee802154/cc2520.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -663,15 +663,14 @@ cc2520_filter(struct ieee802154_hw *hw,
663663
if (changed & IEEE802154_AFILT_PANID_CHANGED) {
664664
u16 panid = le16_to_cpu(filt->pan_id);
665665

666-
dev_vdbg(&priv->spi->dev,
667-
"cc2520_filter called for pan id\n");
666+
dev_vdbg(&priv->spi->dev, "%s called for pan id\n", __func__);
668667
ret = cc2520_write_ram(priv, CC2520RAM_PANID,
669668
sizeof(panid), (u8 *)&panid);
670669
}
671670

672671
if (changed & IEEE802154_AFILT_IEEEADDR_CHANGED) {
673672
dev_vdbg(&priv->spi->dev,
674-
"cc2520_filter called for IEEE addr\n");
673+
"%s called for IEEE addr\n", __func__);
675674
ret = cc2520_write_ram(priv, CC2520RAM_IEEEADDR,
676675
sizeof(filt->ieee_addr),
677676
(u8 *)&filt->ieee_addr);
@@ -680,8 +679,7 @@ cc2520_filter(struct ieee802154_hw *hw,
680679
if (changed & IEEE802154_AFILT_SADDR_CHANGED) {
681680
u16 addr = le16_to_cpu(filt->short_addr);
682681

683-
dev_vdbg(&priv->spi->dev,
684-
"cc2520_filter called for saddr\n");
682+
dev_vdbg(&priv->spi->dev, "%s called for saddr\n", __func__);
685683
ret = cc2520_write_ram(priv, CC2520RAM_SHORTADDR,
686684
sizeof(addr), (u8 *)&addr);
687685
}
@@ -690,7 +688,7 @@ cc2520_filter(struct ieee802154_hw *hw,
690688
u8 frmfilt0;
691689

692690
dev_vdbg(&priv->spi->dev,
693-
"cc2520_filter called for panc change\n");
691+
"%s called for panc change\n", __func__);
694692

695693
cc2520_read_register(priv, CC2520_FRMFILT0, &frmfilt0);
696694

0 commit comments

Comments
 (0)