]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: vt6655: struct tagDEVICE_TD_INFO resize dwReqCount.
authorMalcolm Priestley <tvboxspy@gmail.com>
Fri, 14 Aug 2015 21:58:48 +0000 (22:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 02:31:10 +0000 (19:31 -0700)
dwReqCount is no bigger than u16

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/desc.h
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/rxtx.c

index 6efe825f77101b0d96322a539fa306adf4fea7da..ab52c56232354724a020c2f4a915f09db204f565 100644 (file)
@@ -245,7 +245,7 @@ typedef struct tagDEVICE_TD_INFO {
        struct sk_buff *skb;
        unsigned char *buf;
        dma_addr_t          buf_dma;
-       unsigned long dwReqCount;
+       u16 dwReqCount;
        unsigned long dwHeaderLength;
        unsigned char byFlags;
 } DEVICE_TD_INFO,    *PDEVICE_TD_INFO;
index 947e8685db552facc7f3442923a98de6cf18b3f5..c3b7bd40dc068aed56956df84b47d20bd414a587 100644 (file)
@@ -1193,7 +1193,7 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
 
        /* Set TSR1 & ReqCount in TxDescHead */
        head_td->td1.tcr |= (TCR_STP | TCR_EDP | EDMSDU);
-       head_td->td1.req_count = cpu_to_le16((u16)head_td->pTDInfo->dwReqCount);
+       head_td->td1.req_count = cpu_to_le16(head_td->pTDInfo->dwReqCount);
 
        head_td->buff_addr = cpu_to_le32(head_td->pTDInfo->buf_dma);
 
index 380b879c05db4b5d27911969a2060e748570ffab..f3f6b15b7251e7c8fd9c5ca2fd7788e5e0d776ba 100644 (file)
@@ -1200,7 +1200,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 
        ptdCurr = (PSTxDesc)pHeadTD;
 
-       ptdCurr->pTDInfo->dwReqCount = cbReqCount;
+       ptdCurr->pTDInfo->dwReqCount = (u16)cbReqCount;
        ptdCurr->pTDInfo->dwHeaderLength = cbHeaderLength;
 
        return cbHeaderLength;