Re: [CHECKER] __init functions called by non-__init

Rusty Russell (rusty@rustcorp.com.au)
Sat, 07 Apr 2001 05:31:43 +1000


In message <200104050649.XAA22384@csl.Stanford.EDU> you write:
> where if you look in the code, the flagged routine generic_NCR53C400A_setup
> does indeed not have __init:
> void generic_NCR53C400A_setup (char *str, int *ints) {
> internal_setup (BOARD_NCR53C400A, str, ints);
> }

As long as, of course, making that function an __init would not make
it a class 2 error.

> void __init uninit_aedsp16(void)
>
> static void __exit cleanup_aedsp16(void) {
> uninit_aedsp16();
> }

Ick. Currently, this will work, since if it's not a module, __exit
function never get included or called. If it is a module, __init does
nothing.

It's incredibly poor taste, though, and if we ever implement __init
dropping for modules (Keith?), it'll break horribly of course. Thus
it's a bug to call __init functions from __exit functions, but not a
very exciting one.

Rusty.

--
Premature optmztion is rt of all evl. --DK
-
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/