]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
resource: Add __resource_contains_unbound() for internal contains checks
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 24 Mar 2026 16:56:24 +0000 (18:56 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 26 Mar 2026 20:00:39 +0000 (15:00 -0500)
commitedfaa81d5da5fbfe3c73fece3ca0417a04cc4ba2
tree4fc57cb01ad00e0b575e34cbb5110e2ecd3ed139
parent1ee4716a5a28eaef81ae1f280d983258bee49623
resource: Add __resource_contains_unbound() for internal contains checks

__find_resource_space() currently uses resource_contains() but for
tentative resources that are not yet crafted into the resource tree. As
resource_contains() checks that IORESOURCE_UNSET is not set for either of
the resources, the caller has to hack around this problem by clearing the
IORESOURCE_UNSET flag (essentially lying to resource_contains()).

Instead of the hack, introduce __resource_contains_unbound() for cases like
this.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Xifer <xiferdev@gmail.com>
Link: https://patch.msgid.link/20260324165633.4583-2-ilpo.jarvinen@linux.intel.com
include/linux/ioport.h
kernel/resource.c