| 35 | #define LP_ALLOC_PROP_SCRATCH_COUNT 10000 |
| 36 | |
| 37 | static struct device_tree_node *alloc_node(void) |
| 38 | { |
| 39 | #ifndef __COREBOOT__ |
| 40 | static struct device_tree_node scratch[LP_ALLOC_NODE_SCRATCH_COUNT]; |
| 41 | static int counter = 0; |
| 42 | |
| 43 | if (counter < ARRAY_SIZE(scratch)) |
| 44 | return &scratch[counter++]; |
| 45 | #endif |
| 46 | return xzalloc(sizeof(struct device_tree_node)); |
| 47 | } |
| 48 | |
| 49 | static struct device_tree_property *alloc_prop(void) |
| 50 | { |
no outgoing calls
no test coverage detected