warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

  warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

This warning appears when I compile the driver,

The solution is to put printk after the variable definition sentence

The specific reason is not cleared, but the variable is right after printk


Read More: