1 #include <strings.h> 2 3 FILE_LICENCE ( GPL2_OR_LATER ); 4 5 int __flsl ( long x ) { 6 unsigned long value = x; 7 int ls = 0; 8 9 for ( ls = 0 ; value ; ls++ ) { 10 value >>= 1; 11 } 12 return ls; 13 } 14