* [U-Boot] [BUG] include/net.h: warning: 'eth_is_on_demand_init' defined but not used
@ 2019-08-30 17:21 Heinrich Schuchardt
2019-09-03 18:10 ` Joe Hershberger
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2019-08-30 17:21 UTC (permalink / raw)
To: u-boot
Hello Joe,
compiling U-Boot creates dozens of warnings for include/net.h:
CC arch/arm/lib/asm-offsets.s
In file included from include/common.h:342,
from lib/asm-offsets.c:14:
include/net.h:689:28: warning: always_inline function might not be
inlinable [-Wattributes]
689 | static __always_inline int eth_is_on_demand_init(void)
| ^~~~~~~~~~~~~~~~~~~~~
include/net.h:689:28: warning: 'eth_is_on_demand_init' defined but not
used [-Wunused-function]
HOSTCC scripts/dtc/srcpos.o
In file included from include/common.h:342,
from arch/arm/lib/asm-offsets.c:14:
include/net.h:689:28: warning: always_inline function might not be
inlinable [-Wattributes]
689 | static __always_inline int eth_is_on_demand_init(void)
| ^~~~~~~~~~~~~~~~~~~~~
include/net.h:689:28: warning: 'eth_is_on_demand_init' defined but not
used [-Wunused-function]
Software used for building U-Boot:
U-Boot HEAD, rpi_3_b_plus_defconfig
gcc (FreeBSD Ports Collection) 9.1.0
FreeBSD generic 13.0-CURRENT FreeBSD 13.0-CURRENT r351591 GENERIC arm64
Why should we create this function in every file that by chance includes
net.h?
The function is only used in drivers/net/netconsole.c and net/net.c.
One solution would be to create a dedicated include that is only
referenced in these two files.
Best regards
Heinrich
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot] [BUG] include/net.h: warning: 'eth_is_on_demand_init' defined but not used
2019-08-30 17:21 [U-Boot] [BUG] include/net.h: warning: 'eth_is_on_demand_init' defined but not used Heinrich Schuchardt
@ 2019-09-03 18:10 ` Joe Hershberger
0 siblings, 0 replies; 2+ messages in thread
From: Joe Hershberger @ 2019-09-03 18:10 UTC (permalink / raw)
To: u-boot
Hi Heinrich,
On Fri, Aug 30, 2019 at 12:21 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Hello Joe,
>
> compiling U-Boot creates dozens of warnings for include/net.h:
>
> CC arch/arm/lib/asm-offsets.s
> In file included from include/common.h:342,
> from lib/asm-offsets.c:14:
> include/net.h:689:28: warning: always_inline function might not be
> inlinable [-Wattributes]
> 689 | static __always_inline int eth_is_on_demand_init(void)
> | ^~~~~~~~~~~~~~~~~~~~~
> include/net.h:689:28: warning: 'eth_is_on_demand_init' defined but not
> used [-Wunused-function]
> HOSTCC scripts/dtc/srcpos.o
> In file included from include/common.h:342,
> from arch/arm/lib/asm-offsets.c:14:
> include/net.h:689:28: warning: always_inline function might not be
> inlinable [-Wattributes]
> 689 | static __always_inline int eth_is_on_demand_init(void)
> | ^~~~~~~~~~~~~~~~~~~~~
> include/net.h:689:28: warning: 'eth_is_on_demand_init' defined but not
> used [-Wunused-function]
>
> Software used for building U-Boot:
>
> U-Boot HEAD, rpi_3_b_plus_defconfig
> gcc (FreeBSD Ports Collection) 9.1.0
> FreeBSD generic 13.0-CURRENT FreeBSD 13.0-CURRENT r351591 GENERIC arm64
>
> Why should we create this function in every file that by chance includes
> net.h?
>
> The function is only used in drivers/net/netconsole.c and net/net.c.
>
> One solution would be to create a dedicated include that is only
> referenced in these two files.
We could, but it might also be reasonable to allow the compiler the
prerogative to inline it or not and just define it as a regular
function that can be stripped by the linker. Thoughts?
-Joe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-03 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 17:21 [U-Boot] [BUG] include/net.h: warning: 'eth_is_on_demand_init' defined but not used Heinrich Schuchardt
2019-09-03 18:10 ` Joe Hershberger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.