use inline for function in kernel