# Re: \[patch\] caif: fix a signedness bug in cfpkt\_iterate()

- From: David Miller \<davem@davemloft.net\>
- Date: 2015-02-20 22:35:29 
- List: netdev
- Page: https://ratatoskr.run/netdev/2015/02/10978465
- Thread: https://ratatoskr.run/netdev/2015/02/10978289/t.md

```text
From: Dan Carpenter <redacted>
Date: Thu, 19 Feb 2015 12:13:13 +0300

> The cfpkt_iterate() function can return -EPROTO on error, but the
> function is a u16 so the negative value gets truncated to a positive
> unsigned short.  This causes a static checker warning.
> 
> The only caller which might care is cffrml_receive(), when it's checking
> the frame checksum.  I modified cffrml_receive() so that it never says
> -EPROTO is a valid checksum.
> 
> Also this isn't ever going to be inlined so I removed the "inline".
> 
> Signed-off-by: Dan Carpenter <redacted>

Applied, thanks Dan.
```
