move decl out of conditional block in kernel