aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-03-24 13:45:12 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-26 15:46:15 -0400
commit12f2a47945946731bd2f4a64e4720daaabc95106 (patch)
treed3bec47bd612f90a95cb6eecac931bd0dd00fc9b /drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
parentf845b335f151a0b4f44827b519150e9e2982bd0d (diff)
chelsio: Remove addressof casts to same type
Using addressof then casting to the original type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast.cocci @@ type T; T foo; @@ - (T *)&foo + &foo Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index cc04d090354c..a7a41e0f3b01 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -3220,8 +3220,8 @@ static int cxgb4_clip_get(const struct net_device *dev,
3220 c.op_to_write = htonl(FW_CMD_OP(FW_CLIP_CMD) | 3220 c.op_to_write = htonl(FW_CMD_OP(FW_CLIP_CMD) |
3221 FW_CMD_REQUEST | FW_CMD_WRITE); 3221 FW_CMD_REQUEST | FW_CMD_WRITE);
3222 c.alloc_to_len16 = htonl(F_FW_CLIP_CMD_ALLOC | FW_LEN16(c)); 3222 c.alloc_to_len16 = htonl(F_FW_CLIP_CMD_ALLOC | FW_LEN16(c));
3223 *(__be64 *)&c.ip_hi = *(__be64 *)(lip->s6_addr); 3223 c.ip_hi = *(__be64 *)(lip->s6_addr);
3224 *(__be64 *)&c.ip_lo = *(__be64 *)(lip->s6_addr + 8); 3224 c.ip_lo = *(__be64 *)(lip->s6_addr + 8);
3225 return t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, false); 3225 return t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, false);
3226} 3226}
3227 3227
@@ -3236,8 +3236,8 @@ static int cxgb4_clip_release(const struct net_device *dev,
3236 c.op_to_write = htonl(FW_CMD_OP(FW_CLIP_CMD) | 3236 c.op_to_write = htonl(FW_CMD_OP(FW_CLIP_CMD) |
3237 FW_CMD_REQUEST | FW_CMD_READ); 3237 FW_CMD_REQUEST | FW_CMD_READ);
3238 c.alloc_to_len16 = htonl(F_FW_CLIP_CMD_FREE | FW_LEN16(c)); 3238 c.alloc_to_len16 = htonl(F_FW_CLIP_CMD_FREE | FW_LEN16(c));
3239 *(__be64 *)&c.ip_hi = *(__be64 *)(lip->s6_addr); 3239 c.ip_hi = *(__be64 *)(lip->s6_addr);
3240 *(__be64 *)&c.ip_lo = *(__be64 *)(lip->s6_addr + 8); 3240 c.ip_lo = *(__be64 *)(lip->s6_addr + 8);
3241 return t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, false); 3241 return t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, false);
3242} 3242}
3243 3243