lkml.org 
[lkml]   [2007]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: checkpatch and kernel/sched.c
> > 
> > > WARNING: externs should be avoided in .c files
> > > #6545: FILE: home/apw/git/linux-2.6/kernel/sched.c:6542:
> > > + extern char __sched_text_start[], __sched_text_end[];
> > >
> > > That one ... dunno. This check is a difficult one. Should it be a
> > > CHECK?
> >
> > no, this is a legitimate warning - externs in .c files should move into
> > the proper .h file. So i'd suggest to keep this a WARNING.
>
> Yes. When the symbol is defined in .S or vmlinux.lds we have
> traditionally declared it in .c.
>
> But why? It _is_ a global symbol. We might as well declare it in .h.
> That's consistent, and prevents duplicated declarations from popping up
> later on.
It would be nice to collect all linker symbol externs in one place..
asm-$(ARCH)/???.h

We could even auto-generate it but thats not worth it I think.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-01 09:51    [W:0.103 / U:0.292 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site