]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
resource: Rename 'tmp' variable to 'full_avail'
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 24 Mar 2026 16:56:26 +0000 (18:56 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 27 Mar 2026 15:19:07 +0000 (10:19 -0500)
__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
kernel/resource.c

index 1b8d3101bdc6ab3818ea7827f5d5474ae6628c11..8c5fcb30fc33f12f9fa722360a1965403fec3de9 100644 (file)
@@ -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;