Skip to contentSkip to conversation

staging: rtl8192e: Use __func__ instead of function name

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

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

---
Changes in v2:
-add newlines so that the modified code fits better into 80
characters.

 drivers/staging/rtl8192e/dot11d.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/dot11d.c +6 -2
index 017fe04..c97262d 100644
@@ -128,12 +128,16 @@ 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 18 lines · Mihaela Muraru

Use identifier __func__ instead of the name of the function.

Issue found by checkpatch.pl.

---
Changes in v2:
-add newlines so that the modified code fits better into 80
characters.

 drivers/staging/rtl8192e/dot11d.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/dot11d.c +0 -0
index 017fe04..c97262d 100644

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

Quoted 6 lines
drivers/staging/rtl8192e/dot11d.c +2 -1
@@ -128,12 +128,16 @@ 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",

You can line up the arguments with the right side of the ( and thus have a little more of the message string within 80 characters. Maybe the number of ...s could be reduced also, if it can be done consistently.

julia

Quoted 22 lines
drivers/staging/rtl8192e/dot11d.c +4 -2
+					__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;
 		}
 
--

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/20171012202626.GA25395%40domino-MS-16Y1.
For more options, visit https://groups.google.com/d/optout.