LinuxKPI: fix -Wunused-but-set-variable warnings
Handle write-only variables by removing the unused return value from void
functions or removing the unused variables entirely.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33107