aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-09-25 21:19:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-26 16:56:59 -0400
commit0a18b05043acc01d1d6a4bac459e62c79628881c (patch)
treee0a10c9327cb188d84bb42641a4f78a32e61abe4 /include/linux/device.h
parente5445ee6a62329f6eb28b8ebd8ff4c4659ca0209 (diff)
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>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 6d37e59db571..af92883bb4a6 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -895,8 +895,9 @@ extern const char *dev_driver_string(const struct device *dev);
895 895
896#ifdef CONFIG_PRINTK 896#ifdef CONFIG_PRINTK
897 897
898extern int dev_vprintk_emit(int level, const struct device *dev, 898extern __printf(3, 0)
899 const char *fmt, va_list args); 899int dev_vprintk_emit(int level, const struct device *dev,
900 const char *fmt, va_list args);
900extern __printf(3, 4) 901extern __printf(3, 4)
901int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...); 902int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
902 903
@@ -920,8 +921,9 @@ int _dev_info(const struct device *dev, const char *fmt, ...);
920 921
921#else 922#else
922 923
923static int dev_vprintk_emit(int level, const struct device *dev, 924static inline __printf(3, 0)
924 const char *fmt, va_list args) 925int dev_vprintk_emit(int level, const struct device *dev,
926 const char *fmt, va_list args)
925{ return 0; } 927{ return 0; }
926static inline __printf(3, 4) 928static inline __printf(3, 4)
927int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...) 929int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...)