ARM: OMAP2+: use true and false for bool variable
authorYang Li <yang.lee@linux.alibaba.com>
Mon, 15 Mar 2021 07:05:41 +0000 (15:05 +0800)
committerTony Lindgren <tony@atomide.com>
Wed, 24 Mar 2021 12:11:43 +0000 (14:11 +0200)
fixed the following coccicheck:
./arch/arm/mach-omap2/powerdomain.c:1205:9-10: WARNING: return of 0/1 in
function 'pwrdm_can_ever_lose_context' with return type bool

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/powerdomain.c

index 1cbac76136d464e173742e7c694dce58abd395d9..0a5b87e2a4b07368bce15b46fb2a997af335cb3c 100644 (file)
@@ -1202,26 +1202,26 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
        if (!pwrdm) {
                pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
                         __func__);
-               return 1;
+               return true;
        }
 
        if (pwrdm->pwrsts & PWRSTS_OFF)
-               return 1;
+               return true;
 
        if (pwrdm->pwrsts & PWRSTS_RET) {
                if (pwrdm->pwrsts_logic_ret & PWRSTS_OFF)
-                       return 1;
+                       return true;
 
                for (i = 0; i < pwrdm->banks; i++)
                        if (pwrdm->pwrsts_mem_ret[i] & PWRSTS_OFF)
-                               return 1;
+                               return true;
        }
 
        for (i = 0; i < pwrdm->banks; i++)
                if (pwrdm->pwrsts_mem_on[i] & PWRSTS_OFF)
-                       return 1;
+                       return true;
 
-       return 0;
+       return false;
 }
 
 /**