mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* tinyconfig: kernel/time/timekeeping.c:286:1: error: no return statement in function returning non-void [-Werror=return-type]
@ 2024-04-10 10:56 Naresh Kamboju
  2024-04-10 13:03 ` Adrian Hunter
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2024-04-10 10:56 UTC (permalink / raw)
  To: open list, lkft-triage, Linux Regressions
  Cc: Thomas Gleixner, Adrian Hunter, Stephen Boyd, John Stultz,
	Arnd Bergmann, Dan Carpenter, Anders Roxell

The powerpc,s390, superSh and sparc tinyconfig builds failed due to
following build
warnings / errors on the Linux next-20240410 with gcc-13 and gcc-11.

List build failures:
---
* s390, build
  - gcc-13-tinyconfig - failed
  - gcc-8-tinyconfig - failed

* sh, build
  - gcc-11-tinyconfig - failed

* sparc, build
  - gcc-11-tinyconfig - failed

* mips, build
  - gcc-12-tinyconfig - failed
  - gcc-8-tinyconfig - failed

* powerpc, build
  - gcc-13-tinyconfig - failed
  - gcc-8-tinyconfig - failed

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build log:
--------
kernel/time/timekeeping.c: In function 'timekeeping_debug_get_ns':
kernel/time/timekeeping.c:286:1: error: no return statement in
function returning non-void [-Werror=return-type]
  286 | }
      | ^
cc1: some warnings being treated as errors

steps to reproduce:
---
# tuxmake --runtime podman --target-arch powerpc --toolchain gcc-13
--kconfig tinyconfig

Links:
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240410/testrun/23380322/suite/build/test/gcc-13-tinyconfig/details/
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240410/testrun/23380301/suite/build/test/gcc-11-tinyconfig/history/
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240410/testrun/23380301/suite/build/tests/

--
Linaro LKFT
https://lkft.linaro.org

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

* Re: tinyconfig: kernel/time/timekeeping.c:286:1: error: no return statement in function returning non-void [-Werror=return-type]
  2024-04-10 10:56 tinyconfig: kernel/time/timekeeping.c:286:1: error: no return statement in function returning non-void [-Werror=return-type] Naresh Kamboju
@ 2024-04-10 13:03 ` Adrian Hunter
  2024-04-10 15:35   ` Adrian Hunter
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2024-04-10 13:03 UTC (permalink / raw)
  To: Naresh Kamboju, open list, lkft-triage, Linux Regressions
  Cc: Thomas Gleixner, Stephen Boyd, John Stultz, Arnd Bergmann,
	Dan Carpenter, Anders Roxell

On 10/04/24 13:56, Naresh Kamboju wrote:
> The powerpc,s390, superSh and sparc tinyconfig builds failed due to
> following build
> warnings / errors on the Linux next-20240410 with gcc-13 and gcc-11.
> 
> List build failures:
> ---
> * s390, build
>   - gcc-13-tinyconfig - failed
>   - gcc-8-tinyconfig - failed
> 
> * sh, build
>   - gcc-11-tinyconfig - failed
> 
> * sparc, build
>   - gcc-11-tinyconfig - failed
> 
> * mips, build
>   - gcc-12-tinyconfig - failed
>   - gcc-8-tinyconfig - failed
> 
> * powerpc, build
>   - gcc-13-tinyconfig - failed
>   - gcc-8-tinyconfig - failed
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Build log:
> --------
> kernel/time/timekeeping.c: In function 'timekeeping_debug_get_ns':
> kernel/time/timekeeping.c:286:1: error: no return statement in
> function returning non-void [-Werror=return-type]
>   286 | }
>       | ^
> cc1: some warnings being treated as errors

Using unreachable() in the default BUG() seems to make this go
away.

diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 6e794420bd39..891bd9b0be70 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -156,7 +156,7 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
 
 #else /* !CONFIG_BUG */
 #ifndef HAVE_ARCH_BUG
-#define BUG() do {} while (1)
+#define BUG() do { do {} while (1) ; unreachable(); } while (0)
 #endif
 
 #ifndef HAVE_ARCH_BUG_ON


> 
> steps to reproduce:
> ---
> # tuxmake --runtime podman --target-arch powerpc --toolchain gcc-13
> --kconfig tinyconfig
> 
> Links:
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240410/testrun/23380322/suite/build/test/gcc-13-tinyconfig/details/
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240410/testrun/23380301/suite/build/test/gcc-11-tinyconfig/history/
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240410/testrun/23380301/suite/build/tests/
> 
> --
> Linaro LKFT
> https://lkft.linaro.org


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

* Re: tinyconfig: kernel/time/timekeeping.c:286:1: error: no return statement in function returning non-void [-Werror=return-type]
  2024-04-10 13:03 ` Adrian Hunter
@ 2024-04-10 15:35   ` Adrian Hunter
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2024-04-10 15:35 UTC (permalink / raw)
  To: Naresh Kamboju, open list, lkft-triage, Linux Regressions
  Cc: Thomas Gleixner, Stephen Boyd, John Stultz, Arnd Bergmann,
	Dan Carpenter, Anders Roxell

On 10/04/24 16:03, Adrian Hunter wrote:
> On 10/04/24 13:56, Naresh Kamboju wrote:
>> The powerpc,s390, superSh and sparc tinyconfig builds failed due to
>> following build
>> warnings / errors on the Linux next-20240410 with gcc-13 and gcc-11.
>>
>> List build failures:
>> ---
>> * s390, build
>>   - gcc-13-tinyconfig - failed
>>   - gcc-8-tinyconfig - failed
>>
>> * sh, build
>>   - gcc-11-tinyconfig - failed
>>
>> * sparc, build
>>   - gcc-11-tinyconfig - failed
>>
>> * mips, build
>>   - gcc-12-tinyconfig - failed
>>   - gcc-8-tinyconfig - failed
>>
>> * powerpc, build
>>   - gcc-13-tinyconfig - failed
>>   - gcc-8-tinyconfig - failed
>>
>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>>
>> Build log:
>> --------
>> kernel/time/timekeeping.c: In function 'timekeeping_debug_get_ns':
>> kernel/time/timekeeping.c:286:1: error: no return statement in
>> function returning non-void [-Werror=return-type]
>>   286 | }
>>       | ^
>> cc1: some warnings being treated as errors
> 
> Using unreachable() in the default BUG() seems to make this go
> away.
> 
> diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
> index 6e794420bd39..891bd9b0be70 100644
> --- a/include/asm-generic/bug.h
> +++ b/include/asm-generic/bug.h
> @@ -156,7 +156,7 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
>  
>  #else /* !CONFIG_BUG */
>  #ifndef HAVE_ARCH_BUG
> -#define BUG() do {} while (1)
> +#define BUG() do { do {} while (1) ; unreachable(); } while (0)
>  #endif
>  
>  #ifndef HAVE_ARCH_BUG_ON
> 

Patch here:

	https://lore.kernel.org/all/20240410153212.127477-1-adrian.hunter@intel.com/



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

end of thread, other threads:[~2024-04-10 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10 10:56 tinyconfig: kernel/time/timekeeping.c:286:1: error: no return statement in function returning non-void [-Werror=return-type] Naresh Kamboju
2024-04-10 13:03 ` Adrian Hunter
2024-04-10 15:35   ` Adrian Hunter

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

all inboxes | Powered by JetHome®