# Re: \[PATCH net-next\] net: silence sparse endianness warnings in checksums

- From: David Miller \<davem@davemloft.net\>
- Date: 2015-02-09 00:30:02 
- List: netdev
- Page: https://ratatoskr.run/netdev/2015/02/10977692
- Thread: https://ratatoskr.run/netdev/2015/02/10977586/t.md

```text
From: Sabrina Dubroca <sd@queasysnail.net>
Date: Fri,  6 Feb 2015 15:43:52 +0100

> In __skb_checksum_validate_complete and its callers, we only test that
> the return value is non-zero, so it's safe to __force the type.
> 
> Callers of gso_make_checksum pass a __sum16, use that.
> 
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>

I don't like this, you're just moving the casts from one place to
another.

These functions are a mess, they are combining one thing (returning
the final csum value) with another thing (non-zero return has some
boolean meaning).

These issues should be explicitly accomodated rather than papered
around.
```
