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

drivers/crypto/fsl: remove redundant logical contraint


'A || (!A && B)' is equivalent to 'A || B'.
Let's reduce the complexity of the statement in start_jr0().

The problem was indicated by cppcheck.

Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 7a931b95
No related branches found
No related tags found
No related merge requests found
...@@ -47,8 +47,7 @@ static inline void start_jr0(uint8_t sec_idx) ...@@ -47,8 +47,7 @@ static inline void start_jr0(uint8_t sec_idx)
* VIRT_EN_INCL = 1 & VIRT_EN_POR = 0 & SEC_SCFGR_VIRT_EN = 1 * VIRT_EN_INCL = 1 & VIRT_EN_POR = 0 & SEC_SCFGR_VIRT_EN = 1
*/ */
if ((ctpr_ms & SEC_CTPR_MS_VIRT_EN_POR) || if ((ctpr_ms & SEC_CTPR_MS_VIRT_EN_POR) ||
(!(ctpr_ms & SEC_CTPR_MS_VIRT_EN_POR) && (scfgr & SEC_SCFGR_VIRT_EN))
(scfgr & SEC_SCFGR_VIRT_EN)))
sec_out32(&sec->jrstartr, CONFIG_JRSTARTR_JR0); sec_out32(&sec->jrstartr, CONFIG_JRSTARTR_JR0);
} else { } else {
/* VIRT_EN_INCL = 0 && VIRT_EN_POR_VALUE = 1 */ /* VIRT_EN_INCL = 0 && VIRT_EN_POR_VALUE = 1 */
......
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