[19.08,3/3] kernel/linux: remove unneeded local variables

Message ID 20190430140325.45537-4-bruce.richardson@intel.com
State Superseded
Delegated to: Thomas Monjalon
Headers show
  • cleanup kernel meson.build file for linux
Related show


Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson April 30, 2019, 2:03 p.m.
The local variables for the error message aren't needed, since the messages
aren't used more than once, and the indent levels are now such that the
lines printing the message are not much longer than the lines defining the
variables to hold the messages themselves. Therefore the use of the
variables is pointless.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 kernel/linux/meson.build | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)


diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
index d31fc8f80..a37c95752 100644
--- a/kernel/linux/meson.build
+++ b/kernel/linux/meson.build
@@ -3,12 +3,9 @@ 
 subdirs = ['igb_uio', 'kni']
-WARN_CROSS_COMPILE='Need "kernel_dir" option for kmod compilation when cross-compiling'
-WARN_NO_HEADERS='Cannot compile kernel modules as requested - are kernel headers installed?'
 # if we are cross-compiling we need kernel_dir specified
 if get_option('kernel_dir') == '' and meson.is_cross_build()
+	warning('Need "kernel_dir" option for kmod compilation when cross-compiling')
@@ -23,7 +20,7 @@  endif
 make_returncode = run_command('make', '-sC', kernel_dir,
 if make_returncode != 0
-	warning(WARN_NO_HEADERS)
+	warning('Cannot compile kernel modules as requested - are kernel headers installed?')