* Re: [KJ][PATCH] kj-devel.pl - comments
@ 2005-03-27 11:34 Vicente Feito
2005-03-27 19:31 ` Randy.Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Vicente Feito @ 2005-03-27 11:34 UTC (permalink / raw)
To: kernel-janitors
Great!
I'll implement those, I was also thinking on implementing this kind of
checking:
if (p)
kfree(p);
(since kfree deals with null pointers as well)
I'm not sure because some people think that is more expensive to make the call
than the check, arguing between branch prediction vs stack overhead is common
in lkml afaik, which one do you think is better?(Other people is free to go
here as well:)
I'm thinking on adding checks for intermodule and taskqueues, I don't know how
people feel about it but I believe is time to do it, since they are
deprecated but still in some places.
Vicente
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [KJ][PATCH] kj-devel.pl - comments
2005-03-27 11:34 [KJ][PATCH] kj-devel.pl - comments Vicente Feito
@ 2005-03-27 19:31 ` Randy.Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2005-03-27 19:31 UTC (permalink / raw)
To: kernel-janitors
Vicente Feito wrote:
> Great!
> I'll implement those, I was also thinking on implementing this kind of
> checking:
> if (p)
> kfree(p);
> (since kfree deals with null pointers as well)
>
> I'm not sure because some people think that is more expensive to make the call
> than the check, arguing between branch prediction vs stack overhead is common
> in lkml afaik, which one do you think is better?(Other people is free to go
> here as well:)
That debate is still raging, but it would be OK to check for it
and print a warning IMO.
> I'm thinking on adding checks for intermodule and taskqueues, I don't know how
> people feel about it but I believe is time to do it, since they are
> deprecated but still in some places.
If it's deprecated, I agree that a warning should be printed.
Here's another common problem/misuse (from a patch today):
this patch fix 3 calls to module_param_string() in
driver/media/video/tuner-core.c and drivers/media/video/tda9887.c.
In all three places, the len and the perm parameter was switched.
Patch is against 2.6.12-rc1.
Signed-off-by: Bert Wesarg <wesarg@informatik.uni-halle.de>
diff -uprN linux-2.6.12-rc1.orig/drivers/media/video/tda9887.c
linux-2.6.12-rc1/drivers/media/video/tda9887.c
--- linux-2.6.12-rc1.orig/drivers/media/video/tda9887.c 2005-03-27
14:44:23.000000000 +0200
+++ linux-2.6.12-rc1/drivers/media/video/tda9887.c 2005-03-27
14:48:06.000000000 +0200
@@ -478,9 +478,9 @@ static int tda9887_set_pinnacle(struct t
/*
---------------------------------------------------------------------- */
static char pal[] = "-";
-module_param_string(pal, pal, 0644, sizeof(pal));
+module_param_string(pal, pal, sizeof(pal), 0644);
static char secam[] = "-";
-module_param_string(secam, secam, 0644, sizeof(secam));
+module_param_string(secam, secam, sizeof(secam), 0644);
static int tda9887_fixup_std(struct tda9887 *t)
{
diff -uprN linux-2.6.12-rc1.orig/drivers/media/video/tuner-core.c
linux-2.6.12-rc1/drivers/media/video/tuner-core.c
--- linux-2.6.12-rc1.orig/drivers/media/video/tuner-core.c 2005-03-27
14:44:23.000000000 +0200
+++ linux-2.6.12-rc1/drivers/media/video/tuner-core.c 2005-03-27
14:47:17.000000000 +0200
@@ -162,7 +162,7 @@ static void set_type(struct i2c_client *
}
static char pal[] = "-";
-module_param_string(pal, pal, 0644, sizeof(pal));
+module_param_string(pal, pal, sizeof(pal), 0644);
--
~Randy
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-27 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-27 11:34 [KJ][PATCH] kj-devel.pl - comments Vicente Feito
2005-03-27 19:31 ` Randy.Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.