提交 44a5b3d5 编写于 作者: T Thomas Klein 提交者: Jeff Garzik

ehea: Eliminated some compiler warnings

Fixed wrongly casted pointers
Signed-off-by: NThomas Klein <tklein@de.ibm.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 35cf2e2e
...@@ -1326,7 +1326,6 @@ static void write_swqe2_TSO(struct sk_buff *skb, ...@@ -1326,7 +1326,6 @@ static void write_swqe2_TSO(struct sk_buff *skb,
u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0]; u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0];
int skb_data_size = skb->len - skb->data_len; int skb_data_size = skb->len - skb->data_len;
int headersize; int headersize;
u64 tmp_addr;
/* Packet is TCP with TSO enabled */ /* Packet is TCP with TSO enabled */
swqe->tx_control |= EHEA_SWQE_TSO; swqe->tx_control |= EHEA_SWQE_TSO;
...@@ -1347,9 +1346,8 @@ static void write_swqe2_TSO(struct sk_buff *skb, ...@@ -1347,9 +1346,8 @@ static void write_swqe2_TSO(struct sk_buff *skb,
/* set sg1entry data */ /* set sg1entry data */
sg1entry->l_key = lkey; sg1entry->l_key = lkey;
sg1entry->len = skb_data_size - headersize; sg1entry->len = skb_data_size - headersize;
sg1entry->vaddr =
tmp_addr = (u64)(skb->data + headersize); ehea_map_vaddr(skb->data + headersize);
sg1entry->vaddr = ehea_map_vaddr(tmp_addr);
swqe->descriptors++; swqe->descriptors++;
} }
} else } else
...@@ -1362,7 +1360,6 @@ static void write_swqe2_nonTSO(struct sk_buff *skb, ...@@ -1362,7 +1360,6 @@ static void write_swqe2_nonTSO(struct sk_buff *skb,
int skb_data_size = skb->len - skb->data_len; int skb_data_size = skb->len - skb->data_len;
u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0]; u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0];
struct ehea_vsgentry *sg1entry = &swqe->u.immdata_desc.sg_entry; struct ehea_vsgentry *sg1entry = &swqe->u.immdata_desc.sg_entry;
u64 tmp_addr;
/* Packet is any nonTSO type /* Packet is any nonTSO type
* *
...@@ -1379,8 +1376,8 @@ static void write_swqe2_nonTSO(struct sk_buff *skb, ...@@ -1379,8 +1376,8 @@ static void write_swqe2_nonTSO(struct sk_buff *skb,
/* copy sg1entry data */ /* copy sg1entry data */
sg1entry->l_key = lkey; sg1entry->l_key = lkey;
sg1entry->len = skb_data_size - SWQE2_MAX_IMM; sg1entry->len = skb_data_size - SWQE2_MAX_IMM;
tmp_addr = (u64)(skb->data + SWQE2_MAX_IMM); sg1entry->vaddr =
sg1entry->vaddr = ehea_map_vaddr(tmp_addr); ehea_map_vaddr(skb->data + SWQE2_MAX_IMM);
swqe->descriptors++; swqe->descriptors++;
} }
} else { } else {
...@@ -1395,7 +1392,6 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev, ...@@ -1395,7 +1392,6 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,
struct ehea_vsgentry *sg_list, *sg1entry, *sgentry; struct ehea_vsgentry *sg_list, *sg1entry, *sgentry;
skb_frag_t *frag; skb_frag_t *frag;
int nfrags, sg1entry_contains_frag_data, i; int nfrags, sg1entry_contains_frag_data, i;
u64 tmp_addr;
nfrags = skb_shinfo(skb)->nr_frags; nfrags = skb_shinfo(skb)->nr_frags;
sg1entry = &swqe->u.immdata_desc.sg_entry; sg1entry = &swqe->u.immdata_desc.sg_entry;
...@@ -1417,9 +1413,9 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev, ...@@ -1417,9 +1413,9 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,
/* copy sg1entry data */ /* copy sg1entry data */
sg1entry->l_key = lkey; sg1entry->l_key = lkey;
sg1entry->len = frag->size; sg1entry->len = frag->size;
tmp_addr = (u64)(page_address(frag->page) sg1entry->vaddr =
+ frag->page_offset); ehea_map_vaddr(page_address(frag->page)
sg1entry->vaddr = ehea_map_vaddr(tmp_addr); + frag->page_offset);
swqe->descriptors++; swqe->descriptors++;
sg1entry_contains_frag_data = 1; sg1entry_contains_frag_data = 1;
} }
...@@ -1431,10 +1427,9 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev, ...@@ -1431,10 +1427,9 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,
sgentry->l_key = lkey; sgentry->l_key = lkey;
sgentry->len = frag->size; sgentry->len = frag->size;
sgentry->vaddr =
tmp_addr = (u64)(page_address(frag->page) ehea_map_vaddr(page_address(frag->page)
+ frag->page_offset); + frag->page_offset);
sgentry->vaddr = ehea_map_vaddr(tmp_addr);
swqe->descriptors++; swqe->descriptors++;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册