linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/kaslr: Assign boolean values to a bool variable
@ 2021-03-09  9:59 Jiapeng Chong
  2021-03-19 12:31 ` [tip: x86/cleanups] x86/kaslr: Return boolean values from a function returning bool tip-bot2 for Jiapeng Chong
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-03-09  9:59 UTC (permalink / raw)
  To: tglx; +Cc: mingo, bp, x86, hpa, linux-kernel, Jiapeng Chong

Fix the following coccicheck warnings:

./arch/x86/boot/compressed/kaslr.c:642:10-11: WARNING: return of 0/1 in
function 'process_mem_region' with return type bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 arch/x86/boot/compressed/kaslr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index b92fffb..e366907 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -639,9 +639,9 @@ static bool process_mem_region(struct mem_vector *region,
 
 		if (slot_area_index == MAX_SLOT_AREA) {
 			debug_putstr("Aborted e820/efi memmap scan (slot_areas full)!\n");
-			return 1;
+			return true;
 		}
-		return 0;
+		return false;
 	}
 
 #if defined(CONFIG_MEMORY_HOTREMOVE) && defined(CONFIG_ACPI)
-- 
1.8.3.1


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

* [tip: x86/cleanups] x86/kaslr: Return boolean values from a function returning bool
  2021-03-09  9:59 [PATCH] x86/kaslr: Assign boolean values to a bool variable Jiapeng Chong
@ 2021-03-19 12:31 ` tip-bot2 for Jiapeng Chong
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Jiapeng Chong @ 2021-03-19 12:31 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Abaci Robot, Jiapeng Chong, Borislav Petkov, x86, linux-kernel

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     21d6a7dcbfba5e7b31f4e9d555a9be362578bfc3
Gitweb:        https://git.kernel.org/tip/21d6a7dcbfba5e7b31f4e9d555a9be362578bfc3
Author:        Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
AuthorDate:    Tue, 09 Mar 2021 17:59:23 +08:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Fri, 19 Mar 2021 13:25:07 +01:00

x86/kaslr: Return boolean values from a function returning bool

Fix the following coccicheck warnings:

  ./arch/x86/boot/compressed/kaslr.c:642:10-11: WARNING: return of 0/1 in
  function 'process_mem_region' with return type bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/1615283963-67277-1-git-send-email-jiapeng.chong@linux.alibaba.com
---
 arch/x86/boot/compressed/kaslr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index b92fffb..e366907 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -639,9 +639,9 @@ static bool process_mem_region(struct mem_vector *region,
 
 		if (slot_area_index == MAX_SLOT_AREA) {
 			debug_putstr("Aborted e820/efi memmap scan (slot_areas full)!\n");
-			return 1;
+			return true;
 		}
-		return 0;
+		return false;
 	}
 
 #if defined(CONFIG_MEMORY_HOTREMOVE) && defined(CONFIG_ACPI)

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

end of thread, other threads:[~2021-03-19 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09  9:59 [PATCH] x86/kaslr: Assign boolean values to a bool variable Jiapeng Chong
2021-03-19 12:31 ` [tip: x86/cleanups] x86/kaslr: Return boolean values from a function returning bool tip-bot2 for Jiapeng Chong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).