Files
android_kernel_samsung_sm86…/qdf/linux
Jeff Johnson 4c5b6e76fe qcacmn: Properly abstract the Linux bottom half interfaces
When migrating to Linux Kernel v5.19 the following compilation error
was encountered:

i_qdf_defer.h:192:19: error: cast from 'qdf_defer_fn_t' (aka 'void (*)(void *)') to '__qdf_bh_fn_t' (aka 'void (*)(unsigned long)') converts to incompatible function type [-Werror,-Wcast-function-type]
        tasklet_init(bh, (__qdf_bh_fn_t) func, (unsigned long)arg);

This revealed the fact that the QDF bottom half abstraction was not
cleanly implemented. The current implementation freely typecasts the
abstracted signature:
	void (*func)(void *arg)
with the Linux-specific signature:
	void (*func)(unsigned long arg)

This has worked in the past since a void * and and unsigned long are
the same size and hence could be freely converted from one to another.
However the Linux Kernel now supports Call Flow Integrity which
requires that the function signatures must always exactly match.

To address this issue rewrite the bottom half abstraction to use an
intermediate dispatching function, exactly like is already done for
the deferred work abstraction.

Change-Id: I56b5a8ab9515033d8237302300fd6b55ea755633
CRs-Fixed: 3305515
2022-10-06 16:53:10 -07:00
..