public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* try_then_request_module
@ 2003-05-19  1:41 Rusty Russell
  2003-05-19  9:08 ` try_then_request_module Ingo Oeser
  0 siblings, 1 reply; 6+ messages in thread
From: Rusty Russell @ 2003-05-19  1:41 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

> ChangeSet 2003/05/17 12:39:18-07:00, torvalds @ home.transmeta.com [diffview]
> 
> Make request_module() take a printf-like vararg argument instead of a string.
> 
> This is what a lot of the callers really wanted.

Excellent!  I'll close my older version of the same thing.

If someone is feeling eager, many callers could change to
try_then_request_module(), eg:

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.69-bk13/drivers/net/ppp_generic.c working-2.5.69-bk13-try/drivers/net/ppp_generic.c
--- linux-2.5.69-bk13/drivers/net/ppp_generic.c	2003-05-19 10:53:44.000000000 +1000
+++ working-2.5.69-bk13-try/drivers/net/ppp_generic.c	2003-05-19 11:38:40.000000000 +1000
@@ -1959,13 +1959,8 @@ ppp_set_compress(struct ppp *ppp, unsign
 	    || ccp_option[1] < 2 || ccp_option[1] > data.length)
 		goto out;
 
-	cp = find_compressor(ccp_option[0]);
-#ifdef CONFIG_KMOD
-	if (cp == 0) {
-		request_module("ppp-compress-%d", ccp_option[0]);
-		cp = find_compressor(ccp_option[0]);
-	}
-#endif /* CONFIG_KMOD */
+	cp = try_then_request_module(find_compressor(ccp_option[0]),
+				     "ppp-compress-%d", ccp_option[0]);
 	if (cp == 0)
 		goto out;
 

Thanks!
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-05-21 23:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-19  1:41 try_then_request_module Rusty Russell
2003-05-19  9:08 ` try_then_request_module Ingo Oeser
2003-05-19 18:50   ` try_then_request_module Riley Williams
2003-05-20  7:39     ` try_then_request_module Ingo Oeser
2003-05-21 23:18       ` try_then_request_module Riley Williams
2003-05-20  0:19   ` try_then_request_module Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox