修订版 | 7c1860fce4e369bdcabc1f574feb6b9af19999a3 (tree) |
---|---|
时间 | 2022-07-26 15:23:54 |
作者 | Ashok Reddy Soma <ashok.reddy.soma@xili...> |
Commiter | Michal Simek |
lmb: Fix lmb property's defination under struct lmb
Under struct lmb {} the lmb property's should be defined only if
CONFIG_LMB_MEMORY_REGIONS is defined.
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c24a2b1d6f5db4eb65393f6a77fae129b30b6233.1657183534.git.michal.simek@amd.com
@@ -68,7 +68,7 @@ struct lmb_region { | ||
68 | 68 | struct lmb { |
69 | 69 | struct lmb_region memory; |
70 | 70 | struct lmb_region reserved; |
71 | -#if !IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS) | |
71 | +#if IS_ENABLED(CONFIG_LMB_MEMORY_REGIONS) | |
72 | 72 | struct lmb_property memory_regions[CONFIG_LMB_MEMORY_REGIONS]; |
73 | 73 | struct lmb_property reserved_regions[CONFIG_LMB_RESERVED_REGIONS]; |
74 | 74 | #endif |
@@ -108,7 +108,7 @@ void lmb_init(struct lmb *lmb) | ||
108 | 108 | #if IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS) |
109 | 109 | lmb->memory.max = CONFIG_LMB_MAX_REGIONS; |
110 | 110 | lmb->reserved.max = CONFIG_LMB_MAX_REGIONS; |
111 | -#else | |
111 | +#elif IS_ENABLED(CONFIG_LMB_MEMORY_REGIONS) | |
112 | 112 | lmb->memory.max = CONFIG_LMB_MEMORY_REGIONS; |
113 | 113 | lmb->reserved.max = CONFIG_LMB_RESERVED_REGIONS; |
114 | 114 | lmb->memory.region = lmb->memory_regions; |