diff mbox series

[v2,12/29] memory: emif: Put constant in comparison on the right side

Message ID 20200724074038.5597-13-krzk@kernel.org (mailing list archive)
State New, archived
Headers show
Series *memory: Cleanup, improve and compile test memory drivers | expand

Commit Message

Krzysztof Kozlowski July 24, 2020, 7:40 a.m. UTC
Fixes checkpatch warning:

    WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/emif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Krzysztof Kozlowski July 24, 2020, 2:10 p.m. UTC | #1
On Fri, Jul 24, 2020 at 09:40:21AM +0200, Krzysztof Kozlowski wrote:
> Fixes checkpatch warning:
> 
>     WARNING: Comparisons should place the constant on the right side of the test
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/memory/emif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied (and part of pull request to arm-soc).

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 58a82eea5850..97bad1588bba 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -282,7 +282,7 @@  static void set_lpmode(struct emif_data *emif, u8 lpmode)
 	 * the EMIF_PWR_MGMT_CTRL[10:8] REG_LP_MODE bit field to 0x4.
 	 */
 	if ((emif->plat_data->ip_rev == EMIF_4D) &&
-	    (EMIF_LP_MODE_PWR_DN == lpmode)) {
+	    (lpmode == EMIF_LP_MODE_PWR_DN)) {
 		WARN_ONCE(1,
 			  "REG_LP_MODE = LP_MODE_PWR_DN(4) is prohibited by"
 			  "erratum i743 switch to LP_MODE_SELF_REFRESH(2)\n");