More "misstakes" in kernel 2.6.16.1 headers

Auke Kok sofar at foo-projects.org
Sat Apr 8 05:30:43 UTC 2006


Jerry Lundström wrote:
> input.h was reported around two weeks ago..
> Going to report the other ones asap (waiting for bugzilla password email).


great - how come these were usable in the first place outside of the kernel? 
too handy for userspace or bad desing? Got a lkml archive link?

good work spotting these btw.

Auke


> 
> 
> 
> ------------------------------------------------------------------------
> 
> --- /usr/src/linux/include/linux/bitops.h	2006-03-28 08:49:02.000000000 +0200
> +++ /usr/include/linux/bitops.h	2006-04-07 12:39:09.000000000 +0200
> @@ -76,7 +76,7 @@
>   */
>  #include <asm/bitops.h>
>  
> -
> +#ifdef __KERNEL__
>  static inline int generic_fls64(__u64 x)
>  {
>  	__u32 h = x >> 32;
> @@ -102,6 +102,7 @@
>  		order++;
>  	return order;
>  }
> +#endif
>  
>  /*
>   * hweightN: returns the hamming weight (i.e. the number
> 
> 
> ------------------------------------------------------------------------
> 
> --- /usr/src/linux/include/asm/processor.h	2006-03-28 08:49:02.000000000 +0200
> +++ /usr/include/asm/processor.h	2006-04-07 12:41:37.000000000 +0200
> @@ -232,6 +232,7 @@
>   */
>  extern unsigned long mmu_cr4_features;
>  
> +#ifdef __KERNEL__
>  static inline void set_in_cr4 (unsigned long mask)
>  {
>  	unsigned cr4;
> @@ -249,6 +250,7 @@
>  	cr4 &= ~mask;
>  	write_cr4(cr4);
>  }
> +#endif
>  
>  /*
>   *      NSC/Cyrix CPU configuration register indexes
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Lunar-dev mailing list
> Lunar-dev at lunar-linux.org
> http://foo-projects.org/mailman/listinfo/lunar-dev



More information about the Lunar-dev mailing list