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
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to