Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a18b050 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

device.h: Add missing inline to #ifndef CONFIG_PRINTK dev_vprintk_emit



Also add __printf() verification for format string.

Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e5445ee6
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -895,7 +895,8 @@ extern const char *dev_driver_string(const struct device *dev);


#ifdef CONFIG_PRINTK
#ifdef CONFIG_PRINTK


extern int dev_vprintk_emit(int level, const struct device *dev,
extern __printf(3, 0)
int dev_vprintk_emit(int level, const struct device *dev,
		     const char *fmt, va_list args);
		     const char *fmt, va_list args);
extern __printf(3, 4)
extern __printf(3, 4)
int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
@@ -920,7 +921,8 @@ int _dev_info(const struct device *dev, const char *fmt, ...);


#else
#else


static int dev_vprintk_emit(int level, const struct device *dev,
static inline __printf(3, 0)
int dev_vprintk_emit(int level, const struct device *dev,
		     const char *fmt, va_list args)
		     const char *fmt, va_list args)
{ return 0; }
{ return 0; }
static inline __printf(3, 4)
static inline __printf(3, 4)