summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-03-24 19:56:26 +0300
committerBjorn Helgaas <bhelgaas@google.com>2026-03-27 18:19:07 +0300
commit66475b5dc4e4f88f1ed6f403067e08bd90286af5 (patch)
treea38ad9d5ecc3f79c9c5bdde59462d1c26a923550
parentf699bcc8bcdf99565928a7b1fc7ee656f6c81815 (diff)
downloadlinux-66475b5dc4e4f88f1ed6f403067e08bd90286af5.tar.xz
resource: Rename 'tmp' variable to 'full_avail'
__find_resource_space() has variable called 'tmp'. Rename it to 'full_avail' to better indicate its purpose. 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-4-ilpo.jarvinen@linux.intel.com
-rw-r--r--kernel/resource.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 1b8d3101bdc6..8c5fcb30fc33 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -727,39 +727,39 @@ static int __find_resource_space(struct resource *root, struct resource *old,
struct resource_constraint *constraint)
{
struct resource *this = root->child;
- struct resource tmp = *new, avail, alloc;
+ struct resource full_avail = *new, avail, alloc;
resource_alignf alignf = constraint->alignf;
- tmp.start = root->start;
+ full_avail.start = root->start;
/*
* Skip past an allocated resource that starts at 0, since the assignment
- * of this->start - 1 to tmp->end below would cause an underflow.
+ * of this->start - 1 to full_avail->end below would cause an underflow.
*/
if (this && this->start == root->start) {
- tmp.start = (this == old) ? old->start : this->end + 1;
+ full_avail.start = (this == old) ? old->start : this->end + 1;
this = this->sibling;
}
for(;;) {
if (this)
- tmp.end = (this == old) ? this->end : this->start - 1;
+ full_avail.end = (this == old) ? this->end : this->start - 1;
else
- tmp.end = root->end;
+ full_avail.end = root->end;
- if (tmp.end < tmp.start)
+ if (full_avail.end < full_avail.start)
goto next;
- resource_clip(&tmp, constraint->min, constraint->max);
- arch_remove_reservations(&tmp);
+ resource_clip(&full_avail, constraint->min, constraint->max);
+ arch_remove_reservations(&full_avail);
/* Check for overflow after ALIGN() */
- avail.start = ALIGN(tmp.start, constraint->align);
- avail.end = tmp.end;
+ avail.start = ALIGN(full_avail.start, constraint->align);
+ avail.end = full_avail.end;
avail.flags = new->flags;
- if (avail.start >= tmp.start) {
+ if (avail.start >= full_avail.start) {
alloc.flags = avail.flags;
if (alignf) {
alloc.start = alignf(constraint->alignf_data,
- &avail, &tmp,
+ &avail, &full_avail,
size, constraint->align);
} else {
alloc.start = avail.start;
@@ -777,7 +777,7 @@ next: if (!this || this->end == root->end)
break;
if (this != old)
- tmp.start = this->end + 1;
+ full_avail.start = this->end + 1;
this = this->sibling;
}
return -EBUSY;