aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_main.c
diff options
context:
space:
mode:
authorThomas Klein <osstklei@de.ibm.com>2007-08-06 07:55:44 -0400
committerJeff Garzik <jeff@garzik.org>2007-08-07 17:34:13 -0400
commit44a5b3d539893988dc6b63054c59d031df1fd7bc (patch)
treef884e1bffa9fa101926d34f687ac6fc9600a66cc /drivers/net/ehea/ehea_main.c
parent35cf2e2e3b96c070a615d699bf514ffec6afd19e (diff)
ehea: Eliminated some compiler warnings
Fixed wrongly casted pointers Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r--drivers/net/ehea/ehea_main.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 36ca32275b45..9756211e83ce 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1326,7 +1326,6 @@ static void write_swqe2_TSO(struct sk_buff *skb,
1326 u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0]; 1326 u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0];
1327 int skb_data_size = skb->len - skb->data_len; 1327 int skb_data_size = skb->len - skb->data_len;
1328 int headersize; 1328 int headersize;
1329 u64 tmp_addr;
1330 1329
1331 /* Packet is TCP with TSO enabled */ 1330 /* Packet is TCP with TSO enabled */
1332 swqe->tx_control |= EHEA_SWQE_TSO; 1331 swqe->tx_control |= EHEA_SWQE_TSO;
@@ -1347,9 +1346,8 @@ static void write_swqe2_TSO(struct sk_buff *skb,
1347 /* set sg1entry data */ 1346 /* set sg1entry data */
1348 sg1entry->l_key = lkey; 1347 sg1entry->l_key = lkey;
1349 sg1entry->len = skb_data_size - headersize; 1348 sg1entry->len = skb_data_size - headersize;
1350 1349 sg1entry->vaddr =
1351 tmp_addr = (u64)(skb->data + headersize); 1350 ehea_map_vaddr(skb->data + headersize);
1352 sg1entry->vaddr = ehea_map_vaddr(tmp_addr);
1353 swqe->descriptors++; 1351 swqe->descriptors++;
1354 } 1352 }
1355 } else 1353 } else
@@ -1362,7 +1360,6 @@ static void write_swqe2_nonTSO(struct sk_buff *skb,
1362 int skb_data_size = skb->len - skb->data_len; 1360 int skb_data_size = skb->len - skb->data_len;
1363 u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0]; 1361 u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0];
1364 struct ehea_vsgentry *sg1entry = &swqe->u.immdata_desc.sg_entry; 1362 struct ehea_vsgentry *sg1entry = &swqe->u.immdata_desc.sg_entry;
1365 u64 tmp_addr;
1366 1363
1367 /* Packet is any nonTSO type 1364 /* Packet is any nonTSO type
1368 * 1365 *
@@ -1379,8 +1376,8 @@ static void write_swqe2_nonTSO(struct sk_buff *skb,
1379 /* copy sg1entry data */ 1376 /* copy sg1entry data */
1380 sg1entry->l_key = lkey; 1377 sg1entry->l_key = lkey;
1381 sg1entry->len = skb_data_size - SWQE2_MAX_IMM; 1378 sg1entry->len = skb_data_size - SWQE2_MAX_IMM;
1382 tmp_addr = (u64)(skb->data + SWQE2_MAX_IMM); 1379 sg1entry->vaddr =
1383 sg1entry->vaddr = ehea_map_vaddr(tmp_addr); 1380 ehea_map_vaddr(skb->data + SWQE2_MAX_IMM);
1384 swqe->descriptors++; 1381 swqe->descriptors++;
1385 } 1382 }
1386 } else { 1383 } else {
@@ -1395,7 +1392,6 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,
1395 struct ehea_vsgentry *sg_list, *sg1entry, *sgentry; 1392 struct ehea_vsgentry *sg_list, *sg1entry, *sgentry;
1396 skb_frag_t *frag; 1393 skb_frag_t *frag;
1397 int nfrags, sg1entry_contains_frag_data, i; 1394 int nfrags, sg1entry_contains_frag_data, i;
1398 u64 tmp_addr;
1399 1395
1400 nfrags = skb_shinfo(skb)->nr_frags; 1396 nfrags = skb_shinfo(skb)->nr_frags;
1401 sg1entry = &swqe->u.immdata_desc.sg_entry; 1397 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 /* copy sg1entry data */ 1413 /* copy sg1entry data */
1418 sg1entry->l_key = lkey; 1414 sg1entry->l_key = lkey;
1419 sg1entry->len = frag->size; 1415 sg1entry->len = frag->size;
1420 tmp_addr = (u64)(page_address(frag->page) 1416 sg1entry->vaddr =
1421 + frag->page_offset); 1417 ehea_map_vaddr(page_address(frag->page)
1422 sg1entry->vaddr = ehea_map_vaddr(tmp_addr); 1418 + frag->page_offset);
1423 swqe->descriptors++; 1419 swqe->descriptors++;
1424 sg1entry_contains_frag_data = 1; 1420 sg1entry_contains_frag_data = 1;
1425 } 1421 }
@@ -1431,10 +1427,9 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,
1431 1427
1432 sgentry->l_key = lkey; 1428 sgentry->l_key = lkey;
1433 sgentry->len = frag->size; 1429 sgentry->len = frag->size;
1434 1430 sgentry->vaddr =
1435 tmp_addr = (u64)(page_address(frag->page) 1431 ehea_map_vaddr(page_address(frag->page)
1436 + frag->page_offset); 1432 + frag->page_offset);
1437 sgentry->vaddr = ehea_map_vaddr(tmp_addr);
1438 swqe->descriptors++; 1433 swqe->descriptors++;
1439 } 1434 }
1440 } 1435 }