mtorromeo / r8168

Linux device driver for Realtek Ethernet controllers (unofficial mirror)
https://www.realtek.com/Download/List?cate_id=584
246 stars 81 forks source link

Linux 6.9 compat: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *) #59

Open philmmanjaro opened 6 months ago

philmmanjaro commented 6 months ago

When trying to compile the driver for 6.9 kernel series it errors out with:

==> Starting build()...
make: Entering directory '/usr/lib/modules/6.9.0-rc7-1-MANJARO/build'
  CC [M]  /build/linux69-r8168/src/r8168-8.053.00/src/r8168_n.o
  CC [M]  /build/linux69-r8168/src/r8168-8.053.00/src/r8168_asf.o
  CC [M]  /build/linux69-r8168/src/r8168-8.053.00/src/rtl_eeprom.o
  CC [M]  /build/linux69-r8168/src/r8168-8.053.00/src/rtltool.o
  CC [M]  /build/linux69-r8168/src/r8168-8.053.00/src/r8168_firmware.o
/build/linux69-r8168/src/r8168-8.053.00/src/r8168_n.c:8126:20: error: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *)’ [-Werror=incompatible-pointer-types]
 8126 |         .get_eee = rtl_ethtool_get_eee,
      |                    ^~~~~~~~~~~~~~~~~~~
/build/linux69-r8168/src/r8168-8.053.00/src/r8168_n.c:8126:20: note: (near initialization for ‘rtl8168_ethtool_ops.get_eee’)
/build/linux69-r8168/src/r8168-8.053.00/src/r8168_n.c:8127:20: error: initialization of ‘int (*)(struct net_device *, struct ethtool_keee *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_eee *)’ [-Werror=incompatible-pointer-types]
 8127 |         .set_eee = rtl_ethtool_set_eee,
      |                    ^~~~~~~~~~~~~~~~~~~
/build/linux69-r8168/src/r8168-8.053.00/src/r8168_n.c:8127:20: note: (near initialization for ‘rtl8168_ethtool_ops.set_eee’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:244: /build/linux69-r8168/src/r8168-8.053.00/src/r8168_n.o] Error 1
make[1]: *** [/usr/lib/modules/6.9.0-rc7-1-MANJARO/build/Makefile:1919: /build/linux69-r8168/src/r8168-8.053.00/src] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/lib/modules/6.9.0-rc7-1-MANJARO/build'
==> ERROR: A failure occurred in build().

Most likely this change is also here needed: https://github.com/torvalds/linux/commit/031a239c2209522520936238f1d71615eb5634e0

philmmanjaro commented 6 months ago

Most likely this: https://github.com/torvalds/linux/commit/031a239c2209522520936238f1d71615eb5634e0

phoepsilonix commented 6 months ago

https://github.com/torvalds/linux/blob/a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6/include/linux/ethtool.h#L905-L906 https://github.com/torvalds/linux/commit/d80a52335374e484a4ff2afdc9af843e73273945

phoepsilonix commented 6 months ago

60