Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incompatible pointer type error in kernel 5.15+
By the kernel 5.15+, there are new patches for ethtool. - https://patchwork.kernel.org/project/netdevbpf/list/?series=534709&state=%2A&archive=both Adding those two dummy parameters will fix the following compile error in the kernel 5.14 or below. ``` /home/awesometic/Developer/realtek-r8152-dkms/src/r8152.c:18530:18: error: initialization of ‘int (*)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_coalesce *)’ [-Werror=incompatible-pointer-types] 18530 | .get_coalesce = rtl8152_get_coalesce, | ^~~~~~~~~~~~~~~~~~~~ /home/awesometic/Developer/realtek-r8152-dkms/src/r8152.c:18530:18: note: (near initialization for ‘ops.get_coalesce’) /home/awesometic/Developer/realtek-r8152-dkms/src/r8152.c:18531:18: error: initialization of ‘int (*)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_coalesce *)’ [-Werror=incompatible-pointer-types] 18531 | .set_coalesce = rtl8152_set_coalesce, | ^~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Deokgyu Yang <[email protected]>
- Loading branch information