reg kernel

can we return value from kernel function

No, that is not allowed. From section 6.8 of the spec:

The function using the __kernel qualifier can only have return type void in the
source code.