linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: generic: Return true/false (not 1/0) from bool functions
@ 2021-08-11  4:36 Huilong Deng
  2021-08-12 14:10 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Huilong Deng @ 2021-08-11  4:36 UTC (permalink / raw)
  To: alexandre.belloni, UNGLinuxDriver, paulburton, tsbogend
  Cc: linux-mips, linux-kernel, Huilong Deng

./arch/mips/generic/board-ocelot.c:29:9-10: WARNING: return of 0/1 in
function 'ocelot_detect' with return type bool

Signed-off-by: Huilong Deng <denghuilong@cdjrlc.com>
---
 arch/mips/generic/board-ocelot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/generic/board-ocelot.c b/arch/mips/generic/board-ocelot.c
index c238e95190ac..7115410acb4f 100644
--- a/arch/mips/generic/board-ocelot.c
+++ b/arch/mips/generic/board-ocelot.c
@@ -26,13 +26,13 @@ static __init bool ocelot_detect(void)
 	tlb_probe_hazard();
 	idx = read_c0_index();
 	if (idx < 0)
-		return 0;
+		return false;
 
 	/* A TLB entry exists, lets assume its usable and check the CHIP ID */
 	rev = __raw_readl((void __iomem *)DEVCPU_GCB_CHIP_REGS_CHIP_ID);
 
 	if ((rev & CHIP_ID_PART_ID) != OCELOT_PART_ID)
-		return 0;
+		return false;
 
 	/* Copy command line from bootloader early for Initrd detection */
 	if (fw_arg0 < 10 && (fw_arg1 & 0xFFF00000) == 0x80000000) {
@@ -44,7 +44,7 @@ static __init bool ocelot_detect(void)
 			strcpy(arcs_cmdline, prom_argv[1]);
 	}
 
-	return 1;
+	return true;
 }
 
 static void __init ocelot_earlyprintk_init(void)
-- 
2.32.0


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

* Re: [PATCH] MIPS: generic: Return true/false (not 1/0) from bool functions
  2021-08-11  4:36 [PATCH] MIPS: generic: Return true/false (not 1/0) from bool functions Huilong Deng
@ 2021-08-12 14:10 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-08-12 14:10 UTC (permalink / raw)
  To: Huilong Deng
  Cc: alexandre.belloni, UNGLinuxDriver, paulburton, linux-mips, linux-kernel

On Wed, Aug 11, 2021 at 12:36:15PM +0800, Huilong Deng wrote:
> ./arch/mips/generic/board-ocelot.c:29:9-10: WARNING: return of 0/1 in
> function 'ocelot_detect' with return type bool
> 
> Signed-off-by: Huilong Deng <denghuilong@cdjrlc.com>
> ---
>  arch/mips/generic/board-ocelot.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2021-08-12 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  4:36 [PATCH] MIPS: generic: Return true/false (not 1/0) from bool functions Huilong Deng
2021-08-12 14:10 ` Thomas Bogendoerfer

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).