Skip to content

Commit 82caeb6

Browse files
akpm00sfrothwell
authored andcommitted
mm-cma-silence-warnings-due-to-max-usage-checkpatch-fixes
WARNING: line over 80 characters torvalds#128: FILE: mm/cma.c:186: + alignment = PAGE_SIZE << max_t(unsigned long, MAX_ORDER - 1, pageblock_order); WARNING: line over 80 characters torvalds#137: FILE: mm/cma.c:270: + (phys_addr_t)PAGE_SIZE << max_t(unsigned long, MAX_ORDER - 1, pageblock_order)); total: 0 errors, 2 warnings, 16 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/mm-cma-silence-warnings-due-to-max-usage.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Stephen Rothwell <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent eaceb0e commit 82caeb6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mm/cma.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
183183
return -EINVAL;
184184

185185
/* ensure minimal alignment required by mm core */
186-
alignment = PAGE_SIZE << max_t(unsigned long, MAX_ORDER - 1, pageblock_order);
186+
alignment = PAGE_SIZE <<
187+
max_t(unsigned long, MAX_ORDER - 1, pageblock_order);
187188

188189
/* alignment should be aligned with order_per_bit */
189190
if (!IS_ALIGNED(alignment >> PAGE_SHIFT, 1 << order_per_bit))
@@ -266,8 +267,8 @@ int __init cma_declare_contiguous(phys_addr_t base,
266267
* migratetype page by page allocator's buddy algorithm. In the case,
267268
* you couldn't get a contiguous memory, which is not what we want.
268269
*/
269-
alignment = max(alignment,
270-
(phys_addr_t)PAGE_SIZE << max_t(unsigned long, MAX_ORDER - 1, pageblock_order));
270+
alignment = max(alignment, (phys_addr_t)PAGE_SIZE <<
271+
max_t(unsigned long, MAX_ORDER - 1, pageblock_order));
271272
base = ALIGN(base, alignment);
272273
size = ALIGN(size, alignment);
273274
limit &= ~(alignment - 1);

0 commit comments

Comments
 (0)