diff options
author | Mark Brown <broonie@kernel.org> | 2025-05-01 14:43:44 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-05-01 14:43:44 +0900 |
commit | 844af9911a5d1dc41f3478dc312a404b38cbc83b (patch) | |
tree | d6aef04723f2265235c3d7fb846e522269bacbab /mm/compaction.c | |
parent | 7f91f012c1df07af6b915d1f8cece202774bb50e (diff) | |
parent | cce34d113e2a592806abcdc02c7f8513775d8b20 (diff) |
ASoC: stm32: sai: fix kernel rate configuration
Merge series from Olivier Moysan <olivier.moysan@foss.st.com>:
This patchset adds some checks on kernel minimum rate requirements.
This avoids potential clock rate misconfiguration, when setting the
kernel frequency on STM32MP2 SoCs.
Diffstat (limited to 'mm/compaction.c')
-rw-r--r-- | mm/compaction.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index 139f00c0308a..ca71fd3c3181 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -981,13 +981,13 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, } if (PageHuge(page)) { + const unsigned int order = compound_order(page); /* * skip hugetlbfs if we are not compacting for pages * bigger than its order. THPs and other compound pages * are handled below. */ if (!cc->alloc_contig) { - const unsigned int order = compound_order(page); if (order <= MAX_PAGE_ORDER) { low_pfn += (1UL << order) - 1; @@ -1011,8 +1011,8 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, /* Do not report -EBUSY down the chain */ if (ret == -EBUSY) ret = 0; - low_pfn += compound_nr(page) - 1; - nr_scanned += compound_nr(page) - 1; + low_pfn += (1UL << order) - 1; + nr_scanned += (1UL << order) - 1; goto isolate_fail; } |