Skip to contentSkip to conversation

staging: rtl8192e: Use __func__ instead of function name

PATCH Superseded Mihaela Muraru 2 participants 2 messages Oct 7, 2017 Staging

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192e: Use __func__ instead of function name

Use identifier __func__ instead of the name of the function.

Issue found by checkpatch.pl.

---
 drivers/staging/rtl8192e/dot11d.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/dot11d.c +2 -2
index 017fe04..2f1dbfa 100644
@@ -128,12 +128,12 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
 	pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3);
 	for (i = 0; i < NumTriples; i++) {
 		if (MaxChnlNum >= pTriple->FirstChnl) {
-			netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
+			netdev_info(dev->dev, "%s: Invalid country IE, skip it........1\n", __func__);
 			return;
 		}
 		if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl +
 		    pTriple->NumChnls)) {
-			netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
+			netdev_info(dev->dev, "%s: Invalid country IE, skip it........2\n", __func__);
 			return;
 		}
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · Mihaela Muraru

Use identifier __func__ instead of the name of the function.

Issue found by checkpatch.pl.

---
 drivers/staging/rtl8192e/dot11d.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/dot11d.c +0 -0
index 017fe04..2f1dbfa 100644
@@ -128,12 +128,12 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
 	pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3);

drivers/staging/rtl8192e/dot11d.c void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr, · line 136

Quoted 10 lines
drivers/staging/rtl8192e/dot11d.c +2 -2
 	for (i = 0; i < NumTriples; i++) {
 		if (MaxChnlNum >= pTriple->FirstChnl) {
-			netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
+			netdev_info(dev->dev, "%s: Invalid country IE, skip it........1\n", __func__);
 			return;
 		}
 		if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl +
 		    pTriple->NumChnls)) {
-			netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
+			netdev_info(dev->dev, "%s: Invalid country IE, skip it........2\n", __func__);

At the same time you could add some newlines so that the modified code fits better into 80 characters.

julia

Quoted 13 lines
drivers/staging/rtl8192e/dot11d.c +0 -1
 			return;
 		}
 
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20171007112502.GA4418%40domino-MS-16Y1.
For more options, visit https://groups.google.com/d/optout.