[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BAE9DCEF64577A439B3A37F36F9B691C02BBDE39@orsmsx418.amr.corp.intel.com>
Date: Mon, 23 Jul 2007 16:40:10 -0700
From: "Nelson, Shannon" <shannon.nelson@...el.com>
To: "Rusty Russell" <rusty@...tcorp.com.au>,
"Adrian Bunk" <bunk@...sta.de>
Cc: "Gabriel C" <nix.or.die@...glemail.com>,
"lkml" <linux-kernel@...r.kernel.org>,
"Andrew Morton" <akpm@...ux-foundation.org>,
<lksctp-developers@...ts.sourceforge.net>,
"Williams, Dan J" <dan.j.williams@...el.com>
Subject: RE: __unsafe() usage
Rusty Russell [mailto:rusty@...tcorp.com.au]
>> If this is true, and since the MOD_INC_USE_COUNT compat code is long
>> gone, shouldn't we be able to completely remove __unsafe() and the
>> struct member "unsafe"?
>
>Yes, indeed, something like this:
>==
>Remove "unsafe" from module struct
>
>Adrian Bunk points out that "unsafe" was used to mark modules
>touched by
>the deprecated MOD_INC_USE_COUNT interface, which has long gone. It's
>time to remove the member from the module structure, as well.
>
>If you want a module which can't unload, don't register an exit
>function.
>
>Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
>
>diff -r d7af727512fd drivers/dma/ioatdma.c
>--- a/drivers/dma/ioatdma.c Tue Jul 24 08:30:05 2007 +1000
>+++ b/drivers/dma/ioatdma.c Tue Jul 24 09:11:11 2007 +1000
>@@ -811,18 +811,17 @@ MODULE_AUTHOR("Intel Corporation");
>
> static int __init ioat_init_module(void)
> {
>- /* it's currently unsafe to unload this module */
>- /* if forced, worst case is that rmmod hangs */
>- __unsafe(THIS_MODULE);
>-
> return pci_register_driver(&ioat_pci_driver);
> }
>
> module_init(ioat_init_module);
>
>+/* it's currently unsafe to unload this module */
>+#if 0
> static void __exit ioat_exit_module(void)
> {
> pci_unregister_driver(&ioat_pci_driver);
> }
>
> module_exit(ioat_exit_module);
>+#endif
Acked-by: Shannon Nelson <shannon.nelson@...el.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists