mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-25 07:14:36 +08:00
device.h: Add missing inline to #ifndef CONFIG_PRINTK dev_vprintk_emit
Also add __printf() verification for format string. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e5445ee6a6
commit
0a18b05043
@ -895,8 +895,9 @@ 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)
|
||||||
const char *fmt, va_list args);
|
int dev_vprintk_emit(int level, const struct device *dev,
|
||||||
|
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,8 +921,9 @@ 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)
|
||||||
const char *fmt, va_list args)
|
int dev_vprintk_emit(int level, const struct device *dev,
|
||||||
|
const char *fmt, va_list args)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
static inline __printf(3, 4)
|
static inline __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, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user