Re: [PATCH 5.15 02/28] clocksource/drivers/ixp4xx: remove __init from ixp4xx_timer_setup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 01, 2022 at 08:31:23AM -0700, Nathan Chancellor wrote:
> Hi Greg,
> 
> On Thu, Jun 30, 2022 at 03:46:58PM +0200, Greg Kroah-Hartman wrote:
> > From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > 
> > ixp4xx_timer_setup is exported, and so can not be an __init function.
> > Remove the __init marking as the build system is rightfully claiming
> > this is an error in older kernels.
> > 
> > This is fixed "properly" in commit 41929c9f628b
> > ("clocksource/drivers/ixp4xx: Drop boardfile probe path") but that can
> > not be backported to older kernels as the reworking of the IXP4xx
> > codebase is not suitable for stable releases.
> > 
> > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
> > Cc: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> 
> This patch causes the following warnings with clang when building
> ARCH=arm allmodconfig on 5.15, 5.10, and 5.4. I am surprised nobody else
> saw them.
> 
>   WARNING: modpost: vmlinux.o(.text+0x1219ccc): Section mismatch in reference from the function ixp4xx_timer_register() to the function .init.text:sched_clock_register()
>   The function ixp4xx_timer_register() references
>   the function __init sched_clock_register().
>   This is often because ixp4xx_timer_register lacks a __init
>   annotation or the annotation of sched_clock_register is wrong.
> 
>   WARNING: modpost: vmlinux.o(.text+0x1219cf4): Section mismatch in reference from the function ixp4xx_timer_register() to the function .init.text:register_current_timer_delay()
>   The function ixp4xx_timer_register() references
>   the function __init register_current_timer_delay().
>   This is often because ixp4xx_timer_register lacks a __init
>   annotation or the annotation of register_current_timer_delay is wrong.
> 
> I think it would just be better to remove the export of
> ixp4xx_timer_setup(), rather than removing __init, as it is only called
> in arch/arm/mach-ixp4xx/common.c, which has to be built into the kernel
> image as it is 'obj-y' in arch/arm/mach-ixp4xx/Makefile.

Ah it can?  That would have been much better/easier.  I'll drop this and
go do that for the next release after this one, thanks for letting me
know as this did not show up in my local testing either.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux