summaryrefslogtreecommitdiff
path: root/include/lmb.h
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2021-03-10 10:16:29 +0100
committerTom Rini <trini@konsulko.com>2021-04-22 14:09:45 -0400
commitcb1e619824f0c942ccd9b230b5f41caaf7cd91b4 (patch)
tree0bd3afda5a87643d564970a8d8f98c41d1a3960a /include/lmb.h
parent4fa0150d6c9c252af6887c55cbacd6734a40e9ab (diff)
lmb: correct size of the regions array
As in lmb_region, cnt < max and in the lmb library use region[i] only with i in 0...cnt, this region array size can be reduced by 1 element without overflow. This patch allows to reduce the struct lmb size. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Diffstat (limited to 'include/lmb.h')
-rw-r--r--include/lmb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/lmb.h b/include/lmb.h
index d3adf8ef69..898ce15d07 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -20,7 +20,7 @@ struct lmb_property {
struct lmb_region {
unsigned long cnt;
unsigned long max;
- struct lmb_property region[CONFIG_LMB_MAX_REGIONS + 1];
+ struct lmb_property region[CONFIG_LMB_MAX_REGIONS];
};
struct lmb {