kernel/lockf: Make a function as printf-like and fix warnings.