Commit d171235e authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

drivers/s390/ - csum_partial - remove unnecessary casts

    The first argument to csum_partial is const void *
    casts to char/u8 * are not necessary
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 07f0757a
...@@ -350,7 +350,7 @@ static __wsum qeth_eddp_check_tcp4_hdr(struct qeth_eddp_data *eddp, ...@@ -350,7 +350,7 @@ static __wsum qeth_eddp_check_tcp4_hdr(struct qeth_eddp_data *eddp,
phcsum = csum_tcpudp_nofold(eddp->nh.ip4.h.saddr, eddp->nh.ip4.h.daddr, phcsum = csum_tcpudp_nofold(eddp->nh.ip4.h.saddr, eddp->nh.ip4.h.daddr,
eddp->thl + data_len, IPPROTO_TCP, 0); eddp->thl + data_len, IPPROTO_TCP, 0);
/* compute checksum of tcp header */ /* compute checksum of tcp header */
return csum_partial((u8 *)&eddp->th, eddp->thl, phcsum); return csum_partial(&eddp->th, eddp->thl, phcsum);
} }
static __wsum qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp, static __wsum qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp,
...@@ -362,12 +362,12 @@ static __wsum qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp, ...@@ -362,12 +362,12 @@ static __wsum qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp,
QETH_DBF_TEXT(TRACE, 5, "eddpckt6"); QETH_DBF_TEXT(TRACE, 5, "eddpckt6");
eddp->th.tcp.h.check = 0; eddp->th.tcp.h.check = 0;
/* compute pseudo header checksum */ /* compute pseudo header checksum */
phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.saddr, phcsum = csum_partial(&eddp->nh.ip6.h.saddr,
sizeof(struct in6_addr), 0); sizeof(struct in6_addr), 0);
phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.daddr, phcsum = csum_partial(&eddp->nh.ip6.h.daddr,
sizeof(struct in6_addr), phcsum); sizeof(struct in6_addr), phcsum);
proto = htonl(IPPROTO_TCP); proto = htonl(IPPROTO_TCP);
phcsum = csum_partial((u8 *)&proto, sizeof(u32), phcsum); phcsum = csum_partial(&proto, sizeof(u32), phcsum);
return phcsum; return phcsum;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment