odd warnings from module.h and bitops.h



Hi,

Can't figure out this one, maybe someone here could help?

The situation is that I've some existing code and makefile for a kernel module. These compile fine with debian original kernel-headers-2.4.27

With kernel-headers-2.6.8 there are several warnings from the kernel source's/header's own header files that have nothing to do with my actual code. Anyone have any idea what could be wrong?

Basically, the first line of the code after all comments is line 50,

#include <linux/module.h>

and already that results in a large number of warnings.

Like below:

rm -rf *.o *~ vsib.o wr mrg reavsib d32 d16 d8 dd32 dd16 poff skip dstart ft2 ft3 trunc fixmk5crc64 fixmk5crc32 fixmk5crc16 fixmk5crc8 sf ndate cxextr
cc -v -O -DMODULE -D__KERNEL__ -I /usr/src/kernel-headers-2.6.8-11-amd64-k8/include -Wall -D_LARGEFILE64_SOURCE=1 -Icommon -DKERNEL26=1 -c vsib.c
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-13)
/usr/lib/gcc-lib/i486-linux/3.3.5/cc1 -quiet -v -I /usr/src/kernel-headers-2.6.8-11-amd64-k8/include -Icommon -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=5 -DMODULE -D__KERNEL__ -D_LARGEFILE64_SOURCE=1 -DKERNEL26=1 vsib.c -quiet -dumpbase vsib.c -auxbase vsib -O -Wall -version -o /tmp/ccvkF8ru.s
GNU C version 3.3.5 (Debian 1:3.3.5-13) (i486-linux)
compiled by GNU C version 3.3.5 (Debian 1:3.3.5-13).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/i486-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include
common
/usr/local/include
/usr/lib/gcc-lib/i486-linux/3.3.5/include
/usr/include
End of search list.
In file included from /usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/thread_info.h:20,
from /usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/spinlock.h:12,
from /usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/capability.h:45,
from /usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/sched.h:7,
from /usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/module.h:10,
from vsib.c:50:
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h: In function `generic_hweight64':
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:118: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:118: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:119: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:119: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:120: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:120: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:121: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:121: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:122: warning: integer constant is too large for "unsigned long" type
/usr/src/kernel-headers-2.6.8-11-amd64-k8/include/linux/bitops.h:122: warning: integer constant is too large for "unsigned long" type

....
with further warnings from some other header files. I just can't understand how official debian kernel-headers-2.6.8-11-amd64-k8 could be this screwed up :-| The kernel actually compiles fine. What might be missing?

thanks,
- Jan
.



Relevant Pages

  • Is there a patch to make nvnet work ?
    ... I know this driver is closed-source and not supported, but with older kernel ... I started it and try to compile nvnet against it. ... But when I try to compile it with the last patch, ... nvnet.h:107: warning: data definition has no type or storage class ...
    (Linux-Kernel)
  • Re: more install problems
    ... > a) Try to go back completely to 2.2 and compile with that. ... as being stuck with 2.2 kernel will hold you ... 8139too.c Makefile linux24x-8139cp-1.60.zip readme.txt ... 8139too.c:2753: warning: unused variable `ret' ...
    (Debian-User)
  • Re: cant compile udf
    ... | fs/udf/super.c:311: warning: unused variable `option' ... | I tried to compile it as a module and inside the kernel too. ... It looks like you have a confuzed source file. ... kernel tarball or apply bk patches or apply cvs patches or what? ...
    (Linux-Kernel)
  • kernel compile error on SuSE 9.1
    ... I am currently trying to compile an new kernel on SuSE 9.1 Pro. ... The compile process throws up a few warning messages (like type ...
    (alt.os.linux.suse)
  • Re: problem with build mcelog
    ... # fetch http://people.freebsd.org/~jhb/mcelog/mcelog.patch ... Hunk #1 succeeded at 15. ... server.c:339: warning: passing argument 2 of 'connect' from incompatible pointer type ... mcelog.c:835: warning: integer constant is too large for 'long' type ...
    (freebsd-hackers)