[PATCH 21/34] staging: bcm: Convert typedef PUINT to unsigned int *

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the normal types.
Remove now unused typedef.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
 drivers/staging/bcm/Bcmchar.c             |   42 ++++++------
 drivers/staging/bcm/CmHost.c              |    6 +-
 drivers/staging/bcm/HandleControlPacket.c |    2 +-
 drivers/staging/bcm/InterfaceInit.c       |    6 +-
 drivers/staging/bcm/Misc.c                |   18 +++---
 drivers/staging/bcm/PHSModule.h           |    2 +-
 drivers/staging/bcm/Prototypes.h          |   22 +++---
 drivers/staging/bcm/Typedefs.h            |    1 -
 drivers/staging/bcm/led_control.c         |   12 ++--
 drivers/staging/bcm/nvm.c                 |   98 ++++++++++++++--------------
 10 files changed, 104 insertions(+), 105 deletions(-)

diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index dfc0cbe..89a7611 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -230,7 +230,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 			return -ENOMEM;
 
 		bytes = rdmalt(Adapter, (unsigned int)sRdmBuffer.Register,
-			       (PUINT)temp_buff, Bufflen);
+			       (unsigned int *)temp_buff, Bufflen);
 		if (bytes > 0) {
 			Status = STATUS_SUCCESS;
 			if (copy_to_user(IoBuffer.OutputBuffer, temp_buff, bytes)) {
@@ -272,7 +272,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 		}
 
 		Status = wrmalt(Adapter, (unsigned int)sWrmBuffer.Register,
-				(PUINT)sWrmBuffer.Data, sizeof(ULONG));
+				(unsigned int *)sWrmBuffer.Data, sizeof(ULONG));
 
 		if (Status == STATUS_SUCCESS) {
 			bcm_dbg(Adapter, OTHERS, OSAL_DBG, ALL, "WRM Done\n");
@@ -326,7 +326,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 		}
 
 		uiTempVar = sRdmBuffer.Register & EEPROM_REJECT_MASK;
-		bytes = rdmaltWithLock(Adapter, (unsigned int)sRdmBuffer.Register, (PUINT)temp_buff, IoBuffer.OutputLength);
+		bytes = rdmaltWithLock(Adapter, (unsigned int)sRdmBuffer.Register, (unsigned int *)temp_buff, IoBuffer.OutputLength);
 
 		if (bytes > 0) {
 			Status = STATUS_SUCCESS;
@@ -385,7 +385,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 		}
 
 		Status = wrmaltWithLock(Adapter, (unsigned int)sWrmBuffer.Register,
-					(PUINT)sWrmBuffer.Data, sWrmBuffer.Length);
+					(unsigned int *)sWrmBuffer.Data, sWrmBuffer.Length);
 
 		if (Status == STATUS_SUCCESS) {
 			pr_info("WRM Done\n");
@@ -435,7 +435,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 		/* Set - setting 1 */
 		if (uiOperation) {
 			/* Set the gpio output register */
-			Status = wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, (PUINT)(&value), sizeof(unsigned int));
+			Status = wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, (unsigned int *)(&value), sizeof(unsigned int));
 
 			if (Status == STATUS_SUCCESS) {
 				bcm_dbg(Adapter, OTHERS, OSAL_DBG, ALL,
@@ -447,7 +447,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 			}
 		} else {
 			/* Set the gpio output register */
-			Status = wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, (PUINT)(&value), sizeof(unsigned int));
+			Status = wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, (unsigned int *)(&value), sizeof(unsigned int));
 
 			if (Status == STATUS_SUCCESS) {
 				bcm_dbg(Adapter, OTHERS, OSAL_DBG, ALL,
@@ -460,7 +460,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 			}
 		}
 
-		bytes = rdmaltWithLock(Adapter, (unsigned int)GPIO_MODE_REGISTER, (PUINT)ucResetValue, sizeof(unsigned int));
+		bytes = rdmaltWithLock(Adapter, (unsigned int)GPIO_MODE_REGISTER, (unsigned int *)ucResetValue, sizeof(unsigned int));
 		if (bytes < 0) {
 			Status = bytes;
 			bcm_dbg(Adapter, OTHERS, OSAL_DBG, ALL,
@@ -473,7 +473,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 		/* Set the gpio mode register to output */
 		*(unsigned int *)ucResetValue |= (1<<uiBit);
 		Status = wrmaltWithLock(Adapter, GPIO_MODE_REGISTER,
-					(PUINT)ucResetValue, sizeof(unsigned int));
+					(unsigned int *)ucResetValue, sizeof(unsigned int));
 
 		if (Status == STATUS_SUCCESS) {
 			bcm_dbg(Adapter, OTHERS, OSAL_DBG, ALL,
@@ -551,7 +551,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 
 		/* Set the gpio output register */
 		bytes = rdmaltWithLock(Adapter, (unsigned int)GPIO_PIN_STATE_REGISTER,
-				       (PUINT)ucRead, sizeof(unsigned int));
+				       (unsigned int *)ucRead, sizeof(unsigned int));
 
 		if (bytes < 0) {
 			Status = bytes;
@@ -603,7 +603,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 
 			if (*(unsigned int *)ucResetValue)
 				Status = wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG,
-							(PUINT)ucResetValue, sizeof(ULONG));
+							(unsigned int *)ucResetValue, sizeof(ULONG));
 
 			if (Status != STATUS_SUCCESS) {
 				pr_info("WRM to BCM_GPIO_OUTPUT_SET_REG Failed\n");
@@ -616,7 +616,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 						 (~(pgpio_multi_info[WIMAX_IDX].uiGPIOValue)));
 
 			if (*(unsigned int *)ucResetValue)
-				Status = wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, (PUINT)ucResetValue, sizeof(ULONG));
+				Status = wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, (unsigned int *)ucResetValue, sizeof(ULONG));
 
 			if (Status != STATUS_SUCCESS) {
 				pr_info("WRM to BCM_GPIO_OUTPUT_CLR_REG Failed\n");
@@ -625,7 +625,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 		}
 
 		if (pgpio_multi_info[WIMAX_IDX].uiGPIOMask) {
-			bytes = rdmaltWithLock(Adapter, (unsigned int)GPIO_PIN_STATE_REGISTER, (PUINT)ucResetValue, sizeof(unsigned int));
+			bytes = rdmaltWithLock(Adapter, (unsigned int)GPIO_PIN_STATE_REGISTER, (unsigned int *)ucResetValue, sizeof(unsigned int));
 
 			if (bytes < 0) {
 				Status = bytes;
@@ -667,7 +667,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 		if (copy_from_user(&gpio_multi_mode, IoBuffer.InputBuffer, IoBuffer.InputLength))
 			return -EFAULT;
 
-		bytes = rdmaltWithLock(Adapter, (unsigned int)GPIO_MODE_REGISTER, (PUINT)ucResetValue, sizeof(unsigned int));
+		bytes = rdmaltWithLock(Adapter, (unsigned int)GPIO_MODE_REGISTER, (unsigned int *)ucResetValue, sizeof(unsigned int));
 
 		if (bytes < 0) {
 			Status = bytes;
@@ -701,7 +701,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 			 */
 			pgpio_multi_mode[WIMAX_IDX].uiGPIOMode = *(unsigned int *)ucResetValue;
 
-			Status = wrmaltWithLock(Adapter, GPIO_MODE_REGISTER, (PUINT)ucResetValue, sizeof(ULONG));
+			Status = wrmaltWithLock(Adapter, GPIO_MODE_REGISTER, (unsigned int *)ucResetValue, sizeof(ULONG));
 			if (Status == STATUS_SUCCESS) {
 				bcm_dbg(Adapter, OTHERS, OSAL_DBG, ALL,
 					"WRM to GPIO_MODE_REGISTER Done\n");
@@ -1194,7 +1194,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 		if (pBulkBuffer->SwapEndian == FALSE)
 			Status = wrmWithLock(Adapter, (unsigned int)pBulkBuffer->Register, (char *)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG));
 		else
-			Status = wrmaltWithLock(Adapter, (unsigned int)pBulkBuffer->Register, (PUINT)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG));
+			Status = wrmaltWithLock(Adapter, (unsigned int)pBulkBuffer->Register, (unsigned int *)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG));
 
 		if (Status != STATUS_SUCCESS)
 			pr_info("WRM Failed\n");
@@ -1354,7 +1354,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 				return -EACCES;
 			}
 
-			Status = BeceemNVMRead(Adapter, (PUINT)pReadData, stNVMReadWrite.uiOffset, stNVMReadWrite.uiNumBytes);
+			Status = BeceemNVMRead(Adapter, (unsigned int *)pReadData, stNVMReadWrite.uiOffset, stNVMReadWrite.uiNumBytes);
 			up(&Adapter->NVMRdmWrmLock);
 
 			if (Status != STATUS_SUCCESS) {
@@ -1406,7 +1406,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 						return Status;
 					}
 
-					ulDSDMagicNumInUsrBuff = ntohl(*(PUINT)(pReadData + stNVMReadWrite.uiNumBytes - SIGNATURE_SIZE));
+					ulDSDMagicNumInUsrBuff = ntohl(*(unsigned int *)(pReadData + stNVMReadWrite.uiNumBytes - SIGNATURE_SIZE));
 					if (ulDSDMagicNumInUsrBuff != DSD_IMAGE_MAGIC_NUMBER) {
 						bcm_dbg(Adapter, OTHERS, OSAL_DBG, ALL,
 							"DSD Sig is present neither in Flash nor User provided Input..\n");
@@ -1417,7 +1417,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 				}
 			}
 
-			Status = BeceemNVMWrite(Adapter, (PUINT)pReadData, stNVMReadWrite.uiOffset, stNVMReadWrite.uiNumBytes, stNVMReadWrite.bVerify);
+			Status = BeceemNVMWrite(Adapter, (unsigned int *)pReadData, stNVMReadWrite.uiOffset, stNVMReadWrite.uiNumBytes, stNVMReadWrite.bVerify);
 			if (IsFlash2x(Adapter))
 				BcmFlash2xWriteSig(Adapter, Adapter->eActiveDSD);
 
@@ -1512,7 +1512,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 				ReadBytes = NOB;
 
 			/* Reading the data from Flash 2.x */
-			Status = BcmFlash2xBulkRead(Adapter, (PUINT)pReadBuff, sFlash2xRead.Section, ReadOffset, ReadBytes);
+			Status = BcmFlash2xBulkRead(Adapter, (unsigned int *)pReadBuff, sFlash2xRead.Section, ReadOffset, ReadBytes);
 			if (Status) {
 				bcm_dbg(Adapter, OTHERS, OSAL_DBG, ALL,
 					"Flash 2x read err with Status :%d\n",
@@ -1637,7 +1637,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 			BCM_DEBUG_PRINT_BUFFER(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, pWriteBuff, WriteBytes);
 
 			/* Writing the data from Flash 2.x */
-			Status = BcmFlash2xBulkWrite(Adapter, (PUINT)pWriteBuff, sFlash2xWrite.Section, WriteOffset, WriteBytes, sFlash2xWrite.bVerify);
+			Status = BcmFlash2xBulkWrite(Adapter, (unsigned int *)pWriteBuff, sFlash2xWrite.Section, WriteOffset, WriteBytes, sFlash2xWrite.bVerify);
 
 			if (Status) {
 				pr_info("Flash 2x read err with Status :%d\n",
@@ -1984,7 +1984,7 @@ static long bcm_char_ioctl(struct file *filp, unsigned int cmd, ULONG arg)
 				ReadBytes = NOB;
 
 			/* Reading the data from Flash 2.x */
-			Status = BeceemNVMRead(Adapter, (PUINT)pReadBuff, ReadOffset, ReadBytes);
+			Status = BeceemNVMRead(Adapter, (unsigned int *)pReadBuff, ReadOffset, ReadBytes);
 			if (Status) {
 				pr_info("Flash 2x read err with Status :%d\n",
 					Status);
diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index d65f3a0..95f4678 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -2040,7 +2040,7 @@ ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter)
 		DSX_MESSAGE_EXCHANGE_BUFFER);
 
 	Status = rdmalt(Adapter, DSX_MESSAGE_EXCHANGE_BUFFER,
-			(PUINT)&ulTargetDsxBuffersBase, sizeof(unsigned int));
+			(unsigned int *)&ulTargetDsxBuffersBase, sizeof(unsigned int));
 	if (Status < 0) {
 		bcm_dbg(Adapter, OTHERS, CONN_MSG, ALL, "RDM failed!!\n");
 		return 0;
@@ -2442,7 +2442,7 @@ int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter, unsigned int uiSFId, v
 	return STATUS_SUCCESS;
 }
 
-void OverrideServiceFlowParams(PMINI_ADAPTER Adapter, PUINT puiBuffer)
+void OverrideServiceFlowParams(PMINI_ADAPTER Adapter, unsigned int *puiBuffer)
 {
 	B_UINT32 u32NumofSFsinMsg    = ntohl(*(puiBuffer + 1));
 	stIM_SFHostNotify *pHostInfo = NULL;
@@ -2457,7 +2457,7 @@ void OverrideServiceFlowParams(PMINI_ADAPTER Adapter, PUINT puiBuffer)
 	while (u32NumofSFsinMsg != 0 && u32NumofSFsinMsg < NO_OF_QUEUES) {
 		u32NumofSFsinMsg--;
 		pHostInfo = (stIM_SFHostNotify *)puiBuffer;
-		puiBuffer = (PUINT)(pHostInfo + 1);
+		puiBuffer = (unsigned int *)(pHostInfo + 1);
 
 		ulSFID = ntohl(pHostInfo->SFID);
 		uiSearchRuleIndex=SearchSfid(Adapter, ulSFID);
diff --git a/drivers/staging/bcm/HandleControlPacket.c b/drivers/staging/bcm/HandleControlPacket.c
index c1ef0cf..829cae5 100644
--- a/drivers/staging/bcm/HandleControlPacket.c
+++ b/drivers/staging/bcm/HandleControlPacket.c
@@ -51,7 +51,7 @@ static void handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
 	case IDLE_MODE_STATUS:           /* 0xA3 */
 		bcm_dbg(Adapter, OTHERS, CP_CTRL_PKT, ALL,
 			"IDLE_MODE_STATUS Type Message Got from F/W\n");
-		InterfaceIdleModeRespond(Adapter, (PUINT)(skb->data +
+		InterfaceIdleModeRespond(Adapter, (unsigned int *)(skb->data +
 							  sizeof(unsigned short)));
 		HighPriorityMessage = TRUE;
 		break;
diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c
index 60b4e48..4411144 100644
--- a/drivers/staging/bcm/InterfaceInit.c
+++ b/drivers/staging/bcm/InterfaceInit.c
@@ -117,18 +117,18 @@ static void ConfigureEndPointTypesThroughEEPROM(PMINI_ADAPTER Adapter)
 	 * Update EEPROM Version.
 	 * Read 4 bytes from 508 and modify 511 and 510.
 	 */
-	ReadBeceemEEPROM(Adapter, 0x1FC, (PUINT)&ulReg);
+	ReadBeceemEEPROM(Adapter, 0x1FC, (unsigned int *)&ulReg);
 	ulReg &= 0x0101FFFF;
 	BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x1FC, 4, TRUE);
 
 	/* Update length field if required. Also make the string NULL terminated. */
 
-	ReadBeceemEEPROM(Adapter, 0xA8, (PUINT)&ulReg);
+	ReadBeceemEEPROM(Adapter, 0xA8, (unsigned int *)&ulReg);
 	if ((ulReg&0x00FF0000)>>16 > 0x30) {
 		ulReg = (ulReg&0xFF00FFFF)|(0x30<<16);
 		BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0xA8, 4, TRUE);
 	}
-	ReadBeceemEEPROM(Adapter, 0x148, (PUINT)&ulReg);
+	ReadBeceemEEPROM(Adapter, 0x148, (unsigned int *)&ulReg);
 	if ((ulReg&0x00FF0000)>>16 > 0x30) {
 		ulReg = (ulReg&0xFF00FFFF)|(0x30<<16);
 		BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x148, 4, TRUE);
diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c
index 9ece84c..8ebb7f3 100644
--- a/drivers/staging/bcm/Misc.c
+++ b/drivers/staging/bcm/Misc.c
@@ -1410,7 +1410,7 @@ static unsigned char *ReadMacAddrEEPROM(PMINI_ADAPTER Adapter, ulong dwAddress)
 	}
 
 	dwAddress |= 0x5b000000;
-	status = wrmalt(Adapter, EEPROM_COMMAND_Q_REG, (PUINT)&dwAddress, sizeof(unsigned int));
+	status = wrmalt(Adapter, EEPROM_COMMAND_Q_REG, (unsigned int *)&dwAddress, sizeof(unsigned int));
 	if (status != STATUS_SUCCESS) {
 		pr_info("wrm Failed..\n");
 		kfree(pucmacaddr);
@@ -1436,7 +1436,7 @@ OUT:
 }
 #endif
 
-static void convertEndian(B_UINT8 rwFlag, PUINT puiBuffer, unsigned int uiByteCount)
+static void convertEndian(B_UINT8 rwFlag, unsigned int *puiBuffer, unsigned int uiByteCount)
 {
 	unsigned int uiIndex = 0;
 
@@ -1467,18 +1467,18 @@ int wrm(PMINI_ADAPTER Adapter, unsigned int uiAddress, char *pucBuff, size_t sSi
 	return iRetVal;
 }
 
-int wrmalt(PMINI_ADAPTER Adapter, unsigned int uiAddress, PUINT pucBuff, size_t size)
+int wrmalt(PMINI_ADAPTER Adapter, unsigned int uiAddress, unsigned int *pucBuff, size_t size)
 {
 	convertEndian(RWM_WRITE, pucBuff, size);
 	return wrm(Adapter, uiAddress, (unsigned char *)pucBuff, size);
 }
 
-int rdmalt(PMINI_ADAPTER Adapter, unsigned int uiAddress, PUINT pucBuff, size_t size)
+int rdmalt(PMINI_ADAPTER Adapter, unsigned int uiAddress, unsigned int *pucBuff, size_t size)
 {
 	int uiRetVal = 0;
 
 	uiRetVal = rdm(Adapter, uiAddress, (unsigned char *)pucBuff, size);
-	convertEndian(RWM_READ, (PUINT)pucBuff, size);
+	convertEndian(RWM_READ, (unsigned int *)pucBuff, size);
 
 	return uiRetVal;
 }
@@ -1502,7 +1502,7 @@ exit:
 	return status;
 }
 
-int wrmaltWithLock(PMINI_ADAPTER Adapter, unsigned int uiAddress, PUINT pucBuff, size_t size)
+int wrmaltWithLock(PMINI_ADAPTER Adapter, unsigned int uiAddress, unsigned int *pucBuff, size_t size)
 {
 	int iRetVal = STATUS_SUCCESS;
 
@@ -1522,7 +1522,7 @@ exit:
 	return iRetVal;
 }
 
-int rdmaltWithLock(PMINI_ADAPTER Adapter, unsigned int uiAddress, PUINT pucBuff, size_t size)
+int rdmaltWithLock(PMINI_ADAPTER Adapter, unsigned int uiAddress, unsigned int *pucBuff, size_t size)
 {
 	int uiRetVal = STATUS_SUCCESS;
 
@@ -1548,7 +1548,7 @@ static void HandleShutDownModeWakeup(PMINI_ADAPTER Adapter)
 	/* target has woken up From Shut Down */
 	bcm_dbg(Adapter, OTHERS, MP_SHUTDOWN, ALL,
 		"Clearing Shut Down Software abort pattern\n");
-	Status = wrmalt(Adapter, SW_ABORT_IDLEMODE_LOC, (PUINT)&clear_abort_pattern, sizeof(clear_abort_pattern));
+	Status = wrmalt(Adapter, SW_ABORT_IDLEMODE_LOC, (unsigned int *)&clear_abort_pattern, sizeof(clear_abort_pattern));
 	if (Status) {
 		bcm_dbg(Adapter, OTHERS, MP_SHUTDOWN, ALL,
 			"WRM to SW_ABORT_IDLEMODE_LOC failed with err:%d\n",
@@ -1777,7 +1777,7 @@ void update_per_sf_desc_cnts(PMINI_ADAPTER Adapter)
 	if (!atomic_read(&Adapter->uiMBupdate))
 		return;
 
-	bytes = rdmaltWithLock(Adapter, TARGET_SFID_TXDESC_MAP_LOC, (PUINT)uibuff, sizeof(unsigned int) * MAX_TARGET_DSX_BUFFERS);
+	bytes = rdmaltWithLock(Adapter, TARGET_SFID_TXDESC_MAP_LOC, (unsigned int *)uibuff, sizeof(unsigned int) * MAX_TARGET_DSX_BUFFERS);
 	if (bytes < 0) {
 		pr_info("rdm failed\n");
 		return;
diff --git a/drivers/staging/bcm/PHSModule.h b/drivers/staging/bcm/PHSModule.h
index 3f63aab..054d36d 100644
--- a/drivers/staging/bcm/PHSModule.h
+++ b/drivers/staging/bcm/PHSModule.h
@@ -6,7 +6,7 @@ int PHSTransmit(PMINI_ADAPTER Adapter,
 		unsigned short Vcid,
 		B_UINT16 uiClassifierRuleID,
 		BOOLEAN bHeaderSuppressionEnabled,
-		PUINT PacketLen,
+		unsigned int *PacketLen,
 		unsigned char bEthCSSupport);
 
 int PHSReceive(PMINI_ADAPTER Adapter,
diff --git a/drivers/staging/bcm/Prototypes.h b/drivers/staging/bcm/Prototypes.h
index be026f0..876430e 100644
--- a/drivers/staging/bcm/Prototypes.h
+++ b/drivers/staging/bcm/Prototypes.h
@@ -5,7 +5,7 @@ void LinkControlResponseMessage(PMINI_ADAPTER Adapter, unsigned char *pucBuffer)
 
 void StatisticsResponse(PMINI_ADAPTER Adapter, void *pvBuffer);
 
-void IdleModeResponse(PMINI_ADAPTER Adapter, PUINT puiBuffer);
+void IdleModeResponse(PMINI_ADAPTER Adapter, unsigned int *puiBuffer);
 
 int control_packet_handler	(PMINI_ADAPTER Adapter);
 
@@ -79,9 +79,9 @@ int rdm(PMINI_ADAPTER Adapter, unsigned int uiAddress, char *pucBuff, size_t siz
 
 int wrm(PMINI_ADAPTER Adapter, unsigned int uiAddress, char *pucBuff, size_t size);
 
-int wrmalt (PMINI_ADAPTER Adapter, unsigned int uiAddress, PUINT pucBuff, size_t sSize);
+int wrmalt (PMINI_ADAPTER Adapter, unsigned int uiAddress, unsigned int *pucBuff, size_t sSize);
 
-int rdmalt (PMINI_ADAPTER Adapter, unsigned int uiAddress, PUINT pucBuff, size_t sSize);
+int rdmalt (PMINI_ADAPTER Adapter, unsigned int uiAddress, unsigned int *pucBuff, size_t sSize);
 
 int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter, unsigned int uiSFId, void __user * user_buffer);
 
@@ -122,7 +122,7 @@ int flushAllAppQ(void);
 
 int BeceemEEPROMBulkRead(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes);
 
@@ -146,13 +146,13 @@ int ReadBeceemEEPROM(PMINI_ADAPTER Adapter, unsigned int dwAddress, unsigned int
 
 int BeceemNVMRead(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes);
 
 int BeceemNVMWrite(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes,
 	BOOLEAN bVerify);
@@ -167,7 +167,7 @@ int BcmGetFlash2xSectionalBitMap(PMINI_ADAPTER Adapter, PFLASH2X_BITMAP psFlash2
 
 int BcmFlash2xBulkWrite(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	FLASH2X_SECTION_VAL eFlashSectionVal,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes,
@@ -175,7 +175,7 @@ int BcmFlash2xBulkWrite(
 
 int BcmFlash2xBulkRead(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	FLASH2X_SECTION_VAL eFlashSectionVal,
 	unsigned int uiOffsetWithinSectionVal,
 	unsigned int uiNumBytes);
@@ -201,10 +201,10 @@ int	BcmCopySection(PMINI_ADAPTER Adapter,
 BOOLEAN IsNonCDLessDevice(PMINI_ADAPTER Adapter);
 
 
-void OverrideServiceFlowParams(PMINI_ADAPTER Adapter, PUINT puiBuffer);
+void OverrideServiceFlowParams(PMINI_ADAPTER Adapter, unsigned int *puiBuffer);
 
-int wrmaltWithLock (PMINI_ADAPTER Adapter, unsigned int uiAddress, PUINT pucBuff, size_t sSize);
-int rdmaltWithLock (PMINI_ADAPTER Adapter, unsigned int uiAddress, PUINT pucBuff, size_t sSize);
+int wrmaltWithLock (PMINI_ADAPTER Adapter, unsigned int uiAddress, unsigned int *pucBuff, size_t sSize);
+int rdmaltWithLock (PMINI_ADAPTER Adapter, unsigned int uiAddress, unsigned int *pucBuff, size_t sSize);
 
 int wrmWithLock(PMINI_ADAPTER Adapter, unsigned int uiAddress, char *pucBuff, size_t size);
 int buffDnldVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength,
diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index 557fd5b..2ad0d06 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -20,7 +20,6 @@ typedef unsigned long DWORD;
 
 typedef long* PLONG;
 
-typedef unsigned int* PUINT;
 typedef unsigned long* PULONG;
 typedef unsigned long long ULONG64;
 typedef unsigned long long LARGE_INTEGER;
diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c
index 7c18b8a1..077099d 100644
--- a/drivers/staging/bcm/led_control.c
+++ b/drivers/staging/bcm/led_control.c
@@ -280,7 +280,7 @@ static int ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, ULONG ulParamOffset,
 	}
 
 	/* Read the DSD data from the parameter offset. */
-	if (STATUS_SUCCESS != BeceemNVMRead(Adapter, (PUINT)puBuffer,
+	if (STATUS_SUCCESS != BeceemNVMRead(Adapter, (unsigned int *)puBuffer,
 					    ulParamOffset, usParamLen)) {
 		bcm_dbg(Adapter, OTHERS, LED_DUMP_INFO, ALL,
 			"LED Thread: ValidateDSDParamsChecksum BeceemNVMRead failed\n");
@@ -298,7 +298,7 @@ static int ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, ULONG ulParamOffset,
 	 * End of the DSD parameter will have a TWO bytes checksum stored in it.
 	 * Read it and compare with the calculated Checksum.
 	 */
-	if (STATUS_SUCCESS != BeceemNVMRead(Adapter, (PUINT)&usChksmOrg,
+	if (STATUS_SUCCESS != BeceemNVMRead(Adapter, (unsigned int *)&usChksmOrg,
 					    ulParamOffset+usParamLen, 2)) {
 		bcm_dbg(Adapter, OTHERS, LED_DUMP_INFO, ALL,
 			"LED Thread: ValidateDSDParamsChecksum BeceemNVMRead failed\n");
@@ -353,7 +353,7 @@ static int ValidateHWParmStructure(PMINI_ADAPTER Adapter, ULONG ulHwParamOffset)
 	ulHwParamOffset += DSD_START_OFFSET;
 
 	/* Read the Length of HW_PARAM structure */
-	BeceemNVMRead(Adapter, (PUINT)&HwParamLen, ulHwParamOffset, 2);
+	BeceemNVMRead(Adapter, (unsigned int *)&HwParamLen, ulHwParamOffset, 2);
 	HwParamLen = ntohs(HwParamLen);
 	if (0 == HwParamLen || HwParamLen > Adapter->uiNVMDSDSize)
 		return STATUS_IMAGE_CHECKSUM_MISMATCH;
@@ -376,7 +376,7 @@ static int ReadLEDInformationFromEEPROM(PMINI_ADAPTER Adapter,
 	unsigned char  ucIndex		= 0;
 	unsigned char  ucGPIOInfo[32]	= {0};
 
-	BeceemNVMRead(Adapter, (PUINT)&usEEPROMVersion,
+	BeceemNVMRead(Adapter, (unsigned int *)&usEEPROMVersion,
 		      EEPROM_VERSION_OFFSET, 2);
 
 	bcm_dbg(Adapter, OTHERS, LED_DUMP_INFO, ALL,
@@ -385,7 +385,7 @@ static int ReadLEDInformationFromEEPROM(PMINI_ADAPTER Adapter,
 
 
 	if (((usEEPROMVersion>>8)&0xFF) < EEPROM_MAP5_MAJORVERSION) {
-		BeceemNVMRead(Adapter, (PUINT)&usHwParamData,
+		BeceemNVMRead(Adapter, (unsigned int *)&usHwParamData,
 			      EEPROM_HW_PARAM_POINTER_ADDRESS, 2);
 		usHwParamData = ntohs(usHwParamData);
 		dwReadValue   = usHwParamData;
@@ -401,7 +401,7 @@ static int ReadLEDInformationFromEEPROM(PMINI_ADAPTER Adapter,
 		if (Status != STATUS_SUCCESS)
 			return Status;
 
-		BeceemNVMRead(Adapter, (PUINT)&dwReadValue,
+		BeceemNVMRead(Adapter, (unsigned int *)&dwReadValue,
 			      EEPROM_HW_PARAM_POINTER_ADDRRES_MAP5, 4);
 		dwReadValue = ntohl(dwReadValue);
 	}
diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index 142c25c..8977dbe 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -28,7 +28,7 @@ static int ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso);
 static int CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal);
 static int CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal);
 static int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, unsigned char *pBuff, unsigned int uiSectAlignAddr);
-static int WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, PUINT pBuff,
+static int WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, unsigned int *pBuff,
 					  FLASH2X_SECTION_VAL eFlash2xSectionVal,
 					  unsigned int uiOffset, unsigned int uiNumBytes);
 static FLASH2X_SECTION_VAL getHighestPriDSD(PMINI_ADAPTER Adapter);
@@ -36,13 +36,13 @@ static FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter);
 
 static int BeceemFlashBulkRead(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes);
 
 static int BeceemFlashBulkWrite(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes,
 	BOOLEAN bVerify);
@@ -260,12 +260,12 @@ int ReadBeceemEEPROM( PMINI_ADAPTER Adapter,
 	uiTempOffset = uiOffset - (uiOffset % MAX_RW_SIZE);
 	uiByteOffset = uiOffset - uiTempOffset;
 
-	ReadBeceemEEPROMBulk(Adapter, uiTempOffset, (PUINT)&uiData[0], 4);
+	ReadBeceemEEPROMBulk(Adapter, uiTempOffset, (unsigned int *)&uiData[0], 4);
 
 	/* A word can overlap at most over 2 pages. In that case we read the
 	 * next page too. */
 	if ( uiByteOffset > 12 ) {
-		ReadBeceemEEPROMBulk(Adapter, uiTempOffset + MAX_RW_SIZE, (PUINT)&uiData[4], 4);
+		ReadBeceemEEPROMBulk(Adapter, uiTempOffset + MAX_RW_SIZE, (unsigned int *)&uiData[4], 4);
 	}
 
 	memcpy( (unsigned char *) pBuffer, ( ((unsigned char *)&uiData[0]) + uiByteOffset ), 4);
@@ -281,7 +281,7 @@ int ReadMacAddressFromNVM(PMINI_ADAPTER Adapter)
 	unsigned char puMacAddr[6];
 
 	Status = BeceemNVMRead(Adapter,
-			       (PUINT)&puMacAddr[0],
+			       (unsigned int *)&puMacAddr[0],
 			       INIT_PARAMS_1_MACADDRESS_ADDRESS,
 			       MAC_ADDRESS_SIZE);
 
@@ -309,7 +309,7 @@ int ReadMacAddressFromNVM(PMINI_ADAPTER Adapter)
 
 int BeceemEEPROMBulkRead(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes)
 {
@@ -326,7 +326,7 @@ int BeceemEEPROMBulkRead(
 	if (uiOffset%MAX_RW_SIZE&& uiBytesRemaining) {
 		uiTempOffset = uiOffset - (uiOffset%MAX_RW_SIZE);
 		uiExtraBytes = uiOffset-uiTempOffset;
-		ReadBeceemEEPROMBulk(Adapter, uiTempOffset, (PUINT)&uiData[0], 4);
+		ReadBeceemEEPROMBulk(Adapter, uiTempOffset, (unsigned int *)&uiData[0], 4);
 		if (uiBytesRemaining >= (MAX_RW_SIZE - uiExtraBytes)) {
 			memcpy(pBuffer, (((unsigned char *)&uiData[0])+uiExtraBytes), MAX_RW_SIZE - uiExtraBytes);
 
@@ -408,7 +408,7 @@ int BeceemEEPROMBulkRead(
 
 static int BeceemFlashBulkRead(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes)
 {
@@ -992,7 +992,7 @@ static ULONG BcmFlashUnProtectBlock(PMINI_ADAPTER Adapter, unsigned int uiOffset
 		//
 		// Read status will be WWXXYYZZ. We have to take only WW.
 		//
-		rdmalt(Adapter, FLASH_SPI_READQ_REG, (PUINT)&ulStatus, sizeof(ulStatus));
+		rdmalt(Adapter, FLASH_SPI_READQ_REG, (unsigned int *)&ulStatus, sizeof(ulStatus));
 		ulStatus >>= 24;
 		ulWriteStatus = ulStatus;
 
@@ -1071,7 +1071,7 @@ static ULONG BcmFlashUnProtectBlock(PMINI_ADAPTER Adapter, unsigned int uiOffset
 
 static int BeceemFlashBulkWrite(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes,
 	BOOLEAN bVerify)
@@ -1150,7 +1150,7 @@ static int BeceemFlashBulkWrite(
 		BcmDoChipSelect(Adapter, uiSectAlignAddr);
 
 		if (0 != BeceemFlashBulkRead(Adapter,
-					    (PUINT)pTempBuff,
+					    (unsigned int *)pTempBuff,
 					    uiOffsetFromSectStart,
 					    Adapter->uiSectorSize)) {
 			Status = -1;
@@ -1205,7 +1205,7 @@ static int BeceemFlashBulkWrite(
 		  (te.tv_sec *1000 + te.tv_usec/1000));
 		*/
 		for (uiIndex = 0; uiIndex < Adapter->uiSectorSize; uiIndex += MAX_RW_SIZE) {
-			if (STATUS_SUCCESS == BeceemFlashBulkRead(Adapter, (PUINT)ucReadBk, uiOffsetFromSectStart+uiIndex, MAX_RW_SIZE)) {
+			if (STATUS_SUCCESS == BeceemFlashBulkRead(Adapter, (unsigned int *)ucReadBk, uiOffsetFromSectStart+uiIndex, MAX_RW_SIZE)) {
 				if (Adapter->ulFlashWriteSize == 1) {
 					unsigned int uiReadIndex = 0;
 					for (uiReadIndex = 0; uiReadIndex < 16; uiReadIndex++) {
@@ -1285,7 +1285,7 @@ BeceemFlashBulkWrite_EXIT:
 
 static int BeceemFlashBulkWriteStatus(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes,
 	BOOLEAN bVerify)
@@ -1354,7 +1354,7 @@ static int BeceemFlashBulkWriteStatus(
 
 		BcmDoChipSelect(Adapter, uiSectAlignAddr);
 		if (0 != BeceemFlashBulkRead(Adapter,
-					    (PUINT)pTempBuff,
+					    (unsigned int *)pTempBuff,
 					    uiOffsetFromSectStart,
 					    Adapter->uiSectorSize)) {
 			Status = -1;
@@ -1395,7 +1395,7 @@ static int BeceemFlashBulkWriteStatus(
 		if (bVerify) {
 			for (uiIndex = 0; uiIndex < Adapter->uiSectorSize; uiIndex += MAX_RW_SIZE) {
 
-				if (STATUS_SUCCESS == BeceemFlashBulkRead(Adapter, (PUINT)ucReadBk, uiOffsetFromSectStart+uiIndex, MAX_RW_SIZE)) {
+				if (STATUS_SUCCESS == BeceemFlashBulkRead(Adapter, (unsigned int *)ucReadBk, uiOffsetFromSectStart+uiIndex, MAX_RW_SIZE)) {
 					if (memcmp(ucReadBk,&pTempBuff[uiIndex], MAX_RW_SIZE)) {
 						Status = STATUS_FAILURE;
 						goto BeceemFlashBulkWriteStatus_EXIT;
@@ -1474,7 +1474,7 @@ int PropagateCalParamsFromEEPROMToMemory(PMINI_ADAPTER Adapter)
 	uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
 
 	while (uiBytesToCopy) {
-		if (0 != BeceemEEPROMBulkRead(Adapter, (PUINT)pBuff, uiCalStartAddr, uiBytesToCopy)) {
+		if (0 != BeceemEEPROMBulkRead(Adapter, (unsigned int *)pBuff, uiCalStartAddr, uiBytesToCopy)) {
 			Status = -1;
 			break;
 		}
@@ -1545,7 +1545,7 @@ int PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter)
 	if ( pBuff == NULL )
 		return -1;
 
-	if (0 != BeceemNVMRead(Adapter, (PUINT)pBuff, uiCalStartAddr, uiEepromSize)) {
+	if (0 != BeceemNVMRead(Adapter, (unsigned int *)pBuff, uiCalStartAddr, uiEepromSize)) {
 		kfree(pBuff);
 		return -1;
 	}
@@ -1589,7 +1589,7 @@ int PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter)
 
 static int BeceemEEPROMReadBackandVerify(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes)
 {
@@ -1825,7 +1825,7 @@ int BeceemEEPROMBulkWrite(
 	unsigned int uiIndex = 0;
 	unsigned int uiTempOffset = 0;
 	unsigned int uiExtraBytes = 0;
-	//PUINT puiBuffer	= (PUINT)pBuffer;
+	//unsigned int *puiBuffer = (unsigned int *)pBuffer;
 	//int value;
 
 	if (uiOffset%MAX_RW_SIZE && uiBytesToCopy) {
@@ -1865,7 +1865,7 @@ int BeceemEEPROMBulkWrite(
 
 		if (uiBytesToCopy >= MAX_RW_SIZE) {
 
-			if (STATUS_FAILURE == BeceemEEPROMWritePage( Adapter, (PUINT) &pBuffer[uiIndex], uiOffset ) )
+			if (STATUS_FAILURE == BeceemEEPROMWritePage( Adapter, (unsigned int *) &pBuffer[uiIndex], uiOffset ) )
 				return STATUS_FAILURE;
 
 			uiIndex += MAX_RW_SIZE;
@@ -1907,7 +1907,7 @@ int BeceemEEPROMBulkWrite(
 
 int BeceemNVMRead(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes)
 {
@@ -1964,7 +1964,7 @@ int BeceemNVMRead(
 
 int BeceemNVMWrite(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes,
 	BOOLEAN bVerify)
@@ -2053,7 +2053,7 @@ int BeceemNVMWrite(
 					       uiNumBytes,
 					       bVerify);
 		if (bVerify) {
-			Status = BeceemEEPROMReadBackandVerify(Adapter, (PUINT)pBuffer, uiOffset, uiNumBytes);
+			Status = BeceemEEPROMReadBackandVerify(Adapter, (unsigned int *)pBuffer, uiOffset, uiNumBytes);
 		}
 	} else {
 		Status = -1;
@@ -2095,7 +2095,7 @@ int BcmUpdateSectorSize(PMINI_ADAPTER Adapter, unsigned int uiSectorSize)
 //
 // Before updating the sector size in the reserved area, check if already present.
 //
-	BeceemFlashBulkRead(Adapter, (PUINT)&sFlashCsInfo, Adapter->ulFlashControlSectionStart, sizeof(sFlashCsInfo));
+	BeceemFlashBulkRead(Adapter, (unsigned int *)&sFlashCsInfo, Adapter->ulFlashControlSectionStart, sizeof(sFlashCsInfo));
 	uiSectorSig = ntohl(sFlashCsInfo.FlashSectorSizeSig);
 	uiCurrentSectorSize = ntohl(sFlashCsInfo.FlashSectorSize);
 
@@ -2117,7 +2117,7 @@ int BcmUpdateSectorSize(PMINI_ADAPTER Adapter, unsigned int uiSectorSize)
 		sFlashCsInfo.FlashSectorSizeSig = htonl(FLASH_SECTOR_SIZE_SIG);
 
 		Status = BeceemFlashBulkWrite(Adapter,
-					      (PUINT)&sFlashCsInfo,
+					      (unsigned int *)&sFlashCsInfo,
 					      Adapter->ulFlashControlSectionStart,
 					      sizeof(sFlashCsInfo),
 					      TRUE);
@@ -2334,7 +2334,7 @@ static ULONG BcmReadFlashRDID(PMINI_ADAPTER Adapter)
 // Read SPI READQ REG. The output will be WWXXYYZZ.
 // The ID is 3Bytes long and is WWXXYY. ZZ needs to be Ignored.
 //
-	rdmalt(Adapter, FLASH_SPI_READQ_REG, (PUINT)&ulRDID, sizeof(ulRDID));
+	rdmalt(Adapter, FLASH_SPI_READQ_REG, (unsigned int *)&ulRDID, sizeof(ulRDID));
 
 	return (ulRDID >>8);
 
@@ -2734,7 +2734,7 @@ static int BcmGetFlashCSInfo(PMINI_ADAPTER Adapter)
 
 	// Reading first 8 Bytes to get the Flash Layout
 	// MagicNumber(4 bytes) +FlashLayoutMinorVersion(2 Bytes) +FlashLayoutMajorVersion(2 Bytes)
-	BeceemFlashBulkRead(Adapter, (PUINT)Adapter->psFlashCSInfo, Adapter->ulFlashControlSectionStart, 8);
+	BeceemFlashBulkRead(Adapter, (unsigned int *)Adapter->psFlashCSInfo, Adapter->ulFlashControlSectionStart, 8);
 
 	Adapter->psFlashCSInfo->FlashLayoutVersion =  ntohl(Adapter->psFlashCSInfo->FlashLayoutVersion);
 	bcm_dbg(Adapter, OTHERS, NVM_RW, ALL, "Flash Layout Version :%X\n",
@@ -2755,7 +2755,7 @@ static int BcmGetFlashCSInfo(PMINI_ADAPTER Adapter)
 		"FLASH LAYOUT MAJOR VERSION :%X\n", uiFlashLayoutMajorVersion);
 
 	if (uiFlashLayoutMajorVersion < FLASH_2X_MAJOR_NUMBER) {
-		BeceemFlashBulkRead(Adapter, (PUINT)Adapter->psFlashCSInfo, Adapter->ulFlashControlSectionStart, sizeof(FLASH_CS_INFO));
+		BeceemFlashBulkRead(Adapter, (unsigned int *)Adapter->psFlashCSInfo, Adapter->ulFlashControlSectionStart, sizeof(FLASH_CS_INFO));
 		ConvertEndianOfCSStructure(Adapter->psFlashCSInfo);
 		Adapter->ulFlashCalStart = (Adapter->psFlashCSInfo->OffsetFromZeroForCalibrationStart);
 
@@ -2784,7 +2784,7 @@ static int BcmGetFlashCSInfo(PMINI_ADAPTER Adapter)
 
 
 	} else {
-		if (BcmFlash2xBulkRead(Adapter, (PUINT)Adapter->psFlash2xCSInfo, NO_SECTION_VAL,
+		if (BcmFlash2xBulkRead(Adapter, (unsigned int *)Adapter->psFlash2xCSInfo, NO_SECTION_VAL,
 				      Adapter->ulFlashControlSectionStart, sizeof(FLASH2X_CS_INFO))) {
 			pr_info("Unable to read CS structure\n");
 			return STATUS_FAILURE;
@@ -3063,7 +3063,7 @@ int BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2
 
 int BcmFlash2xBulkRead(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	FLASH2X_SECTION_VAL eFlash2xSectionVal,
 	unsigned int uiOffsetWithinSectionVal,
 	unsigned int uiNumBytes)
@@ -3129,7 +3129,7 @@ int BcmFlash2xBulkRead(
 
 int BcmFlash2xBulkWrite(
 	PMINI_ADAPTER Adapter,
-	PUINT pBuffer,
+	unsigned int *pBuffer,
 	FLASH2X_SECTION_VAL eFlash2xSectVal,
 	unsigned int uiOffset,
 	unsigned int uiNumBytes,
@@ -3915,7 +3915,7 @@ int BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut)
 			}
 
 			Status = BcmFlash2xBulkRead(Adapter,
-						    (PUINT)Buff,
+						    (unsigned int *)Buff,
 						    eISOReadPart,
 						    uiReadOffsetWithinPart,
 						    Adapter->uiSectorSize
@@ -3937,7 +3937,7 @@ int BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut)
 			Adapter->bHeaderChangeAllowed = TRUE ;
 
 			Status = BcmFlash2xBulkWrite(Adapter,
-						     (PUINT)Buff,
+						     (unsigned int *)Buff,
 						     eISOWritePart,
 						     uiWriteOffsetWithinPart,
 						     Adapter->uiSectorSize,
@@ -4035,7 +4035,7 @@ int BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut)
 			}
 
 			Status = BcmFlash2xBulkRead(Adapter,
-						    (PUINT)Buff,
+						    (unsigned int *)Buff,
 						    eISOReadPart,
 						    uiReadOffsetWithinPart,
 						    Adapter->uiSectorSize
@@ -4056,7 +4056,7 @@ int BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut)
 			}
 			Adapter->bHeaderChangeAllowed = TRUE ;
 			Status = BcmFlash2xBulkWrite(Adapter,
-						     (PUINT)Buff,
+						     (unsigned int *)Buff,
 						     eISOWritePart,
 						     uiWriteOffsetWithinPart,
 						     Adapter->uiSectorSize,
@@ -4395,13 +4395,13 @@ int	BcmCopySection(PMINI_ADAPTER Adapter,
 
 	do
 	{
-		Status = BcmFlash2xBulkRead(Adapter, (PUINT)pBuff, SrcSection , offset, BytesToBeCopied);
+		Status = BcmFlash2xBulkRead(Adapter, (unsigned int *)pBuff, SrcSection , offset, BytesToBeCopied);
 		if (Status) {
 			pr_info("Read failed at offset :%d for NOB :%d\n",
 				SrcSection, BytesToBeCopied);
 			break;
 		}
-		Status = BcmFlash2xBulkWrite(Adapter, (PUINT)pBuff, DstSection, offset, BytesToBeCopied, FALSE);
+		Status = BcmFlash2xBulkWrite(Adapter, (unsigned int *)pBuff, DstSection, offset, BytesToBeCopied, FALSE);
 		if (Status) {
 			pr_info("Write failed at offset :%d for NOB :%d\n",
 				DstSection, BytesToBeCopied);
@@ -4469,7 +4469,7 @@ int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, unsigned char *pBuff, unsigned in
 			return -ENOMEM;
 		}
 		//Read header
-		BeceemFlashBulkRead(Adapter, (PUINT)pTempBuff, (uiSectAlignAddr + offsetToProtect), HeaderSizeToProtect);
+		BeceemFlashBulkRead(Adapter, (unsigned int *)pTempBuff, (uiSectAlignAddr + offsetToProtect), HeaderSizeToProtect);
 		BCM_DEBUG_PRINT_BUFFER(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, pTempBuff , HeaderSizeToProtect);
 		//Replace Buffer content with Header
 		memcpy(pBuff +offsetToProtect, pTempBuff, HeaderSizeToProtect);
@@ -4477,7 +4477,7 @@ int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, unsigned char *pBuff, unsigned in
 		kfree(pTempBuff);
 	}
 	if (bHasHeader && Adapter->bSigCorrupted) {
-		sig = *((PUINT)(pBuff + offsetToProtect + FIELD_OFFSET_IN_HEADER(PDSD_HEADER, DSDImageMagicNumber)));
+		sig = *((unsigned int *)(pBuff + offsetToProtect + FIELD_OFFSET_IN_HEADER(PDSD_HEADER, DSDImageMagicNumber)));
 		sig = ntohl(sig);
 		if ((sig & 0xFF000000) != CORRUPTED_PATTERN) {
 			bcm_dbg(Adapter, OTHERS, NVM_RW, ALL,
@@ -4487,7 +4487,7 @@ int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, unsigned char *pBuff, unsigned in
 		}
 		bcm_dbg(Adapter, OTHERS, NVM_RW, ALL,
 			"Corrupted sig is :%X\n", sig);
-		*((PUINT)(pBuff + offsetToProtect + FIELD_OFFSET_IN_HEADER(PDSD_HEADER, DSDImageMagicNumber)))= htonl(DSD_IMAGE_MAGIC_NUMBER);
+		*((unsigned int *)(pBuff + offsetToProtect + FIELD_OFFSET_IN_HEADER(PDSD_HEADER, DSDImageMagicNumber)))= htonl(DSD_IMAGE_MAGIC_NUMBER);
 		bcm_dbg(Adapter, OTHERS, NVM_RW, ALL,
 			"Restoring the signature in Header Write only\n");
 		Adapter->bSigCorrupted = FALSE;
@@ -4725,7 +4725,7 @@ FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter)
 	return	HighestPriISO ;
 }
 int WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter,
-				   PUINT pBuff,
+				   unsigned int *pBuff,
 				   FLASH2X_SECTION_VAL eFlash2xSectionVal,
 				   unsigned int uiOffset,
 				   unsigned int uiNumBytes
@@ -4889,10 +4889,10 @@ static int CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect
 	uiOffset = Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader + sizeof(DSD_HEADER);
 	uiOffset -= MAX_RW_SIZE ;
 
-	BcmFlash2xBulkRead(Adapter, (PUINT)pBuff, eFlash2xSectionVal, uiOffset, MAX_RW_SIZE);
+	BcmFlash2xBulkRead(Adapter, (unsigned int *)pBuff, eFlash2xSectionVal, uiOffset, MAX_RW_SIZE);
 
 
-	sig = *((PUINT)(pBuff +12));
+	sig = *((unsigned int *)(pBuff + 12));
 	sig =ntohl(sig);
 	BCM_DEBUG_PRINT_BUFFER(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, pBuff, MAX_RW_SIZE);
 	//Now corrupting the sig by corrupting 4th last Byte.
@@ -4904,14 +4904,14 @@ static int CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect
 			uiSectAlignAddr = uiOffset & ~(Adapter->uiSectorSize -1);
 			BlockStatus = BcmFlashUnProtectBlock(Adapter, uiSectAlignAddr, Adapter->uiSectorSize);
 
-			WriteToFlashWithoutSectorErase(Adapter, (PUINT)(pBuff + 12), eFlash2xSectionVal,
+			WriteToFlashWithoutSectorErase(Adapter, (unsigned int *)(pBuff + 12), eFlash2xSectionVal,
 						       (uiOffset + 12), BYTE_WRITE_SUPPORT);
 			if (BlockStatus) {
 				BcmRestoreBlockProtectStatus(Adapter, BlockStatus);
 				BlockStatus = 0;
 			}
 		} else {
-			WriteToFlashWithoutSectorErase(Adapter, (PUINT)pBuff, eFlash2xSectionVal,
+			WriteToFlashWithoutSectorErase(Adapter, (unsigned int *)pBuff, eFlash2xSectionVal,
 						       uiOffset , MAX_RW_SIZE);
 		}
 	} else {
@@ -4947,9 +4947,9 @@ static int CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect
 
 	uiOffset = 0;
 
-	BcmFlash2xBulkRead(Adapter, (PUINT)pBuff, eFlash2xSectionVal, uiOffset, MAX_RW_SIZE);
+	BcmFlash2xBulkRead(Adapter, (unsigned int *)pBuff, eFlash2xSectionVal, uiOffset, MAX_RW_SIZE);
 
-	sig = *((PUINT)pBuff);
+	sig = *((unsigned int *)pBuff);
 	sig =ntohl(sig);
 
 	//corrupt signature
@@ -4957,7 +4957,7 @@ static int CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect
 
 	if (sig == ISO_IMAGE_MAGIC_NUMBER) {
 		Adapter->bSigCorrupted = TRUE;
-		WriteToFlashWithoutSectorErase(Adapter, (PUINT)pBuff, eFlash2xSectionVal,
+		WriteToFlashWithoutSectorErase(Adapter, (unsigned int *)pBuff, eFlash2xSectionVal,
 					       uiOffset , Adapter->ulFlashWriteSize);
 	} else {
 		pr_info("BCM Signature is not present in header\n");
-- 
1.7.8.111.gad25c.dirty

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux