Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Ilpo Järvinen and committed by
Bjorn Helgaas
66475b5d f699bcc8

+14 -14
+14 -14
kernel/resource.c
··· 727 727 struct resource_constraint *constraint) 728 728 { 729 729 struct resource *this = root->child; 730 - struct resource tmp = *new, avail, alloc; 730 + struct resource full_avail = *new, avail, alloc; 731 731 resource_alignf alignf = constraint->alignf; 732 732 733 - tmp.start = root->start; 733 + full_avail.start = root->start; 734 734 /* 735 735 * Skip past an allocated resource that starts at 0, since the assignment 736 - * of this->start - 1 to tmp->end below would cause an underflow. 736 + * of this->start - 1 to full_avail->end below would cause an underflow. 737 737 */ 738 738 if (this && this->start == root->start) { 739 - tmp.start = (this == old) ? old->start : this->end + 1; 739 + full_avail.start = (this == old) ? old->start : this->end + 1; 740 740 this = this->sibling; 741 741 } 742 742 for(;;) { 743 743 if (this) 744 - tmp.end = (this == old) ? this->end : this->start - 1; 744 + full_avail.end = (this == old) ? this->end : this->start - 1; 745 745 else 746 - tmp.end = root->end; 746 + full_avail.end = root->end; 747 747 748 - if (tmp.end < tmp.start) 748 + if (full_avail.end < full_avail.start) 749 749 goto next; 750 750 751 - resource_clip(&tmp, constraint->min, constraint->max); 752 - arch_remove_reservations(&tmp); 751 + resource_clip(&full_avail, constraint->min, constraint->max); 752 + arch_remove_reservations(&full_avail); 753 753 754 754 /* Check for overflow after ALIGN() */ 755 - avail.start = ALIGN(tmp.start, constraint->align); 756 - avail.end = tmp.end; 755 + avail.start = ALIGN(full_avail.start, constraint->align); 756 + avail.end = full_avail.end; 757 757 avail.flags = new->flags; 758 - if (avail.start >= tmp.start) { 758 + if (avail.start >= full_avail.start) { 759 759 alloc.flags = avail.flags; 760 760 if (alignf) { 761 761 alloc.start = alignf(constraint->alignf_data, 762 - &avail, &tmp, 762 + &avail, &full_avail, 763 763 size, constraint->align); 764 764 } else { 765 765 alloc.start = avail.start; ··· 777 777 break; 778 778 779 779 if (this != old) 780 - tmp.start = this->end + 1; 780 + full_avail.start = this->end + 1; 781 781 this = this->sibling; 782 782 } 783 783 return -EBUSY;