mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/e820: fix coccinelle warnings
@ 2019-07-15  2:47 Yi Wang
  2019-07-16 21:21 ` [tip:x86/urgent] x86/e820: Use proper booleans instead of 0/1 tip-bot for Yi Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Yi Wang @ 2019-07-15  2:47 UTC (permalink / raw)
  To: tglx
  Cc: mingo, bp, hpa, x86, akpm, rppt, jgross, huang.zijiang, karahmed,
	lijiang, m.mizuma, linux-kernel, xue.zhihong, wang.yi59, up2wing,
	wang.liang82

This fixes the following coccinelle warning:
./arch/x86/kernel/e820.c:89:9-10: WARNING: return of 0/1 in function '_e820__mapped_any' with return type bool

Return type bool instead of 0/1.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
 arch/x86/kernel/e820.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index e69408b..7da2bcd 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -86,9 +86,9 @@ static bool _e820__mapped_any(struct e820_table *table,
 			continue;
 		if (entry->addr >= end || entry->addr + entry->size <= start)
 			continue;
-		return 1;
+		return true;
 	}
-	return 0;
+	return false;
 }
 
 bool e820__mapped_raw_any(u64 start, u64 end, enum e820_type type)
-- 
1.8.3.1


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

* [tip:x86/urgent] x86/e820: Use proper booleans instead of 0/1
  2019-07-15  2:47 [PATCH] x86/e820: fix coccinelle warnings Yi Wang
@ 2019-07-16 21:21 ` tip-bot for Yi Wang
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Yi Wang @ 2019-07-16 21:21 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: tglx, hpa, linux-kernel, wang.yi59, mingo

Commit-ID:  f709f81483d652b4ae5bbda2204b95593ce07c8f
Gitweb:     https://git.kernel.org/tip/f709f81483d652b4ae5bbda2204b95593ce07c8f
Author:     Yi Wang <wang.yi59@zte.com.cn>
AuthorDate: Mon, 15 Jul 2019 10:47:09 +0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 16 Jul 2019 23:13:49 +0200

x86/e820: Use proper booleans instead of 0/1

This fixes the following coccinelle warning:
./arch/x86/kernel/e820.c:89:9-10: WARNING: return of 0/1 in function '_e820__mapped_any' with return type bool

Return type bool instead of 0/1.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1563158829-44373-1-git-send-email-wang.yi59@zte.com.cn

---
 arch/x86/kernel/e820.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index e69408bf664b..7da2bcd2b8eb 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -86,9 +86,9 @@ static bool _e820__mapped_any(struct e820_table *table,
 			continue;
 		if (entry->addr >= end || entry->addr + entry->size <= start)
 			continue;
-		return 1;
+		return true;
 	}
-	return 0;
+	return false;
 }
 
 bool e820__mapped_raw_any(u64 start, u64 end, enum e820_type type)

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

end of thread, other threads:[~2019-07-16 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-15  2:47 [PATCH] x86/e820: fix coccinelle warnings Yi Wang
2019-07-16 21:21 ` [tip:x86/urgent] x86/e820: Use proper booleans instead of 0/1 tip-bot for Yi Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome