Makefile: Use CURDIR instead of calling the shell
Fix indentation and style issues
core: simple_strtoul -> kstrtoul
Fix include (linux/atomic.h)
Split more assignments from the "if" statements