All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: winbond: scan_s.h Coding style fixes.
@ 2010-03-20 19:43 Lars Lindley
  2010-03-21 20:05 ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Lindley @ 2010-03-20 19:43 UTC (permalink / raw)
  To: gregkh, greg, penberg, pavel; +Cc: devel, linux-kernel, Lars Lindley

I fixed all things reported by checkpatch.pl except a couple
of long lines and typedefs.
I also removed "commented away" code and a history comment.

Signed-off-by: Lars Lindley <lindley@coyote.org>
---
 drivers/staging/winbond/scan_s.h |  152 ++++++++++++++++++--------------------
 1 files changed, 71 insertions(+), 81 deletions(-)

diff --git a/drivers/staging/winbond/scan_s.h b/drivers/staging/winbond/scan_s.h
index 209717f..85e7523 100644
--- a/drivers/staging/winbond/scan_s.h
+++ b/drivers/staging/winbond/scan_s.h
@@ -4,117 +4,107 @@
 #include <linux/types.h>
 #include "localpara.h"
 
-//
-// SCAN task global CONSTANTS, STRUCTURES, variables
-//
-
-//////////////////////////////////////////////////////////////////////////
-//define the msg type of SCAN module
-#define SCANMSG_SCAN_REQ			0x01
-#define SCANMSG_BEACON				0x02
+/*
+ * SCAN task global CONSTANTS, STRUCTURES, variables
+ */
+
+/* define the msg type of SCAN module */
+#define SCANMSG_SCAN_REQ		0x01
+#define SCANMSG_BEACON			0x02
 #define SCANMSG_PROBE_RESPONSE		0x03
-#define SCANMSG_TIMEOUT				0x04
+#define SCANMSG_TIMEOUT			0x04
 #define SCANMSG_TXPROBE_FAIL		0x05
 #define SCANMSG_ENABLE_BGSCAN		0x06
-#define SCANMSG_STOP_SCAN			0x07
+#define SCANMSG_STOP_SCAN		0x07
 
-// BSS Type =>conform to
-// IBSS             : ToDS/FromDS = 00
-// Infrastructure   : ToDS/FromDS = 01
+/*
+ * BSS Type =>conform to
+ * IBSS             : ToDS/FromDS = 00
+ * Infrastructure   : ToDS/FromDS = 01
+ */
 #define IBSS_NET			0
 #define ESS_NET				1
 #define ANYBSS_NET			2
 
-// Scan Type
+/* Scan Type */
 #define ACTIVE_SCAN			0
-#define PASSIVE_SCAN		1
+#define PASSIVE_SCAN			1
+
+/* Global data structures, Initial Scan & Background Scan */
+typedef struct _SCAN_REQ_PARA {	/* mandatory parameters for SCAN request */
 
-///////////////////////////////////////////////////////////////////////////
-//Global data structures, Initial Scan & Background Scan
-typedef struct _SCAN_REQ_PARA	//mandatory parameters for SCAN request
-{
-	u32				ScanType;			//passive/active scan
+	u32			ScanType;	/* passive/active scan */
 
 	u8			reserved_1[2];
 
-	struct SSID_Element	sSSID; // 34B. scan only for this SSID
+	struct SSID_Element	sSSID; /* 34B. scan only for this SSID */
 	u8			reserved_2[2];
 
 } SCAN_REQ_PARA, *psSCAN_REQ_PARA;
 
-typedef struct _SCAN_PARAMETERS
-{
-	u16				wState;
-	u16				iCurrentChannelIndex;
+typedef struct _SCAN_PARAMETERS {
+	u16		wState;
+	u16		iCurrentChannelIndex;
 
 	SCAN_REQ_PARA	sScanReq;
 
-	u8				BSSID[MAC_ADDR_LENGTH + 2];		//scan only for this BSSID
+	u8		BSSID[MAC_ADDR_LENGTH + 2]; /* scan only for this BSSID */
 
-	u32				BssType;						//scan only for this BSS type
+	u32		BssType;	/* scan only for this BSS type */
 
-	//struct SSID_Element	sSSID;						//scan only for this SSID
-	u16				ProbeDelay;
-	u16				MinChannelTime;
+	u16		ProbeDelay;
+	u16		MinChannelTime;
 
-	u16				MaxChannelTime;
-	u16				reserved_1;
+	u16		MaxChannelTime;
+	u16		reserved_1;
 
-    s32				iBgScanPeriod;				// XP: 5 sec
+	s32		iBgScanPeriod;	/* XP: 5 sec */
 
-    u8				boBgScan;					// Wb: enable BG scan, For XP, this value must be FALSE
-    u8				boFastScan;					// Wb: reserved
-	u8				boCCAbusy;					// Wb: HWMAC CCA busy status
-	u8				reserved_2;
+	u8		boBgScan;	/* Wb: enable BG scan, For XP, this value must be FALSE */
+	u8		boFastScan;	/* Wb: reserved */
+	u8		boCCAbusy;	/* Wb: HWMAC CCA busy status */
+	u8		reserved_2;
 
 	struct timer_list timer;
 
-	u32				ScanTimeStamp;			//Increase 1 per background scan(1 minute)
-	u32				BssTimeStamp;			//Increase 1 per connect status check
-	u32				RxNumPerAntenna[2];		//
-
-	u8				AntennaToggle;			//
-	u8				boInTimerHandler;
-	u8 				boTimerActive;				// Wb: reserved
-	u8				boSave;
+	u32		ScanTimeStamp;	/* Increase 1 per background scan(1 minute) */
+	u32		BssTimeStamp;	/* Increase 1 per connect status check */
+	u32		RxNumPerAntenna[2];
 
-	u32				BScanEnable; // Background scan enable. Default is On
+	u8		AntennaToggle;
+	u8		boInTimerHandler;
+	u8		boTimerActive;	/* Wb: reserved */
+	u8		boSave;
 
+	u32		BScanEnable; /* Background scan enable. Default is On */
 } SCAN_PARAMETERS, *psSCAN_PARAMETERS;
 
-// Encapsulate 'adapter' data structure
-#define psSCAN			(&(adapter->sScanPara))
-#define psSCANREQ			(&(adapter->sScanPara.sScanReq))
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//	scan.h
-//		Define the related definitions of scan module
-//	history -- 01/14/03' created
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//Define the state of scan module
-#define SCAN_INACTIVE						0
-#define WAIT_PROBE_DELAY					1
-#define WAIT_RESPONSE_MIN					2
-#define WAIT_RESPONSE_MAX_ACTIVE			3
-#define WAIT_BEACON_MAX_PASSIVE				4
-#define SCAN_COMPLETE						5
-#define BG_SCAN								6
-#define BG_SCANNING							7
-
-
-// The value will load from EEPROM
-// If 0xff is set in EEPOM, the driver will use SCAN_MAX_CHNL_TIME instead.
-// The definition is in WbHal.h
-//	#define SCAN_MAX_CHNL_TIME				(50)
-
-
-
-// static functions
-
-//static void ScanTimerHandler(struct wbsoft_priv * adapter);
-//static void vScanTimerStart(struct wbsoft_priv *	adapter, int timeout_value);
-//static void vScanTimerStop(struct wbsoft_priv * adapter);
-
+/* Encapsulate 'adapter' data structure */
+#define psSCAN		(&(adapter->sScanPara))
+#define psSCANREQ	(&(adapter->sScanPara.sScanReq))
+
+/*
+ * ===========================================================
+ *	scan.h
+ *		Define the related definitions of scan module
+ *
+ * ===========================================================
+ */
+
+/* Define the state of scan module */
+#define SCAN_INACTIVE			0
+#define WAIT_PROBE_DELAY		1
+#define WAIT_RESPONSE_MIN		2
+#define WAIT_RESPONSE_MAX_ACTIVE	3
+#define WAIT_BEACON_MAX_PASSIVE		4
+#define SCAN_COMPLETE			5
+#define BG_SCAN				6
+#define BG_SCANNING			7
+
+
+/*
+ * The value will load from EEPROM
+ * If 0xff is set in EEPOM, the driver will use SCAN_MAX_CHNL_TIME instead.
+ * The definition is in WbHal.h
+ */
 #endif
-- 
1.7.0.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: winbond: scan_s.h Coding style fixes.
  2010-03-20 19:43 [PATCH] staging: winbond: scan_s.h Coding style fixes Lars Lindley
@ 2010-03-21 20:05 ` Pavel Machek
  2010-03-21 20:23   ` Pekka Enberg
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2010-03-21 20:05 UTC (permalink / raw)
  To: Lars Lindley; +Cc: gregkh, greg, penberg, devel, linux-kernel

On Sat 2010-03-20 20:43:59, Lars Lindley wrote:
> I fixed all things reported by checkpatch.pl except a couple
> of long lines and typedefs.
> I also removed "commented away" code and a history comment.
> 
> Signed-off-by: Lars Lindley <lindley@coyote.org>

ACK.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: winbond: scan_s.h Coding style fixes.
  2010-03-21 20:05 ` Pavel Machek
@ 2010-03-21 20:23   ` Pekka Enberg
  0 siblings, 0 replies; 3+ messages in thread
From: Pekka Enberg @ 2010-03-21 20:23 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Lars Lindley, gregkh, greg, devel, linux-kernel

On Sun, Mar 21, 2010 at 10:05 PM, Pavel Machek <pavel@ucw.cz> wrote:
> On Sat 2010-03-20 20:43:59, Lars Lindley wrote:
>> I fixed all things reported by checkpatch.pl except a couple
>> of long lines and typedefs.
>> I also removed "commented away" code and a history comment.
>>
>> Signed-off-by: Lars Lindley <lindley@coyote.org>
>
> ACK.

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-21 20:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-20 19:43 [PATCH] staging: winbond: scan_s.h Coding style fixes Lars Lindley
2010-03-21 20:05 ` Pavel Machek
2010-03-21 20:23   ` Pekka Enberg

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.