to CONFIG_KMOD or not to CONFIG_KMOD

Tigran Aivazian (tigran@sco.COM)
Thu, 30 Dec 1999 11:27:14 +0000 (GMT)


Hi guys,

What is the official status on the situations like:

check some resource;
if (resource == NULL) {
char buf[32];
sprintf(buffer, "foo-bar-XYZ");
request_module(buffer);
if (resource is still NULL)
return -ENODEV; /* or whatever appropriate */
}

The #ifdef CONFIG_KMODE around this type of code can be omitted (because
request_module() will be just noop) e.g. as is done in phone_open() (the
new Linux Telephony thingy) or it can be left for performance when any CPU
cycle is important e.g. as in fs/exec.c:search_binary_handler()

Does everyone agree with such state of things or do you think one should
go through the whole source and clean it up removing all #ifdef
CONFIG_KMOD as they are strictly speaking superfluous?

Regards,
Tigran.

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