struct timer_list has a function pointer callback which changed
in Linux v4.15. Since f446b7cab4507 we have a union for both
versions of the function pointer with differently typed arguments.
I was about to cut the 415 version off when I hit the following:
error: incompatible function pointer types assigning to
'void (*)(unsigned long)' from 'void (struct timer_list *)'
[-Wincompatible-function-pointer-types]
only until I relaized how many semi-native drivers are making use
(or abusing) this functionality.
I went through and started to rework the header file to conditionally
compile one version or the other depending on LINUXKPI_VERSION as that
is what we have it for. With that all the semi-native drivers relying
on the pre-4.15 behaviour now have a LINUXKPI_VERSION of 41499 set
with the additional comment.
irdma is special in the regard that it compiles with OFED but is newer
and uses the new timer KPI already, thus we define
_WANT_LKPI_TIMER_CONTAINER_OF as well.
I highly suggest that maintainers of these drivers seek a different
solution (either updated LinuxKPI or fully native) as the LinuxKPI
is out of date since Jan 2018. Once all the drivers are updated
I intend to remove the 415 backward compat hacks.
Note: I am only for consistency using the macro in linux_compat.c,
but that will always compile to the latest version and should be
trated as such.
MFC after: 15 days