Re: [PATCH net-next v1] net: Use csum_replace_... and csum_sub() helpers instead of opencoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 17 Feb 2022 16:43:55 +0100 Christophe Leroy wrote:
>  static inline void nft_csum_replace(__sum16 *sum, __wsum fsum, __wsum tsum)
>  {
> -	*sum = csum_fold(csum_add(csum_sub(~csum_unfold(*sum), fsum), tsum));
> +	csum_replace4(sum, fsum, tsum);

Sparse says:

net/netfilter/nft_payload.c:560:28: warning: incorrect type in argument 2 (different base types)
net/netfilter/nft_payload.c:560:28:    expected restricted __be32 [usertype] from
net/netfilter/nft_payload.c:560:28:    got restricted __wsum [usertype] fsum



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux