DEBUG is a kernel configuration flag and if used cpufreq_dt.c will fail the build of kernel.
Build kernel with / without DEBUG flag. I defined it in sys/arm/conf/std.armv7.
Can you leave the if 0 ? I don't like having those printfs if debug is set.
Change to #if 0 instead of #ifdef DEBUG as suggested from EmmanuelVadot