]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
env_callback.h: spl: mark callback as maybe_unused
authorJeroen Hofstee <jeroen@myspectrum.nl>
Thu, 10 Jul 2014 18:38:35 +0000 (20:38 +0200)
committerTom Rini <trini@ti.com>
Fri, 18 Jul 2014 21:53:23 +0000 (17:53 -0400)
When static inline is used in a header file the function
should preferably be inlined and if not possible made a
static function. When declared inside a c file there is a
static function, which might be inlined. Since SPL uses a
define to declare the static inline it becomes part of the
c file although it is declared in a header and clang will
warn that you have introduced unused static functions. Add
maybe_unused to prevent such warnings.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
include/env_callback.h

index f90a7fa3b6463a8cd0b5ffa2c6f8002197567af3..ab4e115fb0678b280dfe3ce04bdafa4ed4c7f302 100644 (file)
@@ -60,7 +60,7 @@ void env_callback_init(ENTRY *var_entry);
  */
 #ifdef CONFIG_SPL_BUILD
 #define U_BOOT_ENV_CALLBACK(name, callback) \
-       static inline void _u_boot_env_noop_##name(void) \
+       static inline __maybe_unused void _u_boot_env_noop_##name(void) \
        { \
                (void)callback; \
        }