All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h
@ 2010-09-19  9:28 Pekka Enberg
  2010-09-19  9:28 ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pekka Enberg
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Pekka Enberg @ 2010-09-19  9:28 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Pekka Enberg, Lars Lindley, Pavel Machek, Ruslan Pisarev

Fixes an uninitialized variable access in _rx_iq_calibration_loop_winbond():

    CC [M]  drivers/staging/winbond/phy_calibration.o
  drivers/staging/winbond/phy_calibration.c: In function ‘_rx_iq_calibration_loop_winbond’:
  drivers/staging/winbond/phy_calibration.c:1138: warning: ‘val’ is used uninitialized in this function

Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/phy_calibration.c |   20 --------------------
 drivers/staging/winbond/wbhal_f.h         |   10 ----------
 2 files changed, 0 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
index 5c1f053..2b375ba 100644
--- a/drivers/staging/winbond/phy_calibration.c
+++ b/drivers/staging/winbond/phy_calibration.c
@@ -1132,18 +1132,6 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
 	PHY_DEBUG(("[CAL] -> [5]_rx_iq_calibration_loop()\n"));
 	PHY_DEBUG(("[CAL] ** factor = %d\n", factor));
 
-
-/* RF Control Override */
-	hw_get_cxx_reg(phw_data, 0x80, &val);
-	val |= BIT(19);
-	hw_set_cxx_reg(phw_data, 0x80, val);
-
-/* RF_Ctrl */
-	hw_get_cxx_reg(phw_data, 0xE4, &val);
-	val |= BIT(0);
-	hw_set_cxx_reg(phw_data, 0xE4, val);
-	PHY_DEBUG(("[CAL] ** RF_CTRL(0xE4) = 0x%08X", val));
-
 	hw_set_dxx_reg(phw_data, 0x58, 0x44444444); /* IQ_Alpha */
 
 	/* b. */
@@ -1461,13 +1449,8 @@ void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency)
 
 	PHY_DEBUG(("[CAL] -> phy_calibration_winbond()\n"));
 
-	/* 20040701 1.1.25.1000 kevin */
-	hw_get_cxx_reg(phw_data, 0x80, &mac_ctrl);
-	hw_get_cxx_reg(phw_data, 0xE4, &rf_ctrl);
 	hw_get_dxx_reg(phw_data, 0x58, &iq_alpha);
 
-
-
 	_rxadc_dc_offset_cancellation_winbond(phw_data, frequency);
 	/* _txidac_dc_offset_cancellation_winbond(phw_data); */
 	/* _txqdac_dc_offset_cacellation_winbond(phw_data); */
@@ -1482,11 +1465,8 @@ void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency)
 	PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
 
 	/* i. Set RFIC to "Normal mode" */
-	hw_set_cxx_reg(phw_data, 0x80, mac_ctrl);
-	hw_set_cxx_reg(phw_data, 0xE4, rf_ctrl);
 	hw_set_dxx_reg(phw_data, 0x58, iq_alpha);
 
-
 	/*********************************************************************/
 	phy_init_rf(phw_data);
 
diff --git a/drivers/staging/winbond/wbhal_f.h b/drivers/staging/winbond/wbhal_f.h
index 401c024..fc78c14 100644
--- a/drivers/staging/winbond/wbhal_f.h
+++ b/drivers/staging/winbond/wbhal_f.h
@@ -78,14 +78,4 @@ u32 hal_get_bss_pk_cnt(struct hw_data *hw_data);
 #define hal_get_time_count(_P)		(_P->time_count / 10)
 #define hal_detect_error(_P)		(_P->WbUsb.DetectCount)
 
-/* The follow function is unused for IS89C35 */
-#define hal_disable_interrupt(_A)
-#define hal_enable_interrupt(_A)
-#define hal_get_interrupt_type(_A)
-#define hal_get_clear_interrupt(_A)
 #define hal_ibss_disconnect(_A)		(hal_stop_sync_bss(_A))
-#define hal_join_request_stop(_A)
-#define hw_get_cxx_reg(_A, _B, _C)
-#define hw_set_cxx_reg(_A, _B, _C)
-
-
-- 
1.6.3.3


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

* [PATCH 2/7] w35und: Remove remaining typedef declarations
  2010-09-19  9:28 [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h Pekka Enberg
@ 2010-09-19  9:28 ` Pekka Enberg
  2010-09-19  9:28   ` [PATCH 3/7] w35und: Kill unused scan_s.h header Pekka Enberg
  2010-09-19 21:43   ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pavel Machek
  2010-09-19 21:42 ` [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h Pavel Machek
  2010-09-19 21:43 ` Pavel Machek
  2 siblings, 2 replies; 10+ messages in thread
From: Pekka Enberg @ 2010-09-19  9:28 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Pekka Enberg, Lars Lindley, Pavel Machek, Ruslan Pisarev

This patch removes remaining typedef declarations from the w35und driver. Most
of them were unused so I just killed them off completely.

Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/TODO             |    1 -
 drivers/staging/winbond/core.h           |    2 +-
 drivers/staging/winbond/mac_structures.h |   17 ---------
 drivers/staging/winbond/mds.c            |   34 +++++++++---------
 drivers/staging/winbond/mds_f.h          |    2 +-
 drivers/staging/winbond/mlme_s.h         |   32 +-----------------
 drivers/staging/winbond/mlmetxrx.c       |    5 ---
 drivers/staging/winbond/scan_s.h         |   53 ------------------------------
 drivers/staging/winbond/wb35rx.c         |    2 +-
 drivers/staging/winbond/wb35tx.c         |    2 +-
 drivers/staging/winbond/wbhal_s.h        |   37 ++++++++++-----------
 11 files changed, 41 insertions(+), 146 deletions(-)

diff --git a/drivers/staging/winbond/TODO b/drivers/staging/winbond/TODO
index 8c1baaf..43bee56 100644
--- a/drivers/staging/winbond/TODO
+++ b/drivers/staging/winbond/TODO
@@ -3,7 +3,6 @@ TODO:
 	- checkpatch cleanups
 	- kerneldoc cleanups
 	- fix severeCamelCaseInfestation
-	- remove typedefs
 	- remove unused ioctls
 	- use cfg80211 for regulatory stuff
 	- fix 4k stack problems
diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
index b87d6c0..2e9f02a 100644
--- a/drivers/staging/winbond/core.h
+++ b/drivers/staging/winbond/core.h
@@ -18,7 +18,7 @@ struct wbsoft_priv {
 	struct wb_local_para sLocalPara;	/* Myself connected
 							parameters */
 
-	MLME_FRAME sMlmeFrame;	/* connect to peerSTA parameters */
+	struct mlme_frame sMlmeFrame;	/* connect to peerSTA parameters */
 
 	struct wb35_mto_params sMtoPara;	/* MTO_struct ... */
 	struct hw_data sHwData;	/*For HAL */
diff --git a/drivers/staging/winbond/mac_structures.h b/drivers/staging/winbond/mac_structures.h
index 415256f..ed3df29 100644
--- a/drivers/staging/winbond/mac_structures.h
+++ b/drivers/staging/winbond/mac_structures.h
@@ -177,23 +177,6 @@ enum enum_MMPDUResultCode
 } WB_MMPDURESULTCODE, *PWB_MMPDURESULTCODE;
 */
 
-/*===========================================================
-// enum_TxRate --
-//   Define the transmission constants based on W89C32 MAC
-//   target specification.
-//===========================================================*/
-typedef enum enum_TxRate {
-    TXRATE_1M               = 0,
-    TXRATE_2MLONG           = 2,
-    TXRATE_2MSHORT          = 3,
-    TXRATE_55MLONG          = 4,
-    TXRATE_55MSHORT         = 5,
-    TXRATE_11MLONG          = 6,
-    TXRATE_11MSHORT         = 7,
-    TXRATE_AUTO             = 255           /* PD43 20021108 */
-} WB_TXRATE, *PWB_TXRATE;
-
-
 #define	RATE_BITMAP_1M				1
 #define	RATE_BITMAP_2M				2
 #define	RATE_BITMAP_5dot5M			5
diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c
index e8320a6..b6c0921 100644
--- a/drivers/staging/winbond/mds.c
+++ b/drivers/staging/winbond/mds.c
@@ -24,12 +24,12 @@ Mds_Destroy(struct wbsoft_priv *adapter)
 
 static void Mds_DurationSet(struct wbsoft_priv *adapter,  struct wb35_descriptor *pDes,  u8 *buffer)
 {
-	PT00_DESCRIPTOR	pT00;
-	PT01_DESCRIPTOR	pT01;
+	struct T00_descriptor *pT00;
+	struct T01_descriptor *pT01;
 	u16	Duration, NextBodyLen, OffsetSize;
 	u8	Rate, i;
 	unsigned char	CTS_on = false, RTS_on = false;
-	PT00_DESCRIPTOR pNextT00;
+	struct T00_descriptor *pNextT00;
 	u16 BodyLen = 0;
 	unsigned char boGroupAddr = false;
 
@@ -39,9 +39,9 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter,  struct wb35_descriptor
 	if (!Rate)
 		Rate = 1;
 
-	pT00 = (PT00_DESCRIPTOR)buffer;
-	pT01 = (PT01_DESCRIPTOR)(buffer+4);
-	pNextT00 = (PT00_DESCRIPTOR)(buffer+OffsetSize);
+	pT00 = (struct T00_descriptor *)buffer;
+	pT01 = (struct T01_descriptor *)(buffer+4);
+	pNextT00 = (struct T00_descriptor *)(buffer+OffsetSize);
 
 	if( buffer[ DOT_11_DA_OFFSET+8 ] & 0x1 ) /* +8 for USB hdr */
 		boGroupAddr = true;
@@ -176,9 +176,9 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter,  struct wb35_descriptor
 			/* ----end 20061009 add by anson's endian */
 
 			buffer += OffsetSize;
-			pT01 = (PT01_DESCRIPTOR)(buffer+4);
+			pT01 = (struct T01_descriptor *)(buffer+4);
 			if (i != 1)	/* The last fragment will not have the next fragment */
-				pNextT00 = (PT00_DESCRIPTOR)(buffer+OffsetSize);
+				pNextT00 = (struct T00_descriptor *)(buffer+OffsetSize);
 		}
 
 		/*******************************************
@@ -219,7 +219,7 @@ static void Mds_DurationSet(struct wbsoft_priv *adapter,  struct wb35_descriptor
 /* The function return the 4n size of usb pk */
 static u16 Mds_BodyCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *pDes, u8 *TargetBuffer)
 {
-	PT00_DESCRIPTOR	pT00;
+	struct T00_descriptor *pT00;
 	struct wb35_mds *pMds = &adapter->Mds;
 	u8	*buffer;
 	u8	*src_buffer;
@@ -234,9 +234,9 @@ static u16 Mds_BodyCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *pDe
 	SizeLeft = pDes->buffer_total_size;
 	buf_index = pDes->buffer_start_index;
 
-	pT00 = (PT00_DESCRIPTOR)buffer;
+	pT00 = (struct T00_descriptor *)buffer;
 	while (SizeLeft) {
-		pT00 = (PT00_DESCRIPTOR)buffer;
+		pT00 = (struct T00_descriptor *)buffer;
 		CopySize = SizeLeft;
 		if (SizeLeft > pDes->FragmentThreshold) {
 			CopySize = pDes->FragmentThreshold;
@@ -303,7 +303,7 @@ static u16 Mds_BodyCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *pDe
 		if (SizeLeft) {
 			buffer = TargetBuffer + Size; /* Get the next 4n start address */
 			memcpy( buffer, TargetBuffer, 32 ); /* Copy 8B USB +24B 802.11 */
-			pT00 = (PT00_DESCRIPTOR)buffer;
+			pT00 = (struct T00_descriptor *)buffer;
 			pT00->T00_first_mpdu = 0;
 		}
 
@@ -322,8 +322,8 @@ static void Mds_HeaderCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *
 {
 	struct wb35_mds *pMds = &adapter->Mds;
 	u8	*src_buffer = pDes->buffer_address[0]; /* 931130.5.g */
-	PT00_DESCRIPTOR	pT00;
-	PT01_DESCRIPTOR	pT01;
+	struct T00_descriptor *pT00;
+	struct T01_descriptor *pT01;
 	u16	stmp;
 	u8	i, ctmp1, ctmp2, ctmpf;
 	u16	FragmentThreshold = CURRENT_FRAGMENT_THRESHOLD;
@@ -333,9 +333,9 @@ static void Mds_HeaderCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *
 	/*
 	 * Set USB header 8 byte
 	 */
-	pT00 = (PT00_DESCRIPTOR)TargetBuffer;
+	pT00 = (struct T00_descriptor *)TargetBuffer;
 	TargetBuffer += 4;
-	pT01 = (PT01_DESCRIPTOR)TargetBuffer;
+	pT01 = (struct T01_descriptor *)TargetBuffer;
 	TargetBuffer += 4;
 
 	pT00->value = 0; /* Clear */
@@ -550,7 +550,7 @@ Mds_Tx(struct wbsoft_priv *adapter)
 }
 
 void
-Mds_SendComplete(struct wbsoft_priv *adapter, PT02_DESCRIPTOR pT02)
+Mds_SendComplete(struct wbsoft_priv *adapter, struct T02_descriptor *pT02)
 {
 	struct wb35_mds *pMds = &adapter->Mds;
 	struct hw_data *pHwData = &adapter->sHwData;
diff --git a/drivers/staging/winbond/mds_f.h b/drivers/staging/winbond/mds_f.h
index 20e97bf..7f68dea 100644
--- a/drivers/staging/winbond/mds_f.h
+++ b/drivers/staging/winbond/mds_f.h
@@ -7,7 +7,7 @@
 unsigned char Mds_initial(struct wbsoft_priv *adapter);
 void Mds_Destroy(struct wbsoft_priv *adapter);
 void Mds_Tx(struct wbsoft_priv *adapter);
-void Mds_SendComplete(struct wbsoft_priv *adapter, PT02_DESCRIPTOR pt02);
+void Mds_SendComplete(struct wbsoft_priv *adapter, struct T02_descriptor *pt02);
 void Mds_MpduProcess(struct wbsoft_priv *adapter, struct wb35_descriptor *prxdes);
 extern void DataDmp(u8 *pdata, u32 len, u32 offset);
 
diff --git a/drivers/staging/winbond/mlme_s.h b/drivers/staging/winbond/mlme_s.h
index a7ef3c7..d5b6364 100644
--- a/drivers/staging/winbond/mlme_s.h
+++ b/drivers/staging/winbond/mlme_s.h
@@ -132,7 +132,7 @@
 #define boMLME_IdleScanState(_BB_)	(_BB_->wState == IDLE_SCAN)
 #define boMLME_FoundSTAinfo(_CC_)	(_CC_->wState >= IDLE_SCAN)
 
-typedef struct _MLME_FRAME {
+struct mlme_frame {
 	s8		*pMMPDU;
 	u16		len;
 	u8		DataType;
@@ -155,34 +155,6 @@ typedef struct _MLME_FRAME {
 	u16		wNumRxMMPDUInMLME;	/* Number of the Rx MMPDU */
 	u16		reserved_1;		/*  in MLME. */
 						/*  excluding the discarded */
-} MLME_FRAME, *psMLME_FRAME;
-
-typedef struct _AUTHREQ {
-
-	u8		peerMACaddr[MAC_ADDR_LENGTH];
-	u16		wAuthAlgorithm;
-} MLME_AUTHREQ_PARA, *psMLME_AUTHREQ_PARA;
-
-typedef struct _ASSOCREQ {
-	u8		PeerSTAAddr[MAC_ADDR_LENGTH];
-	u16		CapabilityInfo;
-	u16		ListenInterval;
-} __attribute__ ((packed)) MLME_ASSOCREQ_PARA, *psMLME_ASSOCREQ_PARA;
-
-typedef struct _REASSOCREQ {
-	u8		NewAPAddr[MAC_ADDR_LENGTH];
-	u16		CapabilityInfo;
-	u16		ListenInterval;
-} __attribute__ ((packed)) MLME_REASSOCREQ_PARA, *psMLME_REASSOCREQ_PARA;
-
-typedef struct _MLMECALLBACK {
-	u8		*psFramePtr;
-	u8		bResult;
-} MLME_TXCALLBACK, *psMLME_TXCALLBACK;
-
-typedef struct _RXDATA {
-	s32		FrameLength;
-	u8		__attribute__ ((packed)) *pbFramePtr;
-} __attribute__ ((packed)) RXDATA, *psRXDATA;
+};
 
 #endif
diff --git a/drivers/staging/winbond/mlmetxrx.c b/drivers/staging/winbond/mlmetxrx.c
index dcd8a11..74488c2 100644
--- a/drivers/staging/winbond/mlmetxrx.c
+++ b/drivers/staging/winbond/mlmetxrx.c
@@ -76,15 +76,10 @@ static void MLMEfreeMMPDUBuffer(struct wbsoft_priv *adapter, s8 *pData)
 void
 MLME_SendComplete(struct wbsoft_priv *adapter, u8 PacketID, unsigned char SendOK)
 {
-	MLME_TXCALLBACK	TxCallback;
-
     /* Reclaim the data buffer */
 	adapter->sMlmeFrame.len = 0;
 	MLMEfreeMMPDUBuffer(adapter, adapter->sMlmeFrame.pMMPDU);
 
-
-	TxCallback.bResult = MLME_SUCCESS;
-
 	/* Return resource */
 	adapter->sMlmeFrame.IsInUsed = PACKET_FREE_TO_USE;
 }
diff --git a/drivers/staging/winbond/scan_s.h b/drivers/staging/winbond/scan_s.h
index 85e7523..85cdf3b 100644
--- a/drivers/staging/winbond/scan_s.h
+++ b/drivers/staging/winbond/scan_s.h
@@ -30,59 +30,6 @@
 #define ACTIVE_SCAN			0
 #define PASSIVE_SCAN			1
 
-/* Global data structures, Initial Scan & Background Scan */
-typedef struct _SCAN_REQ_PARA {	/* mandatory parameters for SCAN request */
-
-	u32			ScanType;	/* passive/active scan */
-
-	u8			reserved_1[2];
-
-	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;
-
-	SCAN_REQ_PARA	sScanReq;
-
-	u8		BSSID[MAC_ADDR_LENGTH + 2]; /* scan only for this BSSID */
-
-	u32		BssType;	/* scan only for this BSS type */
-
-	u16		ProbeDelay;
-	u16		MinChannelTime;
-
-	u16		MaxChannelTime;
-	u16		reserved_1;
-
-	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;
-
-	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		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
diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c
index efe82b1..448514a 100644
--- a/drivers/staging/winbond/wb35rx.c
+++ b/drivers/staging/winbond/wb35rx.c
@@ -160,7 +160,7 @@ static void Wb35Rx_Complete(struct urb *urb)
 	u32			SizeCheck;
 	u16			BulkLength;
 	u32			RxBufferId;
-	R00_DESCRIPTOR		R00;
+	struct R00_descriptor		R00;
 
 	/* Variable setting */
 	pWb35Rx->EP3vm_state = VM_COMPLETED;
diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
index bda7a91..2a9d055 100644
--- a/drivers/staging/winbond/wb35tx.c
+++ b/drivers/staging/winbond/wb35tx.c
@@ -210,7 +210,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb)
 {
 	struct wbsoft_priv *adapter = pUrb->context;
 	struct hw_data *	pHwData = &adapter->sHwData;
-	T02_DESCRIPTOR	T02, TSTATUS;
+	struct T02_descriptor	T02, TSTATUS;
 	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
 	u32 *		pltmp = (u32 *)pWb35Tx->EP2_buf;
 	u32		i;
diff --git a/drivers/staging/winbond/wbhal_s.h b/drivers/staging/winbond/wbhal_s.h
index 33457c2..821a1b3 100644
--- a/drivers/staging/winbond/wbhal_s.h
+++ b/drivers/staging/winbond/wbhal_s.h
@@ -105,7 +105,7 @@ enum {
 
 #define FLAG_BAND_RX_MASK		0x10000000 /* Bit 28 */
 
-typedef struct _R00_DESCRIPTOR {
+struct R00_descriptor {
 	union {
 		u32	value;
 #ifdef _BIG_ENDIAN_
@@ -126,9 +126,9 @@ typedef struct _R00_DESCRIPTOR {
 		};
 #endif
 	};
-} R00_DESCRIPTOR, *PR00_DESCRIPTOR;
+};
 
-typedef struct _T00_DESCRIPTOR {
+struct T00_descriptor {
 	union {
 		u32	value;
 #ifdef _BIG_ENDIAN_
@@ -157,9 +157,9 @@ typedef struct _T00_DESCRIPTOR {
 		};
 #endif
 	};
-} T00_DESCRIPTOR, *PT00_DESCRIPTOR;
+};
 
-typedef struct _R01_DESCRIPTOR {
+struct R01_descriptor {
 	union {
 		u32	value;
 #ifdef _BIG_ENDIAN_
@@ -208,9 +208,9 @@ typedef struct _R01_DESCRIPTOR {
 		};
 #endif
 	};
-} R01_DESCRIPTOR, *PR01_DESCRIPTOR;
+};
 
-typedef struct _T01_DESCRIPTOR {
+struct T01_descriptor {
 	union {
 		u32	value;
 #ifdef _BIG_ENDIAN_
@@ -245,9 +245,9 @@ typedef struct _T01_DESCRIPTOR {
 		};
 #endif
 	};
-} T01_DESCRIPTOR, *PT01_DESCRIPTOR;
+};
 
-typedef struct _T02_DESCRIPTOR {
+struct T02_descriptor {
 	union {
 		u32	value;
 #ifdef _BIG_ENDIAN_
@@ -290,7 +290,7 @@ typedef struct _T02_DESCRIPTOR {
 		};
 #endif
 	};
-} T02_DESCRIPTOR, *PT02_DESCRIPTOR;
+};
 
 struct wb35_descriptor { /* Skip length = 8 DWORD */
 	/* ID for descriptor ---, The field doesn't be cleard in the operation of Descriptor definition */
@@ -309,20 +309,20 @@ struct wb35_descriptor { /* Skip length = 8 DWORD */
 
 	/* For R00 and T00 ------------------------------ */
 	union {
-		R00_DESCRIPTOR	R00;
-		T00_DESCRIPTOR	T00;
+		struct R00_descriptor	R00;
+		struct T00_descriptor	T00;
 	};
 
 	/* For R01 and T01 ------------------------------ */
 	union {
-		R01_DESCRIPTOR	R01;
-		T01_DESCRIPTOR	T01;
+		struct R01_descriptor	R01;
+		struct T01_descriptor	T01;
 	};
 
 	/* For R02 and T02 ------------------------------ */
 	union {
 		u32		R02;
-		T02_DESCRIPTOR	T02;
+		struct T02_descriptor	T02;
 	};
 
 	/* For R03 and T03 ------------------------------ */
@@ -348,11 +348,10 @@ struct wb35_descriptor { /* Skip length = 8 DWORD */
 #define MAX_TXVGA_EEPROM		9	/* How many word(u16) of EEPROM will be used for TxVGA */
 #define MAX_RF_PARAMETER		32
 
-typedef struct _TXVGA_FOR_50 {
+struct txvga_for_50 {
 	u8	ChanNo;
 	u8	TxVgaValue;
-} TXVGA_FOR_50;
-
+};
 
 /*
  * ==============================================
@@ -479,7 +478,7 @@ struct hw_data {
 
 	u8			TxVgaSettingInEEPROM[(((MAX_TXVGA_EEPROM * 2) + 3) & ~0x03)]; /* For EEPROM value */
 	u8			TxVgaFor24[16]; /* Max is 14, 2 for alignment */
-	TXVGA_FOR_50		TxVgaFor50[36];	/* 35 channels in 5G. 35x2 = 70 byte. 2 for alignments */
+	struct txvga_for_50		TxVgaFor50[36];	/* 35 channels in 5G. 35x2 = 70 byte. 2 for alignments */
 
 	u16			Scan_Interval;
 	u16			RESERVED6;
-- 
1.6.3.3


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

* [PATCH 3/7] w35und: Kill unused scan_s.h header
  2010-09-19  9:28 ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pekka Enberg
@ 2010-09-19  9:28   ` Pekka Enberg
  2010-09-19  9:28     ` [PATCH 4/7] w35und: Remove dead code from mlme_s.h Pekka Enberg
  2010-09-19 21:43   ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pavel Machek
  1 sibling, 1 reply; 10+ messages in thread
From: Pekka Enberg @ 2010-09-19  9:28 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Pekka Enberg, Lars Lindley, Pavel Machek, Ruslan Pisarev

The scan_s.h header is not actually used for anything so just kill it off.

Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/mds_s.h  |    1 -
 drivers/staging/winbond/scan_s.h |   57 --------------------------------------
 2 files changed, 0 insertions(+), 58 deletions(-)
 delete mode 100644 drivers/staging/winbond/scan_s.h

diff --git a/drivers/staging/winbond/mds_s.h b/drivers/staging/winbond/mds_s.h
index 89328c5..e2de4bd 100644
--- a/drivers/staging/winbond/mds_s.h
+++ b/drivers/staging/winbond/mds_s.h
@@ -7,7 +7,6 @@
 
 #include "localpara.h"
 #include "mac_structures.h"
-#include "scan_s.h"
 
 /* Preamble_Type, see <SFS-802.11G-MIB-203> */
 enum {
diff --git a/drivers/staging/winbond/scan_s.h b/drivers/staging/winbond/scan_s.h
deleted file mode 100644
index 85cdf3b..0000000
--- a/drivers/staging/winbond/scan_s.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef __WINBOND_SCAN_S_H
-#define __WINBOND_SCAN_S_H
-
-#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
-#define SCANMSG_PROBE_RESPONSE		0x03
-#define SCANMSG_TIMEOUT			0x04
-#define SCANMSG_TXPROBE_FAIL		0x05
-#define SCANMSG_ENABLE_BGSCAN		0x06
-#define SCANMSG_STOP_SCAN		0x07
-
-/*
- * 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 */
-#define ACTIVE_SCAN			0
-#define PASSIVE_SCAN			1
-
-/*
- * ===========================================================
- *	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.6.3.3


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

* [PATCH 4/7] w35und: Remove dead code from mlme_s.h
  2010-09-19  9:28   ` [PATCH 3/7] w35und: Kill unused scan_s.h header Pekka Enberg
@ 2010-09-19  9:28     ` Pekka Enberg
  2010-09-19  9:28       ` [PATCH 5/7] w35und: Inline mlme_s.h to core.h Pekka Enberg
  0 siblings, 1 reply; 10+ messages in thread
From: Pekka Enberg @ 2010-09-19  9:28 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Pekka Enberg, Lars Lindley, Pavel Machek, Ruslan Pisarev

There's bunch of macros in mlme_s.h that aren't used for anything. Kill them
off.

Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/mlme_s.h |  116 --------------------------------------
 1 files changed, 0 insertions(+), 116 deletions(-)

diff --git a/drivers/staging/winbond/mlme_s.h b/drivers/staging/winbond/mlme_s.h
index d5b6364..0e7d2f6 100644
--- a/drivers/staging/winbond/mlme_s.h
+++ b/drivers/staging/winbond/mlme_s.h
@@ -8,112 +8,6 @@
 #include "mds_s.h"
 
 /*
- * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- *	Mlme.h
- *		Define the related definitions of MLME module
- *
- * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
-
-#define AUTH_REJECT_REASON_CHALLENGE_FAIL	1
-
-/* the state of MLME module */
-#define INACTIVE		0x0
-#define IDLE_SCAN		0x1
-
-/* the state of MLME/ESS module */
-#define STATE_1			0x2
-#define AUTH_REQ		0x3
-#define AUTH_WEP		0x4
-#define STATE_2			0x5
-#define ASSOC_REQ		0x6
-#define STATE_3			0x7
-
-/* the state of MLME/IBSS module */
-#define IBSS_JOIN_SYNC		0x8
-#define IBSS_AUTH_REQ		0x9
-#define IBSS_AUTH_CHANLGE	0xa
-#define IBSS_AUTH_WEP		0xb
-#define IBSS_AUTH_IND		0xc
-#define IBSS_STATE_2		0xd
-
-
-
-/*
- * =========================================
- * depend on D5C(MAC timing control 03 register):
- * MaxTxMSDULifeTime default 0x80000us
- */
-#define AUTH_FAIL_TIMEOUT	550
-#define ASSOC_FAIL_TIMEOUT	550
-#define REASSOC_FAIL_TIMEOUT	550
-
-/* MLME task global CONSTANTS, STRUCTURE, variables */
-
-/* =========================================
- * enum_ResultCode --
- * Result code returned from MLME to SME.
- * =========================================
- */
-#define MLME_SUCCESS			0	/* follow spec. */
-#define	INVALID_PARAMETERS		1	/* Not following spec. */
-#define	NOT_SUPPPORTED			2
-#define	TIMEOUT				3
-#define	TOO_MANY_SIMULTANEOUS_REQUESTS	4
-#define REFUSED				5
-#define	BSS_ALREADY_STARTED_OR_JOINED	6
-#define	TRANSMIT_FRAME_FAIL		7
-#define	NO_BSS_FOUND			8
-#define RETRY				9
-#define GIVE_UP				10
-
-
-#define OPEN_AUTH			0
-#define SHARE_AUTH			1
-#define ANY_AUTH			2
-#define WPA_AUTH			3	/* for WPA */
-#define WPAPSK_AUTH			4
-#define WPANONE_AUTH			5
-#ifdef _WPA2_
-#define WPA2_AUTH			6	/* for WPA2 */
-#define WPA2PSK_AUTH			7
-#endif /* end def _WPA2_ */
-
-/*
- * =========================================
- * define the msg type of MLME module
- * =========================================
- */
-
-/* from SME */
-#define MLMEMSG_AUTH_REQ		0x0b
-#define MLMEMSG_DEAUTH_REQ		0x0c
-#define MLMEMSG_ASSOC_REQ		0x0d
-#define MLMEMSG_REASSOC_REQ		0x0e
-#define MLMEMSG_DISASSOC_REQ		0x0f
-#define MLMEMSG_START_IBSS_REQ		0x10
-#define MLMEMSG_IBSS_NET_CFM		0x11
-
-/* from RX */
-#define MLMEMSG_RCV_MLMEFRAME		0x20
-#define MLMEMSG_RCV_ASSOCRSP		0x22
-#define MLMEMSG_RCV_REASSOCRSP		0x24
-#define MLMEMSG_RCV_DISASSOC		0x2b
-#define MLMEMSG_RCV_AUTH		0x2c
-#define MLMEMSG_RCV_DEAUTH		0x2d
-
-
-/* from TX callback */
-#define MLMEMSG_TX_CALLBACK		0x40
-#define MLMEMSG_ASSOCREQ_CALLBACK	0x41
-#define MLMEMSG_REASSOCREQ_CALLBACK	0x43
-#define MLMEMSG_DISASSOC_CALLBACK	0x4a
-#define MLMEMSG_AUTH_CALLBACK		0x4c
-#define MLMEMSG_DEAUTH_CALLBACK		0x4d
-
-#define MLMEMSG_TIMEOUT			0x50
-
-/*
  * ==============================================
  * Global data structures
  * ==============================================
@@ -122,16 +16,6 @@
 #define MAX_MMPDU_SIZE			1512
 #define MAX_NUM_RX_MMPDU		6
 
-
-/*
- * ==============================================
- * MACRO
- * ==============================================
- */
-#define boMLME_InactiveState(_AA_)	(_AA_->wState == INACTIVE)
-#define boMLME_IdleScanState(_BB_)	(_BB_->wState == IDLE_SCAN)
-#define boMLME_FoundSTAinfo(_CC_)	(_CC_->wState >= IDLE_SCAN)
-
 struct mlme_frame {
 	s8		*pMMPDU;
 	u16		len;
-- 
1.6.3.3


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

* [PATCH 5/7] w35und: Inline mlme_s.h to core.h
  2010-09-19  9:28     ` [PATCH 4/7] w35und: Remove dead code from mlme_s.h Pekka Enberg
@ 2010-09-19  9:28       ` Pekka Enberg
  2010-09-19  9:28         ` [PATCH 6/7] w35und: Remove unused spinlocks Pekka Enberg
  0 siblings, 1 reply; 10+ messages in thread
From: Pekka Enberg @ 2010-09-19  9:28 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Pekka Enberg, Lars Lindley, Pavel Machek, Ruslan Pisarev

The mlme_s.h header is included in one place. As the header is very small, just
inline it to core.h.

Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/core.h   |   35 +++++++++++++++++++++++++++++-
 drivers/staging/winbond/mlme_s.h |   44 --------------------------------------
 2 files changed, 34 insertions(+), 45 deletions(-)
 delete mode 100644 drivers/staging/winbond/mlme_s.h

diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
index 2e9f02a..294d371 100644
--- a/drivers/staging/winbond/core.h
+++ b/drivers/staging/winbond/core.h
@@ -1,12 +1,45 @@
 #ifndef __WINBOND_CORE_H
 #define __WINBOND_CORE_H
 
+#include <linux/spinlock.h>
 #include <linux/wireless.h>
+#include <linux/types.h>
 
-#include "mlme_s.h"
 #include "wbhal_s.h"
 #include "mto.h"
 
+#include "mac_structures.h"
+#include "mds_s.h"
+
+#define MAX_NUM_TX_MMPDU		2
+#define MAX_MMPDU_SIZE			1512
+#define MAX_NUM_RX_MMPDU		6
+
+struct mlme_frame {
+	s8		*pMMPDU;
+	u16		len;
+	u8		DataType;
+	u8		IsInUsed;
+
+	spinlock_t	MLMESpinLock;
+
+	u8		TxMMPDU[MAX_NUM_TX_MMPDU][MAX_MMPDU_SIZE];
+	u8		TxMMPDUInUse[(MAX_NUM_TX_MMPDU + 3) & ~0x03];
+
+	u16		wNumTxMMPDU;
+	u16		wNumTxMMPDUDiscarded;
+
+	u8		RxMMPDU[MAX_NUM_RX_MMPDU][MAX_MMPDU_SIZE];
+	u8		SaveRxBufSlotInUse[(MAX_NUM_RX_MMPDU + 3) & ~0x03];
+
+	u16		wNumRxMMPDU;
+	u16		wNumRxMMPDUDiscarded;
+
+	u16		wNumRxMMPDUInMLME;	/* Number of the Rx MMPDU */
+	u16		reserved_1;		/*  in MLME. */
+						/*  excluding the discarded */
+};
+
 #define WBLINUX_PACKET_ARRAY_SIZE (ETHERNET_TX_DESCRIPTORS*4)
 
 #define WB_MAX_LINK_NAME_LEN 40
diff --git a/drivers/staging/winbond/mlme_s.h b/drivers/staging/winbond/mlme_s.h
deleted file mode 100644
index 0e7d2f6..0000000
--- a/drivers/staging/winbond/mlme_s.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __WINBOND_MLME_H
-#define __WINBOND_MLME_H
-
-#include <linux/types.h>
-#include <linux/spinlock.h>
-
-#include "mac_structures.h"
-#include "mds_s.h"
-
-/*
- * ==============================================
- * Global data structures
- * ==============================================
- */
-#define MAX_NUM_TX_MMPDU		2
-#define MAX_MMPDU_SIZE			1512
-#define MAX_NUM_RX_MMPDU		6
-
-struct mlme_frame {
-	s8		*pMMPDU;
-	u16		len;
-	u8		DataType;
-	u8		IsInUsed;
-
-	spinlock_t	MLMESpinLock;
-
-	u8		TxMMPDU[MAX_NUM_TX_MMPDU][MAX_MMPDU_SIZE];
-	u8		TxMMPDUInUse[(MAX_NUM_TX_MMPDU + 3) & ~0x03];
-
-	u16		wNumTxMMPDU;
-	u16		wNumTxMMPDUDiscarded;
-
-	u8		RxMMPDU[MAX_NUM_RX_MMPDU][MAX_MMPDU_SIZE];
-	u8		SaveRxBufSlotInUse[(MAX_NUM_RX_MMPDU + 3) & ~0x03];
-
-	u16		wNumRxMMPDU;
-	u16		wNumRxMMPDUDiscarded;
-
-	u16		wNumRxMMPDUInMLME;	/* Number of the Rx MMPDU */
-	u16		reserved_1;		/*  in MLME. */
-						/*  excluding the discarded */
-};
-
-#endif
-- 
1.6.3.3


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

* [PATCH 6/7] w35und: Remove unused spinlocks
  2010-09-19  9:28       ` [PATCH 5/7] w35und: Inline mlme_s.h to core.h Pekka Enberg
@ 2010-09-19  9:28         ` Pekka Enberg
  2010-09-19  9:28           ` [PATCH 7/7] w35und: Remove unused fields from struct wbsoft_priv Pekka Enberg
  0 siblings, 1 reply; 10+ messages in thread
From: Pekka Enberg @ 2010-09-19  9:28 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Pekka Enberg, Lars Lindley, Pavel Machek, Ruslan Pisarev

This patch removes unused spinlocks from "struct mlme_frame" and "struct
wbsoft_priv".

Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/core.h  |    5 -----
 drivers/staging/winbond/wbusb.c |    2 --
 2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
index 294d371..333b197 100644
--- a/drivers/staging/winbond/core.h
+++ b/drivers/staging/winbond/core.h
@@ -1,7 +1,6 @@
 #ifndef __WINBOND_CORE_H
 #define __WINBOND_CORE_H
 
-#include <linux/spinlock.h>
 #include <linux/wireless.h>
 #include <linux/types.h>
 
@@ -21,8 +20,6 @@ struct mlme_frame {
 	u8		DataType;
 	u8		IsInUsed;
 
-	spinlock_t	MLMESpinLock;
-
 	u8		TxMMPDU[MAX_NUM_TX_MMPDU][MAX_MMPDU_SIZE];
 	u8		TxMMPDUInUse[(MAX_NUM_TX_MMPDU + 3) & ~0x03];
 
@@ -57,8 +54,6 @@ struct wbsoft_priv {
 	struct hw_data sHwData;	/*For HAL */
 	struct wb35_mds Mds;
 
-	spinlock_t SpinLock;
-
 	atomic_t ThreadCount;
 
 	u32 RxByteCount;
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index abaa05a..5419f4f 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -783,8 +783,6 @@ static int wb35_probe(struct usb_interface *intf,
 
 	priv = dev->priv;
 
-	spin_lock_init(&priv->SpinLock);
-
 	pWbUsb = &priv->sHwData.WbUsb;
 	pWbUsb->udev = udev;
 
-- 
1.6.3.3


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

* [PATCH 7/7] w35und: Remove unused fields from struct wbsoft_priv
  2010-09-19  9:28         ` [PATCH 6/7] w35und: Remove unused spinlocks Pekka Enberg
@ 2010-09-19  9:28           ` Pekka Enberg
  0 siblings, 0 replies; 10+ messages in thread
From: Pekka Enberg @ 2010-09-19  9:28 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Pekka Enberg, Lars Lindley, Pavel Machek, Ruslan Pisarev

This patch removes unused fields from "struct wbsoft_priv".

Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/core.h |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
index 333b197..2b87a00 100644
--- a/drivers/staging/winbond/core.h
+++ b/drivers/staging/winbond/core.h
@@ -42,9 +42,6 @@ struct mlme_frame {
 #define WB_MAX_LINK_NAME_LEN 40
 
 struct wbsoft_priv {
-	u32 adapterIndex;	/* 20060703.4 Add for using padapterContext
-							global adapter point */
-
 	struct wb_local_para sLocalPara;	/* Myself connected
 							parameters */
 
@@ -59,10 +56,6 @@ struct wbsoft_priv {
 	u32 RxByteCount;
 	u32 TxByteCount;
 
-	struct sk_buff *packet_return;
-	s32 netif_state_stop;	/* 1: stop  0: normal */
-	struct iw_statistics iw_stats;
-
 	u8 LinkName[WB_MAX_LINK_NAME_LEN];
 
 	bool enabled;
-- 
1.6.3.3


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

* Re: [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h
  2010-09-19  9:28 [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h Pekka Enberg
  2010-09-19  9:28 ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pekka Enberg
@ 2010-09-19 21:42 ` Pavel Machek
  2010-09-19 21:43 ` Pavel Machek
  2 siblings, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2010-09-19 21:42 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: gregkh, linux-kernel, Lars Lindley, Ruslan Pisarev

Hi!

> Fixes an uninitialized variable access in _rx_iq_calibration_loop_winbond():
> 
>     CC [M]  drivers/staging/winbond/phy_calibration.o
>   drivers/staging/winbond/phy_calibration.c: In function ???_rx_iq_calibration_loop_winbond???:
>   drivers/staging/winbond/phy_calibration.c:1138: warning: ???val??? is used uninitialized in this function
> 

Are you sure this is correct?

> @@ -1132,18 +1132,6 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
>  	PHY_DEBUG(("[CAL] -> [5]_rx_iq_calibration_loop()\n"));
>  	PHY_DEBUG(("[CAL] ** factor = %d\n", factor));
>  
> -
> -/* RF Control Override */
> -	hw_get_cxx_reg(phw_data, 0x80, &val);
> -	val |= BIT(19);
> -	hw_set_cxx_reg(phw_data, 0x80, val);
> -

We pass pointer to val somewhere, set a bit, write it back. Seems ok
to me...?

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

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

* Re: [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h
  2010-09-19  9:28 [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h Pekka Enberg
  2010-09-19  9:28 ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pekka Enberg
  2010-09-19 21:42 ` [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h Pavel Machek
@ 2010-09-19 21:43 ` Pavel Machek
  2 siblings, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2010-09-19 21:43 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: gregkh, linux-kernel, Lars Lindley, Ruslan Pisarev

Hi!

> Fixes an uninitialized variable access in _rx_iq_calibration_loop_winbond():
> 
>     CC [M]  drivers/staging/winbond/phy_calibration.o
>   drivers/staging/winbond/phy_calibration.c: In function ???_rx_iq_calibration_loop_winbond???:
>   drivers/staging/winbond/phy_calibration.c:1138: warning: ???val??? is used uninitialized in this function
> 

Aha, I should have read the description.

> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
> Signed-off-by: Pekka Enberg <penberg@kernel.org>
> ---
>  drivers/staging/winbond/phy_calibration.c |   20 --------------------
>  drivers/staging/winbond/wbhal_f.h         |   10 ----------
>  2 files changed, 0 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
> index 5c1f053..2b375ba 100644
> --- a/drivers/staging/winbond/phy_calibration.c
> +++ b/drivers/staging/winbond/phy_calibration.c
> @@ -1132,18 +1132,6 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
>  	PHY_DEBUG(("[CAL] -> [5]_rx_iq_calibration_loop()\n"));
>  	PHY_DEBUG(("[CAL] ** factor = %d\n", factor));
>  
> -
> -/* RF Control Override */
> -	hw_get_cxx_reg(phw_data, 0x80, &val);
> -	val |= BIT(19);
> -	hw_set_cxx_reg(phw_data, 0x80, val);
> -

These are macros that do nothing. ACK the patch.

							Pavel


> --- a/drivers/staging/winbond/wbhal_f.h
> +++ b/drivers/staging/winbond/wbhal_f.h
> @@ -78,14 +78,4 @@ u32 hal_get_bss_pk_cnt(struct hw_data *hw_data);
>  #define hal_get_time_count(_P)		(_P->time_count / 10)
>  #define hal_detect_error(_P)		(_P->WbUsb.DetectCount)
>  
> -/* The follow function is unused for IS89C35 */
> -#define hal_disable_interrupt(_A)
> -#define hal_enable_interrupt(_A)
> -#define hal_get_interrupt_type(_A)
> -#define hal_get_clear_interrupt(_A)
>  #define hal_ibss_disconnect(_A)		(hal_stop_sync_bss(_A))
> -#define hal_join_request_stop(_A)
> -#define hw_get_cxx_reg(_A, _B, _C)
> -#define hw_set_cxx_reg(_A, _B, _C)
> -
> -

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

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

* Re: [PATCH 2/7] w35und: Remove remaining typedef declarations
  2010-09-19  9:28 ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pekka Enberg
  2010-09-19  9:28   ` [PATCH 3/7] w35und: Kill unused scan_s.h header Pekka Enberg
@ 2010-09-19 21:43   ` Pavel Machek
  1 sibling, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2010-09-19 21:43 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: gregkh, linux-kernel, Lars Lindley, Ruslan Pisarev

On Sun 2010-09-19 12:28:38, Pekka Enberg wrote:
> This patch removes remaining typedef declarations from the w35und driver. Most
> of them were unused so I just killed them off completely.
> 
> Cc: Lars Lindley <lindley@coyote.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
> Signed-off-by: Pekka Enberg <penberg@kernel.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] 10+ messages in thread

end of thread, other threads:[~2010-09-19 21:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-19  9:28 [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h Pekka Enberg
2010-09-19  9:28 ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pekka Enberg
2010-09-19  9:28   ` [PATCH 3/7] w35und: Kill unused scan_s.h header Pekka Enberg
2010-09-19  9:28     ` [PATCH 4/7] w35und: Remove dead code from mlme_s.h Pekka Enberg
2010-09-19  9:28       ` [PATCH 5/7] w35und: Inline mlme_s.h to core.h Pekka Enberg
2010-09-19  9:28         ` [PATCH 6/7] w35und: Remove unused spinlocks Pekka Enberg
2010-09-19  9:28           ` [PATCH 7/7] w35und: Remove unused fields from struct wbsoft_priv Pekka Enberg
2010-09-19 21:43   ` [PATCH 2/7] w35und: Remove remaining typedef declarations Pavel Machek
2010-09-19 21:42 ` [PATCH 1/7] w35und: Kill dead HAL macros in wbhal_f.h Pavel Machek
2010-09-19 21:43 ` Pavel Machek

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.