Linux-OMAP Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] ARM: OMAP2+: use true and false for bool variable
@ 2021-03-15  7:05 Yang Li
  2021-03-24 12:12 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-03-15  7:05 UTC (permalink / raw)
  To: tony; +Cc: linux-arm-kernel, linux-omap, linux-kernel, Yang Li

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>
---
 arch/arm/mach-omap2/powerdomain.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 1cbac76..0a5b87e 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -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;
 }
 
 /**
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: OMAP2+: use true and false for bool variable
  2021-03-15  7:05 [PATCH] ARM: OMAP2+: use true and false for bool variable Yang Li
@ 2021-03-24 12:12 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2021-03-24 12:12 UTC (permalink / raw)
  To: Yang Li; +Cc: linux-arm-kernel, linux-omap, linux-kernel

* Yang Li <yang.lee@linux.alibaba.com> [210315 09:06]:
> 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

Thanks applying into omap-for-v5.13/soc.

Tony

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15  7:05 [PATCH] ARM: OMAP2+: use true and false for bool variable Yang Li
2021-03-24 12:12 ` Tony Lindgren

Linux-OMAP Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-omap/0 linux-omap/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-omap linux-omap/ https://lore.kernel.org/linux-omap \
		linux-omap@vger.kernel.org
	public-inbox-index linux-omap

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-omap


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git