remove_resource(9)
π remove_resource(9) π
okay so you found the remove_resource(9) page from the Kernel API Manual β welcome, bestie, this one's short and sweet π
β¨ NAME β¨
remove_resource β the girl whose whole job is removing a resource in the resource tree π¦
πΈ SYNOPSIS πΈ
int remove_resource (struct resource *old );
π ARGUMENTS π
oldβ the resource you wanna remove. literally that's it, that's the whole argument π«Ά
π₯ DESCRIPTION π₯
okay so first things first, the return value: it gives you 0 on success, and -EINVAL if the resource is not valid. no cap. π
so what does it actually do? it removes a resource that was previously inserted by insert_resource or insert_resource_conflict, and it moves the children (if any) up to where they were before. the way that works π β insert_resource and insert_resource_conflict insert a new resource, and move any conflicting resources down to be the children of the new resource. so remove_resource is like the un-doing, the reverse-glow-up, putting the kids back where they belong β¨
and like, who is this even for? insert_resource, insert_resource_conflict and remove_resource are intended for producers of resources, such as FW modules and bus drivers. iykyk π§
π¦ SEE ALSO π¦
- Kernel file
./kernel/resource.c request_resource_conflict(9)request_resource(9)release_resource(9)find_next_res(9)walk_iomem_res_desc(9)region_intersects(9)find_resource_space(9)reallocate_resource(9)allocate_resource(9)lookup_resource(9)insert_resource_conflict(9)insert_resource(9)insert_resource_expand_to_fit(9)adjust_resource(9)resource_alignment(9)__request_region(9)__release_region(9)release_mem_region_adjustable(9)merge_system_ram_resource(9)devm_request_resource(9)devm_release_resource(9)devm_request_free_mem_region(9)alloc_free_mem_region(9)
okay that's the whole page, go forth and un-insert your resources bestie π this one came out of ./kernel, dated October 2026 β mwah, slay, periodt πβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms