User Tools

Site Tools


en:developers:documentation:using-sparse

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:developers:documentation:using-sparse [2017/10/24 02:39]
Nikolas Nyby [Using sparse] grammar + typo fix
en:developers:documentation:using-sparse [2019/03/30 15:00]
Luc Van Oostenryck [Using sparse] C=2 vs C=1
Line 17: Line 17:
 ===== Version of sparse to use ===== ===== Version of sparse to use =====
  
-We recommend to use the latest stable release of sparse. As of now this is v0.4.4, so you can do something as follows: ​+We recommend to use the latest stable release of sparse. As of now this is v0.5.1, so you can do something as follows: ​
  
 +<​code>​git checkout v0.5.1</​code>​
  
-<​code>​git ​checkout ​-b rel4 v0.4.4</​code>​ +Or do <​code>​git ​tag -l</​code> ​to see all releases.
 ===== Install sparse ===== ===== Install sparse =====
  
Line 32: Line 32:
 ===== Using sparse ===== ===== Using sparse =====
  
-To use sparse for kernel development simply pass on the C=argument onto your make command. For example to enable sparse for mac80211 development you would use: +To use sparse for kernel development simply pass on the C=argument onto your make command. For example to enable sparse for mac80211 development you would use: 
  
  
-<​code>​make C=M=net/​mac80211/</​code>​+<​code>​make C=M=net/​mac80211/</​code>​
  
-===== Endian checks ===== 
  
-Endian checks are encouraged. Most endian complaints are typically valid and reflect design issues. These should be reviewed carefully. Some drivers ​force-enable endian checks with sparse by forcing it through their own driver makefiles upstreamIf drivers do not have these you can enable sparse checks yourself by appending to your make command+This will force-check all corresponding source filesTo only check files which will be recompiled ​you would use the C=1 argument:
  
  
-<​code>​CF="​-D__CHECK_ENDIAN__" ​</​code>​ +<​code>​make C=1 M=net/​mac80211/​</​code>​
-To enforce endian checks on your driver you can use something as follows on your driver Makefile: ​+
  
  
-<​code>​ccflags-y += -D__CHECK_ENDIAN__</​code>​+===== Endian checks ===== 
 + 
 +Most endian complaints are typically valid and reflect design issues. These should be reviewed carefully. Happily, since v4.10-rc1 these checks are automatically enabled.
en/developers/documentation/using-sparse.txt · Last modified: 2019/03/30 15:00 by Luc Van Oostenryck