aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fddi
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-06-04 08:44:18 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-06 12:31:33 -0400
commitc2fd03a0115a244c5f622453b2b1f038ed5700a6 (patch)
tree55c6a15e0ab898f15b08dfe4dcba4db55dc2af9b /drivers/net/fddi
parent2c208890c6d4e16076c6664137703ec813e8fa6c (diff)
drivers: net: Remove casts to same type
Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force, __iomem and __user. @@ type T; T *p; @@ - (T *)p + p Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fddi')
-rw-r--r--drivers/net/fddi/defxx.c4
-rw-r--r--drivers/net/fddi/skfp/pmf.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
index 4ad80f771099..6695a1dadf4e 100644
--- a/drivers/net/fddi/defxx.c
+++ b/drivers/net/fddi/defxx.c
@@ -2962,7 +2962,7 @@ static int dfx_rcv_init(DFX_board_t *bp, int get_buffers)
2962 bp->descr_block_virt->rcv_data[i+j].long_0 = (u32) (PI_RCV_DESCR_M_SOP | 2962 bp->descr_block_virt->rcv_data[i+j].long_0 = (u32) (PI_RCV_DESCR_M_SOP |
2963 ((PI_RCV_DATA_K_SIZE_MAX / PI_ALIGN_K_RCV_DATA_BUFF) << PI_RCV_DESCR_V_SEG_LEN)); 2963 ((PI_RCV_DATA_K_SIZE_MAX / PI_ALIGN_K_RCV_DATA_BUFF) << PI_RCV_DESCR_V_SEG_LEN));
2964 bp->descr_block_virt->rcv_data[i+j].long_1 = (u32) (bp->rcv_block_phys + (i * PI_RCV_DATA_K_SIZE_MAX)); 2964 bp->descr_block_virt->rcv_data[i+j].long_1 = (u32) (bp->rcv_block_phys + (i * PI_RCV_DATA_K_SIZE_MAX));
2965 bp->p_rcv_buff_va[i+j] = (char *) (bp->rcv_block_virt + (i * PI_RCV_DATA_K_SIZE_MAX)); 2965 bp->p_rcv_buff_va[i+j] = (bp->rcv_block_virt + (i * PI_RCV_DATA_K_SIZE_MAX));
2966 } 2966 }
2967#endif 2967#endif
2968 } 2968 }
@@ -3030,7 +3030,7 @@ static void dfx_rcv_queue_process(
3030#ifdef DYNAMIC_BUFFERS 3030#ifdef DYNAMIC_BUFFERS
3031 p_buff = (char *) (((struct sk_buff *)bp->p_rcv_buff_va[entry])->data); 3031 p_buff = (char *) (((struct sk_buff *)bp->p_rcv_buff_va[entry])->data);
3032#else 3032#else
3033 p_buff = (char *) bp->p_rcv_buff_va[entry]; 3033 p_buff = bp->p_rcv_buff_va[entry];
3034#endif 3034#endif
3035 memcpy(&descr, p_buff + RCV_BUFF_K_DESCR, sizeof(u32)); 3035 memcpy(&descr, p_buff + RCV_BUFF_K_DESCR, sizeof(u32));
3036 3036
diff --git a/drivers/net/fddi/skfp/pmf.c b/drivers/net/fddi/skfp/pmf.c
index 9ac4665d7411..24d8566cfd8b 100644
--- a/drivers/net/fddi/skfp/pmf.c
+++ b/drivers/net/fddi/skfp/pmf.c
@@ -1242,7 +1242,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index,
1242 if (len < 8) 1242 if (len < 8)
1243 goto len_error ; 1243 goto len_error ;
1244 if (set) 1244 if (set)
1245 memcpy((char *) to,(char *) from+2,6) ; 1245 memcpy(to,from+2,6) ;
1246 to += 8 ; 1246 to += 8 ;
1247 from += 8 ; 1247 from += 8 ;
1248 len -= 8 ; 1248 len -= 8 ;
@@ -1251,7 +1251,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index,
1251 if (len < 4) 1251 if (len < 4)
1252 goto len_error ; 1252 goto len_error ;
1253 if (set) 1253 if (set)
1254 memcpy((char *) to,(char *) from,4) ; 1254 memcpy(to,from,4) ;
1255 to += 4 ; 1255 to += 4 ;
1256 from += 4 ; 1256 from += 4 ;
1257 len -= 4 ; 1257 len -= 4 ;
@@ -1260,7 +1260,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index,
1260 if (len < 8) 1260 if (len < 8)
1261 goto len_error ; 1261 goto len_error ;
1262 if (set) 1262 if (set)
1263 memcpy((char *) to,(char *) from,8) ; 1263 memcpy(to,from,8) ;
1264 to += 8 ; 1264 to += 8 ;
1265 from += 8 ; 1265 from += 8 ;
1266 len -= 8 ; 1266 len -= 8 ;
@@ -1269,7 +1269,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index,
1269 if (len < 32) 1269 if (len < 32)
1270 goto len_error ; 1270 goto len_error ;
1271 if (set) 1271 if (set)
1272 memcpy((char *) to,(char *) from,32) ; 1272 memcpy(to,from,32) ;
1273 to += 32 ; 1273 to += 32 ;
1274 from += 32 ; 1274 from += 32 ;
1275 len -= 32 ; 1275 len -= 32 ;