* [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
@ 2005-08-30 17:05 Stephane Wirtel
2005-08-30 17:16 ` Stephane Wirtel
2005-08-30 17:17 ` Jesper Juhl
0 siblings, 2 replies; 9+ messages in thread
From: Stephane Wirtel @ 2005-08-30 17:05 UTC (permalink / raw)
To: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
Hi all,
Here is the first patch for kernel 2.6.13 from Linus tree.
--
Stephane Wirtel <stephane.wirtel@belgacom.net>
<stephane.wirtel@gmail.com>
[-- Attachment #2: patch_remove_deprecated_check_region.diff --]
[-- Type: text/plain, Size: 619 bytes --]
diff --git a/kernel/resource.c b/kernel/resource.c
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -465,21 +465,6 @@ struct resource * __request_region(struc
EXPORT_SYMBOL(__request_region);
-int __deprecated __check_region(struct resource *parent, unsigned long start, unsigned long n)
-{
- struct resource * res;
-
- res = __request_region(parent, start, n, "check-region");
- if (!res)
- return -EBUSY;
-
- release_resource(res);
- kfree(res);
- return 0;
-}
-
-EXPORT_SYMBOL(__check_region);
-
void __release_region(struct resource *parent, unsigned long start, unsigned long n)
{
struct resource **p;
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
2005-08-30 17:05 [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region Stephane Wirtel
@ 2005-08-30 17:16 ` Stephane Wirtel
2005-08-30 17:17 ` Jesper Juhl
1 sibling, 0 replies; 9+ messages in thread
From: Stephane Wirtel @ 2005-08-30 17:16 UTC (permalink / raw)
To: Stephane Wirtel; +Cc: Linux Kernel Mailing List
Don't apply this patch, sorry :|
Thanks
--
Stephane Wirtel <stephane.wirtel@belgacom.net>
<stephane.wirtel@gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
2005-08-30 17:05 [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region Stephane Wirtel
2005-08-30 17:16 ` Stephane Wirtel
@ 2005-08-30 17:17 ` Jesper Juhl
2005-08-30 17:21 ` Stephane Wirtel
1 sibling, 1 reply; 9+ messages in thread
From: Jesper Juhl @ 2005-08-30 17:17 UTC (permalink / raw)
To: Stephane Wirtel; +Cc: Linux Kernel Mailing List
On 8/30/05, Stephane Wirtel <stephane.wirtel@belgacom.net> wrote:
> Hi all,
>
> Here is the first patch for kernel 2.6.13 from Linus tree.
>
Take it easy. Don't kill __check_region() unless you first convert all
users of it.
And by removing __check_region() you've just broken check_region() -
There are still some drivers left that use check_region() and there's
no reason to break them.
The right approach is to identify all users of
check_region()/__check_region(), then submit patches to convert them
to use request_region instead. *Then*, when there are no more
in-kernel users left, submit patches to remove the deprecated
functions.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
2005-08-30 17:17 ` Jesper Juhl
@ 2005-08-30 17:21 ` Stephane Wirtel
2005-08-30 17:37 ` Jesper Juhl
0 siblings, 1 reply; 9+ messages in thread
From: Stephane Wirtel @ 2005-08-30 17:21 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Stephane Wirtel, Linux Kernel Mailing List
Le Tuesday 30 August 2005 a 19:08, Jesper Juhl ecrivait:
> On 8/30/05, Stephane Wirtel <stephane.wirtel@belgacom.net> wrote:
> > Hi all,
> >
> > Here is the first patch for kernel 2.6.13 from Linus tree.
> >
>
> Take it easy. Don't kill __check_region() unless you first convert all
> users of it.
> And by removing __check_region() you've just broken check_region() -
> There are still some drivers left that use check_region() and there's
> no reason to break them.
>
> The right approach is to identify all users of
> check_region()/__check_region(), then submit patches to convert them
> to use request_region instead. *Then*, when there are no more
> in-kernel users left, submit patches to remove the deprecated
> functions.
I know, I did not check with check_region, I will check all users of
check_region and I hope to send a new patch in few days.
Thanks Jesper,
--
Stephane Wirtel <stephane.wirtel@belgacom.net>
<stephane.wirtel@gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
2005-08-30 17:21 ` Stephane Wirtel
@ 2005-08-30 17:37 ` Jesper Juhl
2005-08-30 17:54 ` Muli Ben-Yehuda
2005-08-30 17:58 ` Jesper Juhl
0 siblings, 2 replies; 9+ messages in thread
From: Jesper Juhl @ 2005-08-30 17:37 UTC (permalink / raw)
To: Stephane Wirtel; +Cc: Linux Kernel Mailing List
On Tuesday 30 August 2005 19:21, Stephane Wirtel wrote:
> Le Tuesday 30 August 2005 a 19:08, Jesper Juhl ecrivait:
> > On 8/30/05, Stephane Wirtel <stephane.wirtel@belgacom.net> wrote:
> > > Hi all,
> > >
> > > Here is the first patch for kernel 2.6.13 from Linus tree.
> > >
> >
> > Take it easy. Don't kill __check_region() unless you first convert all
> > users of it.
> > And by removing __check_region() you've just broken check_region() -
> > There are still some drivers left that use check_region() and there's
> > no reason to break them.
> >
> > The right approach is to identify all users of
> > check_region()/__check_region(), then submit patches to convert them
> > to use request_region instead. *Then*, when there are no more
> > in-kernel users left, submit patches to remove the deprecated
> > functions.
>
> I know, I did not check with check_region, I will check all users of
> check_region and I hope to send a new patch in few days.
>
Here's a quick list of suspects for you :
$ find ./ -name *.[ch] | xargs -i grep -H check_region {} | awk -F: {'print $1'} | sort | uniq
./arch/ppc/platforms/hdpu.c
./arch/sparc/kernel/pcic.c
./drivers/block/floppy.c
./drivers/cdrom/isp16.c
./drivers/cdrom/sbpcd.c
./drivers/char/amiserial.c
./drivers/char/riscom8.c
./drivers/char/specialix.c
./drivers/char/watchdog/pcwd.c
./drivers/ide/pci/trm290.c
./drivers/isdn/sc/init.c
./drivers/md/dm-raid1.c
./drivers/media/radio/radio-aimslab.c
./drivers/media/radio/radio-aztech.c
./drivers/media/radio/radio-cadet.c
./drivers/media/radio/radio-gemtek.c
./drivers/media/radio/radio-rtrack2.c
./drivers/media/radio/radio-sf16fmi.c
./drivers/media/radio/radio-sf16fmr2.c
./drivers/media/radio/radio-terratec.c
./drivers/media/radio/radio-typhoon.c
./drivers/media/radio/radio-zoltrix.c
./drivers/net/arcnet/com90io.c
./drivers/net/depca.c
./drivers/net/eepro.c
./drivers/net/lance.c
./drivers/net/lne390.c
./drivers/net/tlan.c
./drivers/pnp/resource.c
./drivers/sbus/char/display7seg.c
./drivers/scsi/BusLogic.c
./drivers/scsi/advansys.c
./drivers/scsi/eata.c
./drivers/scsi/u14-34f.c
./drivers/tc/zs.c
./include/asm-m68k/sun3xflop.h
./include/asm-m68knommu/ide.h
./include/asm-parisc/ide.h
./include/asm-sparc/floppy.h
./include/linux/ioport.h
./kernel/resource.c
./sound/oss/aci.c
./sound/oss/ad1816.c
./sound/oss/aedsp16.c
./sound/oss/opl3.c
./sound/oss/pss.c
./sound/oss/trident.c
./sound/oss/uart401.c
./sound/oss/wavefront.mod.c
./sound/oss/wavfront.c
And please test your patches before submitting them.
As a minimum compile test any code you change and any code impacted by your
changes.
Also boot a kernel with the changes applied to make sure nothing blows up at
runtime.
And if possible (if you have the hardware), test that the drivers still work
properly. If you don't have hardware to test with then you can at least still
try loading the drivers and see if they fail in a sane manner (no hardware
detected) or if they blow up.
When submitting a patch, please always provide a description of what change
the patch makes and why it makes sense to make that change. Also tell what
level of testing the patch has seen - and remember to Cc: maintainers/authors
of the code you change in addition to sending to the list.
And patches are generally preffered inline as opposed to attachments, as
should be clear from the documents I pointed you at yesterday.
--
Jesper Juhl
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
2005-08-30 17:37 ` Jesper Juhl
@ 2005-08-30 17:54 ` Muli Ben-Yehuda
2005-08-30 19:03 ` Muli Ben-Yehuda
2005-08-30 17:58 ` Jesper Juhl
1 sibling, 1 reply; 9+ messages in thread
From: Muli Ben-Yehuda @ 2005-08-30 17:54 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Stephane Wirtel, Linux Kernel Mailing List
On Tue, Aug 30, 2005 at 07:37:59PM +0200, Jesper Juhl wrote:
> Here's a quick list of suspects for you :
[snip]
> ./sound/oss/trident.c
I'll take care of this one.
Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
2005-08-30 17:37 ` Jesper Juhl
2005-08-30 17:54 ` Muli Ben-Yehuda
@ 2005-08-30 17:58 ` Jesper Juhl
1 sibling, 0 replies; 9+ messages in thread
From: Jesper Juhl @ 2005-08-30 17:58 UTC (permalink / raw)
To: Stephane Wirtel; +Cc: Linux Kernel Mailing List
On 8/30/05, Jesper Juhl <jesper.juhl@gmail.com> wrote:
[snip]
> Here's a quick list of suspects for you :
>
Just a quick note: don't forget that regions reserved with
request_region() have to be freed by release_region() when no longer
needed.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
2005-08-30 17:54 ` Muli Ben-Yehuda
@ 2005-08-30 19:03 ` Muli Ben-Yehuda
2005-08-30 19:23 ` Jesper Juhl
0 siblings, 1 reply; 9+ messages in thread
From: Muli Ben-Yehuda @ 2005-08-30 19:03 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Stephane Wirtel, Linux Kernel Mailing List
On Tue, Aug 30, 2005 at 08:54:59PM +0300, Muli Ben-Yehuda wrote:
> On Tue, Aug 30, 2005 at 07:37:59PM +0200, Jesper Juhl wrote:
> > Here's a quick list of suspects for you :
>
> [snip]
>
> > ./sound/oss/trident.c
>
> I'll take care of this one.
... or maybe I won't. We've been using
request_region()/release_region() since 2001 or so - your grep hit a
comment to that effect.
Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region
2005-08-30 19:03 ` Muli Ben-Yehuda
@ 2005-08-30 19:23 ` Jesper Juhl
0 siblings, 0 replies; 9+ messages in thread
From: Jesper Juhl @ 2005-08-30 19:23 UTC (permalink / raw)
To: Muli Ben-Yehuda; +Cc: Stephane Wirtel, Linux Kernel Mailing List
On 8/30/05, Muli Ben-Yehuda <mulix@mulix.org> wrote:
> On Tue, Aug 30, 2005 at 08:54:59PM +0300, Muli Ben-Yehuda wrote:
> > On Tue, Aug 30, 2005 at 07:37:59PM +0200, Jesper Juhl wrote:
> > > Here's a quick list of suspects for you :
> >
> > [snip]
> >
> > > ./sound/oss/trident.c
> >
> > I'll take care of this one.
>
> ... or maybe I won't. We've been using
> request_region()/release_region() since 2001 or so - your grep hit a
> comment to that effect.
>
Heh, yeah, I guess it probably hit a few. It was just a quick list of
suspects after all.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-08-30 19:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-30 17:05 [PATCH] 2.6.13 - 1/3 - Remove the deprecated function __check_region Stephane Wirtel
2005-08-30 17:16 ` Stephane Wirtel
2005-08-30 17:17 ` Jesper Juhl
2005-08-30 17:21 ` Stephane Wirtel
2005-08-30 17:37 ` Jesper Juhl
2005-08-30 17:54 ` Muli Ben-Yehuda
2005-08-30 19:03 ` Muli Ben-Yehuda
2005-08-30 19:23 ` Jesper Juhl
2005-08-30 17:58 ` Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox