Sparse is a semantic checker for C programs; it can be used to find a number of potential problems with kernel code. While building with make C=1, Kbuild complained:
vwifi.c:1234:42: warning: incorrect type in assignment (different base types)
vwifi.c:1234:42: expected unsigned short [usertype] beacon_interval
vwifi.c:1234:42: got restricted __le16 [usertype]
./include/linux/spinlock.h:393:9: warning: context imbalance in 'vwifi_start_ap' - unexpected unlock
vwifi.c:1582:9: warning: context imbalance in 'vwifi_stop_ap' - unexpected unlock
Later, we may consider to introduce the Sparse into CI pipeline as LKMPG does.
Sparse is a semantic checker for C programs; it can be used to find a number of potential problems with kernel code. While building with
make C=1
, Kbuild complained:Later, we may consider to introduce the Sparse into CI pipeline as LKMPG does.