Skip to content
Snippets Groups Projects
Commit 0e0de24b authored by xypron.glpk@gmx.de's avatar xypron.glpk@gmx.de Committed by Tom Rini
Browse files

ddr: fsl: incorrect logical constraint in populate_memctl_options


(pdimm[0].data_width >= 32) || (pdimm[0].data_width <= 40)
is always true.

We should use && here.

The problem was indicated by cppcheck.

Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
parent ea1e3f96
No related branches found
No related tags found
No related merge requests found
...@@ -916,7 +916,7 @@ unsigned int populate_memctl_options(const common_timing_params_t *common_dimm, ...@@ -916,7 +916,7 @@ unsigned int populate_memctl_options(const common_timing_params_t *common_dimm,
if ((pdimm[0].data_width >= 64) && \ if ((pdimm[0].data_width >= 64) && \
(pdimm[0].data_width <= 72)) (pdimm[0].data_width <= 72))
popts->data_bus_width = 0; popts->data_bus_width = 0;
else if ((pdimm[0].data_width >= 32) || \ else if ((pdimm[0].data_width >= 32) && \
(pdimm[0].data_width <= 40)) (pdimm[0].data_width <= 40))
popts->data_bus_width = 1; popts->data_bus_width = 1;
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment