lkml.org 
[lkml]   [2001]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectautomatic __init (etc.) propagation
From
Date
I have just been preparing a patch for parport_pc.c
and had the unpleasant experience of having to decide
whether certain functions should be tagged "__init" or
"__devinit", etc. I assume that if I incorrectly label
a function "__init" then an oops will result when the
function is called after init time; and if I incorrectly
fail to label a function with "__init" then it will be dead
code after init time. Similarly, if I incorrectly label
a function "__devinit" then an oops will result when the
function is called after init time (unless the driver is
compiled with HOTPLUG); and if I incorrectly fail to label
a function with "__devinit" then it will be dead code
after init time (unless the driver is compiled with HOTPLUG,
in which case __devinit makes no difference).

Would it not be possible for this to be handled automatically?
That is, would it not be possible to set things up so that we
tag just the module init function with '__init' and all
those functions (that aren't exported) called only by __init
functions will automatically be treated as __init functions
too? And similarly with __devinit functions? Thoughts?

--
Thomas Hood

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