Skip to contentSkip to conversation

check_region question

Kernel-janitors Domen Puncer 3 participants 3 messages Jun 28, 2004 – Jul 5, 2004 Kernel janitors

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines · Carlo Perassi

Hi
compiling a new 2.6.7 I got drivers/ide/pci/trm290.c:376: warning: check_region' is deprecated drivers/char/specialix.c:290: warning: check_region' is deprecated

So I searched and found (see the end of the email) a lot of places where that call occours.
I guess this is not (always) a "search/replace" task so my question is

Quoted 14 lines

(a)
if a call like
check_region(s, n)
should be replaced with
request_region(s, n, name)
(where name is something like hwif->name)
and
(b)
if an if statement like
if (check_region(s, n))
should be replaced with
if (!request_region(s, n, name))
is there something more than ((a) + (b)) to convert a deprecated section of code?

It's not that simple.
There's been some recent discussion about this here, and i'm sure you can find old check_region patches which were wrong, and a nice description of what is wrong.

Basically, check_region() was used before request_region(), now you have to check you didn't request a region that you shouldn't. And that request_region() that was in code before usually get's removed. (I hope i make some sense)

Quoted 5 lines

I found some old patches which should be good examples but I don't know this topic enough to make a general theory.

Thanks.

...

Quoted 2 lines

sound/oss/waveartist.c:1349
sound/oss/pss.c:191

...
Don't bother with these, they'll probably get removed in 2.7.x

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 4 lines

It's not that simple.
There's been some recent discussion about this here, and i'm sure you can find old check_region patches which were wrong, and a nice description of what is wrong.

One of the best I found is
http://lists.osdl.org/pipermail/kernel-janitors/2004-January/000346.html
but I found it this afternoon (CET).
Thanks.

Signature · 2 lines
Carlo Perassi - http://www.linux.it/~carlo/
I don't use fancy debuggers, I use print statements (Brian Kernighan)

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors