From ebb5d1455cd5f2d78b75a6710c190fef3eb4aede Mon Sep 17 00:00:00 2001 From: KubaTaba1uga Date: Mon, 3 Mar 2025 17:25:29 +0100 Subject: [PATCH] fix clang compilation error --- drivers/dma-buf/heaps/system_heap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/dma-buf/heaps/system_heap.c +++ b/drivers/dma-buf/heaps/system_heap.c @@ -51,10 +51,11 @@ static gfp_t order_flags[] = {HIGH_ORDER * of order 0 pages can significantly improve the performance of many IOMMUs * by reducing TLB pressure and time spent updating page tables. */ -static const unsigned int orders[] = {8, 4, 0}; +#define MAX_ORDERS_VALUE 8 +static const unsigned int orders[] = {MAX_ORDERS_VALUE, 4, 0}; #define NUM_ORDERS ARRAY_SIZE(orders) -static unsigned int module_max_order = orders[0]; +static unsigned int module_max_order = MAX_ORDERS_VALUE; module_param_named(max_order, module_max_order, uint, 0400); MODULE_PARM_DESC(max_order, "Maximum allocation order override.");