Commit 709bbb0
net: dsa: yt921x: Fix MIB overflow wraparound routine
Reported by the following Smatch static checker warning:
drivers/net/dsa/yt921x.c:702 yt921x_read_mib()
warn: was expecting a 64 bit value instead of '(~0)'
Fixes: 186623f ("net: dsa: yt921x: Add support for Motorcomm YT921x")
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/netdev/[email protected]/
Suggested-by: David Laight <[email protected]>
Signed-off-by: David Yang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent ca12c4a commit 709bbb0
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
686 | 685 | | |
687 | | - | |
| 686 | + | |
688 | 687 | | |
689 | 688 | | |
690 | 689 | | |
691 | 690 | | |
692 | 691 | | |
693 | 692 | | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
699 | 698 | | |
| 699 | + | |
| 700 | + | |
700 | 701 | | |
701 | 702 | | |
702 | 703 | | |
| |||
0 commit comments