aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slob.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slob.c')
-rw-r--r--mm/slob.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/slob.c b/mm/slob.c
index a08e4681fd0d..1e921c5e9576 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -429,7 +429,7 @@ static __always_inline void *
429__do_kmalloc_node(size_t size, gfp_t gfp, int node, unsigned long caller) 429__do_kmalloc_node(size_t size, gfp_t gfp, int node, unsigned long caller)
430{ 430{
431 unsigned int *m; 431 unsigned int *m;
432 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); 432 int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
433 void *ret; 433 void *ret;
434 434
435 gfp &= gfp_allowed_mask; 435 gfp &= gfp_allowed_mask;
@@ -502,7 +502,7 @@ void kfree(const void *block)
502 502
503 sp = virt_to_page(block); 503 sp = virt_to_page(block);
504 if (PageSlab(sp)) { 504 if (PageSlab(sp)) {
505 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); 505 int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
506 unsigned int *m = (unsigned int *)(block - align); 506 unsigned int *m = (unsigned int *)(block - align);
507 slob_free(m, *m + align); 507 slob_free(m, *m + align);
508 } else 508 } else
@@ -521,7 +521,7 @@ size_t ksize(const void *block)
521 521
522 sp = virt_to_page(block); 522 sp = virt_to_page(block);
523 if (PageSlab(sp)) { 523 if (PageSlab(sp)) {
524 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); 524 int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
525 unsigned int *m = (unsigned int *)(block - align); 525 unsigned int *m = (unsigned int *)(block - align);
526 return SLOB_UNITS(*m) * SLOB_UNIT; 526 return SLOB_UNITS(*m) * SLOB_UNIT;
527 } else 527 } else