When testing with clang 3.6.0, I got the following -Wcast-qual warnings in sys/dev/drm2:
sys/dev/drm2/radeon/ni.c:193:23: error: cast from 'unsigned int const (*)[29][2]' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] io_mc_regs = (u32 *)&barts_io_mc_regs; ^ sys/dev/drm2/radeon/ni.c:198:23: error: cast from 'unsigned int const (*)[29][2]' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] io_mc_regs = (u32 *)&turks_io_mc_regs; ^ sys/dev/drm2/radeon/ni.c:204:23: error: cast from 'unsigned int const (*)[29][2]' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] io_mc_regs = (u32 *)&caicos_io_mc_regs; ^ sys/dev/drm2/radeon/ni.c:209:23: error: cast from 'unsigned int const (*)[29][2]' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] io_mc_regs = (u32 *)&cayman_io_mc_regs; ^ sys/dev/drm2/radeon/si.c:193:23: error: cast from 'unsigned int const (*)[36][2]' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] io_mc_regs = (u32 *)&tahiti_io_mc_regs; ^ sys/dev/drm2/radeon/si.c:198:23: error: cast from 'unsigned int const (*)[36][2]' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] io_mc_regs = (u32 *)&pitcairn_io_mc_regs; ^ sys/dev/drm2/radeon/si.c:204:23: error: cast from 'unsigned int const (*)[36][2]' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] io_mc_regs = (u32 *)&verde_io_mc_regs; ^
Since the arrays pointed to by the local io_mc_regs variables are only ever read from, it should be no problem to make io_mc_regs a const u32 *, and change the casts accordingly.