kernel: Fix two more -Wcast-qual warnings reported by clang.