Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: octeon: Fix incorrect type in assignment

Fix the following warning generated by sparse in
drivers/staging/octeon/ethernet-tx.c:

drivers/staging/octeon/ethernet-tx.c:563:50: warning: incorrect type in assignment (different base types)
drivers/staging/octeon/ethernet-tx.c:563:50: expected unsigned short [usertype] hw_chksum
drivers/staging/octeon/ethernet-tx.c:563:50: got restricted __wsum [usertype] csum

Warning generated by running:
make C=2 CF="-D__CHECK_ENDIAN__" drivers/staging/octeon/

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/20191010043815.14027-1-wambui.karugax@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wambui Karuga and committed by
Greg Kroah-Hartman
fbf12784 06f9c65a

+1 -1
+1 -1
drivers/staging/octeon/octeon-stubs.h
··· 123 123 struct { 124 124 uint64_t next_ptr:40; 125 125 uint8_t unused; 126 - uint16_t hw_chksum; 126 + __wsum hw_chksum; 127 127 } cn38xx; 128 128 struct { 129 129 uint64_t pknd:6; /* 0..5 */