"Bjoern A. Zeeb" <bz@xxxxxxxxxxx> writes: > In order to de-const variables simply casting through (void *) is > not enough: "cast from 'const .. *' to 'void *' drops const qualifier". > Cast through (uintptr_t) as well [1] to make this compile on systems > with more strict requirements. > In addition passing const void *data to dma_map_single() also > drops the (const) qualifier. De-constify on variable on assignment > which may be overwritten later. In either case the (void *) cast > to dma_map_single() is not needed (anymore) either. > > [1] See __DECONST() in sys/sys/cdefs.h in FreeBSD > > Sponsored-by: The FreeBSD Foundation > Signed-off-by: Bjoern A. Zeeb <bz@xxxxxxxxxxx> Why are we using the const in the first place? That sounds like a bug to me. BTW, your patches are hard to read due to excessive context, I guess you are using a very large context value with diff? Our recommendation is to use git with default values, see the wiki below for more info. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches