* [KJ] Replacing check_region with request_region
@ 2007-01-22 14:57 Vignesh Babu BM
2007-01-22 16:00 ` Ahmed S. Darwish
2007-01-22 16:35 ` Jesper Juhl
0 siblings, 2 replies; 3+ messages in thread
From: Vignesh Babu BM @ 2007-01-22 14:57 UTC (permalink / raw)
To: kernel-janitors
Hi,
I found the following instances of check_region in the 2.6.20-rc5
code.
I also found that these files also have request_region in some parts.
So I was just wondering if they were left there for some reason....but
as part of the deprecated API they have to be removed at some point of
time right?
If they need to be changed then I would go ahead and make a patch.
Thanks...
drivers/cdrom/sbpcd.c
if (check_region(addr[1],4))
{
msg(DBG_INF,"check_region: %03X is not
free.\n",addr[1]);
continue;
}
------------------------------------------------------------------
drivers/scsi/BusLogic.c
/*
Append the list of standard BusLogic MultiMaster ISA I/O
Addresses.
*/
if (BusLogic_ProbeOptions.LimitedProbeISA ?
BusLogic_ProbeOptions.Probe330 : check_region(0x330,
BusLogic_MultiMasterAddressCount) = 0)
BusLogic_AppendProbeAddressISA(0x330);
if (BusLogic_ProbeOptions.LimitedProbeISA ?
BusLogic_ProbeOptions.Probe334 : check_region(0x334,
BusLogic_MultiMasterAddressCount) = 0)
BusLogic_AppendProbeAddressISA(0x334);
if (BusLogic_ProbeOptions.LimitedProbeISA ?
BusLogic_ProbeOptions.Probe230 : check_region(0x230,
BusLogic_MultiMasterAddressCount) = 0)
BusLogic_AppendProbeAddressISA(0x230);
if (BusLogic_ProbeOptions.LimitedProbeISA ?
BusLogic_ProbeOptions.Probe234 : check_region(0x234,
BusLogic_MultiMasterAddressCount) = 0)
BusLogic_AppendProbeAddressISA(0x234);
if (BusLogic_ProbeOptions.LimitedProbeISA ?
BusLogic_ProbeOptions.Probe130 : check_region(0x130,
BusLogic_MultiMasterAddressCount) = 0)
BusLogic_AppendProbeAddressISA(0x130);
if (BusLogic_ProbeOptions.LimitedProbeISA ?
BusLogic_ProbeOptions.Probe134 : check_region(0x134,
BusLogic_MultiMasterAddressCount) = 0)
BusLogic_AppendProbeAddressISA(0x134);
----------------------------------------------------------------
drivers/scsi/advansys.c
if (check_region(iop, ASC_IOADR_GAP) != 0) {
printk(
"AdvanSys SCSI: specified I/O Port 0x%X is busy\n", iop);
-----------------------------------------------------------------
sound/oss/pss.c
else if(check_region(pss_cdrom_port, 2))
{
printk(KERN_ERR "PSS: CDROM I/O port conflict.\n");
}
-----------------------------------------------------------------
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] Replacing check_region with request_region
2007-01-22 14:57 [KJ] Replacing check_region with request_region Vignesh Babu BM
@ 2007-01-22 16:00 ` Ahmed S. Darwish
2007-01-22 16:35 ` Jesper Juhl
1 sibling, 0 replies; 3+ messages in thread
From: Ahmed S. Darwish @ 2007-01-22 16:00 UTC (permalink / raw)
To: kernel-janitors
On Mon, Jan 22, 2007 at 08:15:26PM +0530, Vignesh Babu BM wrote:
> Hi,
> I found the following instances of check_region in the 2.6.20-rc5
> code.
> I also found that these files also have request_region in some parts.
> So I was just wondering if they were left there for some reason....but
> as part of the deprecated API they have to be removed at some point of
> time right?
> If they need to be changed then I would go ahead and make a patch.
> Thanks...
From LDD3, Chapter 9:
"Here, the return value is a negative error code if the given ports are not
available. This function is deprecated because its return value provides no
guarantee of whether an allocation would succeed; checking and later
allocating are not an atomic operation"
I think they should ..
--
Ahmed S. Darwish
http://darwish-07.blogspot.com
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] Replacing check_region with request_region
2007-01-22 14:57 [KJ] Replacing check_region with request_region Vignesh Babu BM
2007-01-22 16:00 ` Ahmed S. Darwish
@ 2007-01-22 16:35 ` Jesper Juhl
1 sibling, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2007-01-22 16:35 UTC (permalink / raw)
To: kernel-janitors
On 22/01/07, Vignesh Babu BM <vignesh.babu@wipro.com> wrote:
> Hi,
> I found the following instances of check_region in the 2.6.20-rc5
> code.
> I also found that these files also have request_region in some parts.
> So I was just wondering if they were left there for some reason....but
> as part of the deprecated API they have to be removed at some point of
> time right?
> If they need to be changed then I would go ahead and make a patch.
> Thanks...
>
Yes, check region needs to go away. But there is no rush, most of the
remaining users are in rarely used drivers and are usually used in
ways where the problematic race is very unlikely.
Just be sure you handle errors and properly release regions when the
driver is done with them etc...
--
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
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-22 16:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-22 14:57 [KJ] Replacing check_region with request_region Vignesh Babu BM
2007-01-22 16:00 ` Ahmed S. Darwish
2007-01-22 16:35 ` Jesper Juhl
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.