diff options
author | Joe Perches <joe@perches.com> | 2008-11-19 18:44:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-19 18:44:53 -0500 |
commit | 07f0757a6808f2f36a0e58c3a54867ccffdb8dc9 (patch) | |
tree | e04b573c3f1471ff21c6b2499682a620f4db7eae /include | |
parent | a7a0d6a87b70f7b2bab5281fc0fd443772bd0795 (diff) |
include/net net/ - csum_partial - remove unnecessary casts
The first argument to csum_partial is const void *
casts to char/u8 * are not necessary
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/checksum.h | 2 | ||||
-rw-r--r-- | include/net/ip_vs.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/net/checksum.h b/include/net/checksum.h index 07602b7fa218..ba55d8b8c87c 100644 --- a/include/net/checksum.h +++ b/include/net/checksum.h | |||
@@ -98,7 +98,7 @@ static inline void csum_replace4(__sum16 *sum, __be32 from, __be32 to) | |||
98 | { | 98 | { |
99 | __be32 diff[] = { ~from, to }; | 99 | __be32 diff[] = { ~from, to }; |
100 | 100 | ||
101 | *sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum))); | 101 | *sum = csum_fold(csum_partial(diff, sizeof(diff), ~csum_unfold(*sum))); |
102 | } | 102 | } |
103 | 103 | ||
104 | static inline void csum_replace2(__sum16 *sum, __be16 from, __be16 to) | 104 | static inline void csum_replace2(__sum16 *sum, __be16 from, __be16 to) |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 8f6abf4883e3..ab9b003ab671 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -913,7 +913,7 @@ static inline __wsum ip_vs_check_diff4(__be32 old, __be32 new, __wsum oldsum) | |||
913 | { | 913 | { |
914 | __be32 diff[2] = { ~old, new }; | 914 | __be32 diff[2] = { ~old, new }; |
915 | 915 | ||
916 | return csum_partial((char *) diff, sizeof(diff), oldsum); | 916 | return csum_partial(diff, sizeof(diff), oldsum); |
917 | } | 917 | } |
918 | 918 | ||
919 | #ifdef CONFIG_IP_VS_IPV6 | 919 | #ifdef CONFIG_IP_VS_IPV6 |
@@ -923,7 +923,7 @@ static inline __wsum ip_vs_check_diff16(const __be32 *old, const __be32 *new, | |||
923 | __be32 diff[8] = { ~old[3], ~old[2], ~old[1], ~old[0], | 923 | __be32 diff[8] = { ~old[3], ~old[2], ~old[1], ~old[0], |
924 | new[3], new[2], new[1], new[0] }; | 924 | new[3], new[2], new[1], new[0] }; |
925 | 925 | ||
926 | return csum_partial((char *) diff, sizeof(diff), oldsum); | 926 | return csum_partial(diff, sizeof(diff), oldsum); |
927 | } | 927 | } |
928 | #endif | 928 | #endif |
929 | 929 | ||
@@ -931,7 +931,7 @@ static inline __wsum ip_vs_check_diff2(__be16 old, __be16 new, __wsum oldsum) | |||
931 | { | 931 | { |
932 | __be16 diff[2] = { ~old, new }; | 932 | __be16 diff[2] = { ~old, new }; |
933 | 933 | ||
934 | return csum_partial((char *) diff, sizeof(diff), oldsum); | 934 | return csum_partial(diff, sizeof(diff), oldsum); |
935 | } | 935 | } |
936 | 936 | ||
937 | #endif /* __KERNEL__ */ | 937 | #endif /* __KERNEL__ */ |