Re: Warnings compiling a module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Michael Covi (thebaron22@optushome.com.au) wrote:
> Hi All,
> 
> I'm trying to compile the kernel module below with the following command
> line and get the following warnings. Is there anyway to get rid of them?
> 
> thanks
> mick
> 
> gcc -Wall -Wstrict-prototypes -Winline -O2 -fomit-frame-pointer
> -fno-strict-aliasing -I/usr/src/linux/include -c mymod.c -o mymod.o
> In file included from /usr/src/linux/include/linux/mm.h:4,
>                  from /usr/src/linux/include/linux/slab.h:14,
>                  from /usr/src/linux/include/linux/proc_fs.h:5,
>                  from mymod.c:6:
> /usr/src/linux/include/linux/sched.h: In function `mmdrop':
> /usr/src/linux/include/linux/sched.h:754: warning: can't inline call to
> `__mmdrop'
> /usr/src/linux/include/linux/sched.h:758: warning: called from here

get rid of -Winline, then gcc won't warn you when it isn't inlining a
function.  using a kernel Makefile can help assure you that you get the
right CFLAGS.  btw, in your module, the fini() function should be
tagged __exit.

cheers,
-chris
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux