summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/cacheinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/cacheinfo.c')
-rw-r--r--arch/mips/kernel/cacheinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/kernel/cacheinfo.c b/arch/mips/kernel/cacheinfo.c
index a92bbbae969b..97d5239ca47b 100644
--- a/arch/mips/kernel/cacheinfo.c
+++ b/arch/mips/kernel/cacheinfo.c
@@ -17,6 +17,7 @@
/* Populates leaf and increments to next leaf */
#define populate_cache(cache, leaf, c_level, c_type) \
+do { \
leaf->type = c_type; \
leaf->level = c_level; \
leaf->coherency_line_size = c->cache.linesz; \
@@ -24,7 +25,8 @@
leaf->ways_of_associativity = c->cache.ways; \
leaf->size = c->cache.linesz * c->cache.sets * \
c->cache.ways; \
- leaf++;
+ leaf++; \
+} while (0)
static int __init_cache_level(unsigned int cpu)
{