[OPW,kernel,01/10] Staging: rtl8187se: Fix C99 style commenting in dot11d.c
diff mbox

Message ID bc816f3b4425b17b21653260297bc37952b5cb84.1383331168.git.rashika.kheria@gmail.com
State New, archived
Headers show

Commit Message

Rashika Nov. 1, 2013, 6:48 p.m. UTC
This patch fixes the following checkpatch.pl issues in
ieee80211/dot11d.c-
ERROR: do not use C99 // comments

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/dot11d.c |   68 +++++++++++++-------------
 1 file changed, 35 insertions(+), 33 deletions(-)

Comments

Lisa Nguyen Nov. 1, 2013, 9:10 p.m. UTC | #1
On Fri, Nov 1, 2013 at 11:48 AM, Rashika Kheria
<rashika.kheria@gmail.com> wrote:
> This patch fixes the following checkpatch.pl issues in
> ieee80211/dot11d.c-
> ERROR: do not use C99 // comments
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Looks alright.

Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>

> ---
>  drivers/staging/rtl8187se/ieee80211/dot11d.c |   68 +++++++++++++-------------
>  1 file changed, 35 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
> index 9d2d5c5..b623080 100644
> --- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
> +++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
> @@ -1,11 +1,10 @@
> -//-----------------------------------------------------------------------------
> -//     File:
> -//             Dot11d.c
> -//
> -//     Description:
> -//             Implement 802.11d.
> -//
> -//-----------------------------------------------------------------------------
> +/*
> + *     File:
> + *             Dot11d.c
> + *
> + *     Description:
> + *             Implement 802.11d
> + */
>
>  #include "dot11d.h"
>
> @@ -25,20 +24,20 @@ Dot11d_Init(struct ieee80211_device *ieee)
>         printk("Dot11d_Init()\n");
>  }
>
> -//
> -//     Description:
> -//             Reset to the state as we are just entering a regulatory domain.
> -//
> +/*
> + * Description:
> + *     Reset to the state as we are just entering a regulatory domain.
> + */
>  void
>  Dot11d_Reset(struct ieee80211_device *ieee)
>  {
>         u32 i;
>         PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
>
> -       // Clear old channel map
> +       /* Clear old channel map */
>         memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
>         memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
> -       // Set new channel map
> +       /* Set new channel map */
>         for (i = 1; i <= 11; i++)
>                 (pDot11dInfo->channel_map)[i] = 1;
>
> @@ -48,22 +47,20 @@ Dot11d_Reset(struct ieee80211_device *ieee)
>         pDot11dInfo->State = DOT11D_STATE_NONE;
>         pDot11dInfo->CountryIeLen = 0;
>         RESET_CIE_WATCHDOG(ieee);
> -
> -       //printk("Dot11d_Reset()\n");
>  }
>
> -//
> -//     Description:
> -//             Update country IE from Beacon or Probe Response
> -//             and configure PHY for operation in the regulatory domain.
> -//
> -//     TODO:
> -//             Configure Tx power.
> -//
> -//     Assumption:
> -//             1. IS_DOT11D_ENABLE() is TRUE.
> -//             2. Input IE is an valid one.
> -//
> +/*
> + * Description:
> + *     Update country IE from Beacon or Probe Response and configure PHY for
> + *     operation in the regulatory domain.
> + *
> + * TODO:
> + *     Configure Tx power.
> + *
> + * Assumption:
> + *     1. IS_DOT11D_ENABLE() is TRUE.
> + *     2. Input IE is an valid one.
> + */
>  void
>  Dot11d_UpdateCountryIe(
>         struct ieee80211_device *dev,
> @@ -85,17 +82,23 @@ Dot11d_UpdateCountryIe(
>         memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
>         memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
>         MaxChnlNum = 0;
> -       NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.
> +       NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */
>         pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);
>         for (i = 0; i < NumTriples; i++) {
>                 if (MaxChnlNum >= pTriple->FirstChnl) {
> -               // It is not in a monotonically increasing order, so stop processing.
> +                       /*
> +                        * It is not in a monotonically increasing order,
> +                        * so stop processing.
> +                        */
>                         printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
>                         Dot11d_Reset(dev);
>                         return;
>                 }
>                 if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) {
> -               // It is not a valid set of channel id, so stop processing.
> +                       /*
> +                        * It is not a valid set of channel id,
> +                        * so stop processing
> +                        */
>                         printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
>                         Dot11d_Reset(dev);
>                         return;
> @@ -110,7 +113,6 @@ Dot11d_UpdateCountryIe(
>                 pTriple = (PCHNL_TXPOWER_TRIPLE)((u8 *)pTriple + 3);
>         }
>  #if 1
> -       //printk("Dot11d_UpdateCountryIe(): Channel List:\n");
>         printk("Channel List:");
>         for (i = 1; i <= MAX_CHANNEL_NUMBER; i++)
>                 if (pDot11dInfo->channel_map[i] > 0)
> @@ -160,7 +162,7 @@ DOT11D_ScanComplete(
>
>         case DOT11D_STATE_DONE:
>                 if (GET_CIE_WATCHDOG(dev) == 0) {
> -               // Reset country IE if previous one is gone.
> +                       /* Reset country IE if previous one is gone. */
>                         Dot11d_Reset(dev);
>                 }
>                 break;
> --
> 1.7.9.5
>
> --
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Patch
diff mbox

diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
index 9d2d5c5..b623080 100644
--- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
@@ -1,11 +1,10 @@ 
-//-----------------------------------------------------------------------------
-//	File:
-//		Dot11d.c
-//
-//	Description:
-//		Implement 802.11d.
-//
-//-----------------------------------------------------------------------------
+/*
+ *	File:
+ *		Dot11d.c
+ *
+ *	Description:
+ *		Implement 802.11d
+ */
 
 #include "dot11d.h"
 
@@ -25,20 +24,20 @@  Dot11d_Init(struct ieee80211_device *ieee)
 	printk("Dot11d_Init()\n");
 }
 
-//
-//	Description:
-//		Reset to the state as we are just entering a regulatory domain.
-//
+/*
+ * Description:
+ *	Reset to the state as we are just entering a regulatory domain.
+ */
 void
 Dot11d_Reset(struct ieee80211_device *ieee)
 {
 	u32 i;
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
 
-	// Clear old channel map
+	/* Clear old channel map */
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
 	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
-	// Set new channel map
+	/* Set new channel map */
 	for (i = 1; i <= 11; i++)
 		(pDot11dInfo->channel_map)[i] = 1;
 
@@ -48,22 +47,20 @@  Dot11d_Reset(struct ieee80211_device *ieee)
 	pDot11dInfo->State = DOT11D_STATE_NONE;
 	pDot11dInfo->CountryIeLen = 0;
 	RESET_CIE_WATCHDOG(ieee);
-
-	//printk("Dot11d_Reset()\n");
 }
 
-//
-//	Description:
-//		Update country IE from Beacon or Probe Response
-//		and configure PHY for operation in the regulatory domain.
-//
-//	TODO:
-//		Configure Tx power.
-//
-//	Assumption:
-//		1. IS_DOT11D_ENABLE() is TRUE.
-//		2. Input IE is an valid one.
-//
+/*
+ * Description:
+ *	Update country IE from Beacon or Probe Response and configure PHY for
+ *	operation in the regulatory domain.
+ *
+ * TODO:
+ *	Configure Tx power.
+ *
+ * Assumption:
+ *	1. IS_DOT11D_ENABLE() is TRUE.
+ *	2. Input IE is an valid one.
+ */
 void
 Dot11d_UpdateCountryIe(
 	struct ieee80211_device *dev,
@@ -85,17 +82,23 @@  Dot11d_UpdateCountryIe(
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
 	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
 	MaxChnlNum = 0;
-	NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.
+	NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */
 	pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);
 	for (i = 0; i < NumTriples; i++) {
 		if (MaxChnlNum >= pTriple->FirstChnl) {
-		// It is not in a monotonically increasing order, so stop processing.
+			/*
+			 * It is not in a monotonically increasing order,
+			 * so stop processing.
+			 */
 			printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
 			Dot11d_Reset(dev);
 			return;
 		}
 		if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) {
-		// It is not a valid set of channel id, so stop processing.
+			/*
+			 * It is not a valid set of channel id,
+			 * so stop processing
+			 */
 			printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
 			Dot11d_Reset(dev);
 			return;
@@ -110,7 +113,6 @@  Dot11d_UpdateCountryIe(
 		pTriple = (PCHNL_TXPOWER_TRIPLE)((u8 *)pTriple + 3);
 	}
 #if 1
-	//printk("Dot11d_UpdateCountryIe(): Channel List:\n");
 	printk("Channel List:");
 	for (i = 1; i <= MAX_CHANNEL_NUMBER; i++)
 		if (pDot11dInfo->channel_map[i] > 0)
@@ -160,7 +162,7 @@  DOT11D_ScanComplete(
 
 	case DOT11D_STATE_DONE:
 		if (GET_CIE_WATCHDOG(dev) == 0) {
-		// Reset country IE if previous one is gone.
+			/* Reset country IE if previous one is gone. */
 			Dot11d_Reset(dev);
 		}
 		break;