[PATCH 09/34] staging: bcm: Convert typedef PUSHORT to unsigned short *

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

 



Use the normal types.
Some of these should probably be __be16 * or __le16 *.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
 drivers/staging/bcm/CmHost.c              |    8 ++++----
 drivers/staging/bcm/HandleControlPacket.c |    4 ++--
 drivers/staging/bcm/IPv6Protocol.c        |    4 ++--
 drivers/staging/bcm/InterfaceRx.c         |    2 +-
 drivers/staging/bcm/Typedefs.h            |    1 -
 5 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 62fac98..4743a45 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -294,9 +294,9 @@ static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter, stConvergenceSL
 		if (	MAX_PORT_RANGE >= psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength) {
 			for (ucLoopIndex = 0; ucLoopIndex < (pstClassifierEntry->ucDestPortRangeLength); ucLoopIndex++) {
 				pstClassifierEntry->usDestPortRangeLo[ucLoopIndex] =
-					*((PUSHORT)(psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange+ucLoopIndex));
+					*((unsigned short *)(psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange+ucLoopIndex));
 				pstClassifierEntry->usDestPortRangeHi[ucLoopIndex] =
-					*((PUSHORT)(psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange+2+ucLoopIndex));
+					*((unsigned short *)(psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange+2+ucLoopIndex));
 				pstClassifierEntry->usDestPortRangeLo[ucLoopIndex]=ntohs(pstClassifierEntry->usDestPortRangeLo[ucLoopIndex]);
 				bcm_dbg(Adapter, OTHERS, CONN_MSG, ALL,
 					"Destination Port Range Lo:0x%X\n",
@@ -320,10 +320,10 @@ static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter, stConvergenceSL
 				     pstClassifierEntry->ucSrcPortRangeLength;
 			     ucLoopIndex++) {
 				pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex] =
-					*((PUSHORT)(psfCSType->cCPacketClassificationRule.
+					*((unsigned short *)(psfCSType->cCPacketClassificationRule.
 						    u8ProtocolSourcePortRange+ucLoopIndex));
 				pstClassifierEntry->usSrcPortRangeHi[ucLoopIndex] =
-					*((PUSHORT)(psfCSType->cCPacketClassificationRule.
+					*((unsigned short *)(psfCSType->cCPacketClassificationRule.
 						    u8ProtocolSourcePortRange+2+ucLoopIndex));
 				pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex] =
 					ntohs(pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex]);
diff --git a/drivers/staging/bcm/HandleControlPacket.c b/drivers/staging/bcm/HandleControlPacket.c
index 5bb0093..583d081 100644
--- a/drivers/staging/bcm/HandleControlPacket.c
+++ b/drivers/staging/bcm/HandleControlPacket.c
@@ -18,7 +18,7 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
 	struct sk_buff *newPacket = NULL;
 	CHAR cntrl_msg_mask_bit = 0;
 	BOOLEAN drop_pkt_flag = TRUE;
-	unsigned short usStatus = *(PUSHORT)(skb->data);
+	unsigned short usStatus = *(unsigned short *)(skb->data);
 
 	if (netif_msg_pktdata(Adapter))
 		print_hex_dump(KERN_DEBUG, PFX "rx control: ", DUMP_PREFIX_NONE,
@@ -104,7 +104,7 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
 			 *    the sum of all types of dropped pkt by that
 			 *    tarang only.
 			 */
-			switch (*(PUSHORT)skb->data) {
+			switch (*(unsigned short *)skb->data) {
 			case CM_RESPONSES:
 				pTarang->stDroppedAppCntrlMsgs.cm_responses++;
 				break;
diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c
index 459108e..586b0f9 100644
--- a/drivers/staging/bcm/IPv6Protocol.c
+++ b/drivers/staging/bcm/IPv6Protocol.c
@@ -142,8 +142,8 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, unsigned short *pusSrcPort,
 		pucNextHeader = GetNextIPV6ChainedHeader(&pIpv6HdrScanContext,&ucHeaderType,&bDone,&usPayloadLength);
 		if (bDone) {
 			if ((ucHeaderType==TCP_HEADER_TYPE) || (ucHeaderType == UDP_HEADER_TYPE)) {
-				*pusSrcPort=*((PUSHORT)(pucNextHeader));
-				*pusDestPort=*((PUSHORT)(pucNextHeader+2));
+				*pusSrcPort = *((unsigned short *)(pucNextHeader));
+				*pusDestPort = *((unsigned short *)(pucNextHeader+2));
 				bcm_dbg(Adapter, TX, IPV6_DBG, ALL,
 					"Protocol Ports - Src Port :0x%x Dest Port : 0x%x\n",
 					ntohs(*pusSrcPort),
diff --git a/drivers/staging/bcm/InterfaceRx.c b/drivers/staging/bcm/InterfaceRx.c
index 670541f..537b4b1 100644
--- a/drivers/staging/bcm/InterfaceRx.c
+++ b/drivers/staging/bcm/InterfaceRx.c
@@ -120,7 +120,7 @@ static void read_bulk_callback(struct urb *urb)
 	   (!(pLeader->Status >= 0x20  &&  pLeader->Status <= 0x3F))) {
 		bcm_dbg(psIntfAdapter->psAdapter, RX, RX_CTRL, ALL,
 			"Received control pkt...\n");
-		*(PUSHORT)skb->data = pLeader->Status;
+		*(unsigned short *)skb->data = pLeader->Status;
 		memcpy(skb->data + sizeof(unsigned short), urb->transfer_buffer +
 		       (sizeof(LEADER)), pLeader->PLength);
 		skb->len = pLeader->PLength + sizeof(unsigned short);
diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index d92b9b2..4ca3269 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -31,7 +31,6 @@ typedef long* PLONG;
 typedef void* PVOID;
 
 typedef unsigned char* PUCHAR;
-typedef unsigned short* PUSHORT;
 typedef unsigned int* PUINT;
 typedef unsigned long* PULONG;
 typedef unsigned long long ULONG64;
-- 
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