Dead & Dying interfaces
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
Signature · 1 line
Revolutions do not require corporate support.
Quoted 5 lines · Matthew Wilcox
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
Quoted 11 lines · Matthew Wilcox
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
-> usewait_eventinterfaces
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
Quoted 3 lines · Matthew Wilcox
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
Quoted 8 lines · Greg KH
Quoted 3 lines · Matthew Wilcox
pcibios_*
->Documentation/pci.txtI 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
Quoted 3 lines · Matthew Wilcox
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
Signature · 2 lines
| Dave Jones. http://www.codemonkey.org.uk | SuSE Labs
Quoted 11 lines · Dave Jones
Quoted 3 lines · Matthew Wilcox
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 ofcheck_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).
Quoted 1 line
Dave
cu
Adrian
Signature · 4 lines
"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 SeedQuoted 5 lines · Matthew Wilcox
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