On Mon, Dec 04, 2023 at 10:06:43AM +0100, Alexander Gordeev wrote: > On Thu, Nov 30, 2023 at 05:22:33PM -0700, Nathan Chancellor wrote: > > Hi Nathan, > > > When building with -Wmissing-prototypes without CONFIG_GENERIC_BUG, > > there is a warning about a missing prototype for is_valid_bugaddr(): > > > > arch/s390/kernel/traps.c:46:5: warning: no previous prototype for 'is_valid_bugaddr' [-Wmissing-prototypes] > > 46 | int is_valid_bugaddr(unsigned long addr) > > | ^~~~~~~~~~~~~~~~ > > > > The prototype is only declared with CONFIG_GENERIC_BUG, so only define > > the function under the same condition to clear up the warning, which > > matches other architectures. > > Thanks for the fix! > The patch is fine, although I have not been able to reproduce the warning. > How did you trigger it? Thanks for taking a look! I am able to trigger this on v6.7-rc4 with: # Flip off CONFIG_BUG in menuconfig $ make -skj"$(nproc)" ARCH=s390 CROSS_COMPILE=s390-linux- KCFLAGS=-Wmissing-prototypes defconfig menuconfig arch/s390/kernel/traps.o arch/s390/kernel/traps.c:46:5: warning: no previous prototype for 'is_valid_bugaddr' [-Wmissing-prototypes] 46 | int is_valid_bugaddr(unsigned long addr) | ^~~~~~~~~~~~~~~~ I initially found this by testing just the tinyconfig target. > > Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx> > > --- > > arch/s390/kernel/traps.c | 2 ++ > > 1 file changed, 2 insertions(+) > ... > > Thanks!