We forgot to remove a lot of crap interfaces during 2.5 development.
Let's start a list now so we don't forget during 2.7.
This list is a combination of interfaces which have gone during 2.5 and
interfaces that should go during 2.7. Think of it as a `updating your
driver/filesystem to sane code' guide.
sleep_on, sleep_on_timeout, interruptible_sleep_on,
interruptible_sleep_on_timeout
-> use wait_event interfaces
flush_page_to_ram
-> Documentation/cachetlb.txt
cli, sti, save_flags
-> Documentation/cli-sti-removal.txt
pcibios_*
-> Documentation/pci.txt
virt_to_bus, bus_to_virt
-> Documentation/DMA-mapping.txt
check_region
-> Just use request_region and handle the failure
kmap
-> Use kmap_atomic instead
task queues
-> work queues
lock_kernel
-> spinlocks
smp_processor_id
-> get_cpu
--
Revolutions do not require corporate support.
On Fri, Nov 15, 2002 at 06:47:25PM +0000, Matthew Wilcox wrote:
> We forgot to remove a lot of crap interfaces during 2.5 development.
> Let's start a list now so we don't forget during 2.7.
> This list is a combination of interfaces which have gone during 2.5 and
> interfaces that should go during 2.7. Think of it as a `updating your
> driver/filesystem to sane code' guide.
It's very possible (and in fact bugfixing) to incrementally convert
callers of these interfaces, even during freezes or stable releases.
A bugfix is a bugfix. =)
Cheers,
Bill
On Fri, 2002-11-15 at 18:47, Matthew Wilcox wrote:
>
> We forgot to remove a lot of crap interfaces during 2.5 development.
> Let's start a list now so we don't forget during 2.7.
>
> This list is a combination of interfaces which have gone during 2.5 and
> interfaces that should go during 2.7. Think of it as a `updating your
> driver/filesystem to sane code' guide.
>
> sleep_on, sleep_on_timeout, interruptible_sleep_on,
> interruptible_sleep_on_timeout
> -> use wait_event interfaces
We need to fix wait_event first, probably to do event variables of some
kind (wait_nonzero_interruptible() etc).
get_cpu is the wrong thing in several places too
On Fri, Nov 15, 2002 at 06:47:25PM +0000, Matthew Wilcox wrote:
>
> pcibios_*
> -> Documentation/pci.txt
I still have patches that remove all of the instances of this. I think
it's already in the -ac kernel. I'll forward port it next week and send
it to Linus.
thanks,
greg k-h
On Sun, 2002-11-17 at 00:41, Greg KH wrote:
> On Fri, Nov 15, 2002 at 06:47:25PM +0000, Matthew Wilcox wrote:
> >
> > pcibios_*
> > -> Documentation/pci.txt
>
> I still have patches that remove all of the instances of this. I think
> it's already in the -ac kernel. I'll forward port it next week and send
> it to Linus.
Its in the -ac tree. No problems reported except the pcmcia bug which
you sent a patch for
On Fri, Nov 15, 2002 at 06:47:25PM +0000, Matthew Wilcox wrote:
> This list is a combination of interfaces which have gone during 2.5 and
> interfaces that should go during 2.7. Think of it as a `updating your
> driver/filesystem to sane code' guide.
Adding printk (KERN_DEBUG "Usage of check_region() is deprecated");
to such interfaces may be an idea. For some of them, however it
is probably a bad idea if the logs get flooded with zillions of warnings
each boot. Maybe just for the "We really should purge this crap next
time" functions ?
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
On Mon, Nov 18, 2002 at 05:55:35PM +0000, Dave Jones wrote:
> On Fri, Nov 15, 2002 at 06:47:25PM +0000, Matthew Wilcox wrote:
>
> > This list is a combination of interfaces which have gone during 2.5 and
> > interfaces that should go during 2.7. Think of it as a `updating your
> > driver/filesystem to sane code' guide.
>
> Adding printk (KERN_DEBUG "Usage of check_region() is deprecated");
> to such interfaces may be an idea. For some of them, however it
> is probably a bad idea if the logs get flooded with zillions of warnings
> each boot. Maybe just for the "We really should purge this crap next
> time" functions ?
What about a #warning? With a #warning everyone compiling this code sees
that there's something that needs updating but it doesn't flood the logs
of users (#warning was already used for linux/malloc.h in 2.4).
> Dave
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Fri, Nov 15, 2002 at 06:47:25PM +0000, Matthew Wilcox wrote:
> We forgot to remove a lot of crap interfaces during 2.5 development.
> Let's start a list now so we don't forget during 2.7.
> This list is a combination of interfaces which have gone during 2.5 and
> interfaces that should go during 2.7. Think of it as a `updating your
> driver/filesystem to sane code' guide.
do_each_thread()/for_each_process():
------------------------------------
(1) reserved for special "catastrophic" operations
e.g. OOM, killall, cap_set_all(), etc.
(2) use for_each_task_pid() or maintain lists/tables of tasks etc. instead
(3) kernel API is missing some pieces to make it avoidable for all callers
Bill