lkml.org 
[lkml]   [2001]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [CHECKER] __init functions called by non-__init
Hi!

> 1. The best case: an init function calls a non-init, which in
> turn calls an init:
>
> void __init probe() { a(); }
> void a() { b(); }
> void __init b() { ... }

> in this case, is the missing __init on 'a' only a performance
> bug in that a's code won't be freed up?

...not neccesarily an error. If a() is being used to do stuff needed at
runtime, and only calls b() at initialzation.

> On the other hand, if I understood the rules right, this next one looks like
> a more exciting error, since an __exit routine is calling an __init routine:

Actually, it is right for subtle reasons:

__exit is only used in module case. And in module case __init functions are
not freed.
Pavel
--
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.

-
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: 2005-03-22 13:24    [W:0.229 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site