soc: mediatek: pwrap: use true and false for boolean values
PATCH 1/1 soc: mediatek: pwrap: use true and false for boolean values
Return statements in functions returning bool should use true or false instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- drivers/soc/mediatek/mtk-pmic-wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/mediatek/mtk-pmic-wrap.c +1 -1
@@ -1096,7 +1096,7 @@ static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp) ret =pwrap_read (wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_RDY ], &rdata);if (ret) -return 0 ; +return false;return rdata ==1 ; }
Signature · 1 line
2.7.4
Quoted 15 lines · Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/soc/mediatek/mtk-pmic-wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/soc/mediatek/mtk-pmic-wrap.c +0
-0
drivers/soc/mediatek/mtk-pmic-wrap.c static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp) · line 1100
Quoted 6 lines
drivers/soc/mediatek/mtk-pmic-wrap.c +1
-1@@ -1096,7 +1096,7 @@ static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp) ret =pwrap_read (wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_RDY ], &rdata);if (ret) -return 0 ; +return false;
Acked-by Sean Wang <[email protected]>
Quoted 2 lines
drivers/soc/mediatek/mtk-pmic-wrap.c +0
-0return rdata ==1 ; }
Quoted 7 lines · Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by Gustavo A. R. Silva <[email protected]>---
Applied, thanks!
Matthias
Quoted 17 lines
drivers/soc/mediatek/mtk-pmic-wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/soc/mediatek/mtk-pmic-wrap.c +1
-1@@ -1096,7 +1096,7 @@ static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp) ret =pwrap_read (wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_RDY ], &rdata);if (ret) -return 0 ; +return false;return rdata ==1 ; }