not off-topic, it's a tooling question that includes C code because the OP is actually attempting to ask a high-quality question, it's not a question about how to write C code (also, I'm not sure where we draw the line, but if it
were asking about a problem in the code of the OP's kernel module, it is not obvious to me that this would be viewed as outside "Development on Ubuntu" as we usually understand it).