aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/bug.h11
-rw-r--r--include/asm-generic/dma-mapping-common.h14
-rw-r--r--include/asm-generic/page.h4
-rw-r--r--include/drm/drmP.h10
-rw-r--r--include/linux/audit.h11
-rw-r--r--include/linux/blktrace_api.h2
-rw-r--r--include/linux/compaction.h8
-rw-r--r--include/linux/compat.h3
-rw-r--r--include/linux/device.h110
-rw-r--r--include/linux/dmar.h2
-rw-r--r--include/linux/dynamic_debug.h19
-rw-r--r--include/linux/ext3_fs.h16
-rw-r--r--include/linux/fs.h11
-rw-r--r--include/linux/fscache-cache.h8
-rw-r--r--include/linux/gameport.h8
-rw-r--r--include/linux/huge_mm.h5
-rw-r--r--include/linux/kallsyms.h5
-rw-r--r--include/linux/kdb.h9
-rw-r--r--include/linux/kernel.h55
-rw-r--r--include/linux/kexec.h4
-rw-r--r--include/linux/kmod.h4
-rw-r--r--include/linux/kobject.h26
-rw-r--r--include/linux/kthread.h4
-rw-r--r--include/linux/libata.h18
-rw-r--r--include/linux/lis3lv02d.h1
-rw-r--r--include/linux/llist.h2
-rw-r--r--include/linux/memblock.h1
-rw-r--r--include/linux/memcontrol.h3
-rw-r--r--include/linux/mm.h3
-rw-r--r--include/linux/mm_types.h14
-rw-r--r--include/linux/mmiotrace.h8
-rw-r--r--include/linux/mmzone.h13
-rw-r--r--include/linux/netdevice.h34
-rw-r--r--include/linux/oom.h1
-rw-r--r--include/linux/platform_data/leds-renesas-tpu.h14
-rw-r--r--include/linux/printk.h12
-rw-r--r--include/linux/quotaops.h2
-rw-r--r--include/linux/seq_file.h3
-rw-r--r--include/linux/shrinker.h1
-rw-r--r--include/linux/spi/l4f00242t03.h2
-rw-r--r--include/linux/string.h1
-rw-r--r--include/linux/swap.h7
-rw-r--r--include/linux/syscalls.h13
-rw-r--r--include/linux/trace_seq.h8
-rw-r--r--include/linux/vmalloc.h1
-rw-r--r--include/net/bluetooth/bluetooth.h2
-rw-r--r--include/net/netfilter/nf_log.h3
-rw-r--r--include/net/sock.h4
-rw-r--r--include/sound/core.h4
-rw-r--r--include/sound/info.h4
-rw-r--r--include/sound/seq_kernel.h4
-rw-r--r--include/trace/events/vmscan.h8
-rw-r--r--include/xen/hvc-console.h4
-rw-r--r--include/xen/xenbus.h12
54 files changed, 298 insertions, 258 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index dfb0ec666c94..84458b0c38d1 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -61,11 +61,12 @@ struct bug_entry {
61 */ 61 */
62#ifndef __WARN_TAINT 62#ifndef __WARN_TAINT
63#ifndef __ASSEMBLY__ 63#ifndef __ASSEMBLY__
64extern void warn_slowpath_fmt(const char *file, const int line, 64extern __printf(3, 4)
65 const char *fmt, ...) __attribute__((format(printf, 3, 4))); 65void warn_slowpath_fmt(const char *file, const int line,
66extern void warn_slowpath_fmt_taint(const char *file, const int line, 66 const char *fmt, ...);
67 unsigned taint, const char *fmt, ...) 67extern __printf(4, 5)
68 __attribute__((format(printf, 4, 5))); 68void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
69 const char *fmt, ...);
69extern void warn_slowpath_null(const char *file, const int line); 70extern void warn_slowpath_null(const char *file, const int line);
70#define WANT_WARN_ON_SLOWPATH 71#define WANT_WARN_ON_SLOWPATH
71#endif 72#endif
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h
index 0c80bb38773f..9fa3f96e38cf 100644
--- a/include/asm-generic/dma-mapping-common.h
+++ b/include/asm-generic/dma-mapping-common.h
@@ -123,7 +123,12 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev,
123 size_t size, 123 size_t size,
124 enum dma_data_direction dir) 124 enum dma_data_direction dir)
125{ 125{
126 dma_sync_single_for_cpu(dev, addr + offset, size, dir); 126 const struct dma_map_ops *ops = get_dma_ops(dev);
127
128 BUG_ON(!valid_dma_direction(dir));
129 if (ops->sync_single_for_cpu)
130 ops->sync_single_for_cpu(dev, addr + offset, size, dir);
131 debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);
127} 132}
128 133
129static inline void dma_sync_single_range_for_device(struct device *dev, 134static inline void dma_sync_single_range_for_device(struct device *dev,
@@ -132,7 +137,12 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
132 size_t size, 137 size_t size,
133 enum dma_data_direction dir) 138 enum dma_data_direction dir)
134{ 139{
135 dma_sync_single_for_device(dev, addr + offset, size, dir); 140 const struct dma_map_ops *ops = get_dma_ops(dev);
141
142 BUG_ON(!valid_dma_direction(dir));
143 if (ops->sync_single_for_device)
144 ops->sync_single_for_device(dev, addr + offset, size, dir);
145 debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir);
136} 146}
137 147
138static inline void 148static inline void
diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h
index 75fec18cdc59..351889d1de19 100644
--- a/include/asm-generic/page.h
+++ b/include/asm-generic/page.h
@@ -79,8 +79,8 @@ extern unsigned long memory_end;
79#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) 79#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
80#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) 80#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
81 81
82#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) 82#define virt_to_page(addr) pfn_to_page(virt_to_pfn(addr))
83#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) 83#define page_to_virt(page) pfn_to_virt(page_to_pfn(page))
84 84
85#ifndef page_to_phys 85#ifndef page_to_phys
86#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) 86#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 43538b643560..cf3b446139ea 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -122,12 +122,12 @@ struct drm_device;
122 * using the DRM_DEBUG_KMS and DRM_DEBUG. 122 * using the DRM_DEBUG_KMS and DRM_DEBUG.
123 */ 123 */
124 124
125extern __attribute__((format (printf, 4, 5))) 125extern __printf(4, 5)
126void drm_ut_debug_printk(unsigned int request_level, 126void drm_ut_debug_printk(unsigned int request_level,
127 const char *prefix, 127 const char *prefix,
128 const char *function_name, 128 const char *function_name,
129 const char *format, ...); 129 const char *format, ...);
130extern __attribute__((format (printf, 2, 3))) 130extern __printf(2, 3)
131int drm_err(const char *func, const char *format, ...); 131int drm_err(const char *func, const char *format, ...);
132 132
133/***********************************************************************/ 133/***********************************************************************/
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 0c8006129fb2..2f81c6f3b630 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -584,14 +584,13 @@ extern int audit_signals;
584#ifdef CONFIG_AUDIT 584#ifdef CONFIG_AUDIT
585/* These are defined in audit.c */ 585/* These are defined in audit.c */
586 /* Public API */ 586 /* Public API */
587extern void audit_log(struct audit_context *ctx, gfp_t gfp_mask, 587extern __printf(4, 5)
588 int type, const char *fmt, ...) 588void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
589 __attribute__((format(printf,4,5))); 589 const char *fmt, ...);
590 590
591extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type); 591extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
592extern void audit_log_format(struct audit_buffer *ab, 592extern __printf(2, 3)
593 const char *fmt, ...) 593void audit_log_format(struct audit_buffer *ab, const char *fmt, ...);
594 __attribute__((format(printf,2,3)));
595extern void audit_log_end(struct audit_buffer *ab); 594extern void audit_log_end(struct audit_buffer *ab);
596extern int audit_string_contains_control(const char *string, 595extern int audit_string_contains_control(const char *string,
597 size_t len); 596 size_t len);
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 8e9e4bc6d73b..4d1a0748eaf8 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -170,7 +170,7 @@ extern void blk_trace_shutdown(struct request_queue *);
170extern int do_blk_trace_setup(struct request_queue *q, char *name, 170extern int do_blk_trace_setup(struct request_queue *q, char *name,
171 dev_t dev, struct block_device *bdev, 171 dev_t dev, struct block_device *bdev,
172 struct blk_user_trace_setup *buts); 172 struct blk_user_trace_setup *buts);
173extern __attribute__((format(printf, 2, 3))) 173extern __printf(2, 3)
174void __trace_note_message(struct blk_trace *, const char *fmt, ...); 174void __trace_note_message(struct blk_trace *, const char *fmt, ...);
175 175
176/** 176/**
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index cc9f7a428649..bb2bbdbe5464 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -24,8 +24,6 @@ extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
24 int order, gfp_t gfp_mask, nodemask_t *mask, 24 int order, gfp_t gfp_mask, nodemask_t *mask,
25 bool sync); 25 bool sync);
26extern unsigned long compaction_suitable(struct zone *zone, int order); 26extern unsigned long compaction_suitable(struct zone *zone, int order);
27extern unsigned long compact_zone_order(struct zone *zone, int order,
28 gfp_t gfp_mask, bool sync);
29 27
30/* Do not skip compaction more than 64 times */ 28/* Do not skip compaction more than 64 times */
31#define COMPACT_MAX_DEFER_SHIFT 6 29#define COMPACT_MAX_DEFER_SHIFT 6
@@ -69,12 +67,6 @@ static inline unsigned long compaction_suitable(struct zone *zone, int order)
69 return COMPACT_SKIPPED; 67 return COMPACT_SKIPPED;
70} 68}
71 69
72static inline unsigned long compact_zone_order(struct zone *zone, int order,
73 gfp_t gfp_mask, bool sync)
74{
75 return COMPACT_CONTINUE;
76}
77
78static inline void defer_compaction(struct zone *zone) 70static inline void defer_compaction(struct zone *zone)
79{ 71{
80} 72}
diff --git a/include/linux/compat.h b/include/linux/compat.h
index c6e7523bf765..154bf5683015 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -547,7 +547,8 @@ extern ssize_t compat_rw_copy_check_uvector(int type,
547 const struct compat_iovec __user *uvector, 547 const struct compat_iovec __user *uvector,
548 unsigned long nr_segs, 548 unsigned long nr_segs,
549 unsigned long fast_segs, struct iovec *fast_pointer, 549 unsigned long fast_segs, struct iovec *fast_pointer,
550 struct iovec **ret_pointer); 550 struct iovec **ret_pointer,
551 int check_access);
551 552
552extern void __user *compat_alloc_user_space(unsigned long len); 553extern void __user *compat_alloc_user_space(unsigned long len);
553 554
diff --git a/include/linux/device.h b/include/linux/device.h
index 85e78fc7d7fd..e88abeecfadf 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -622,8 +622,8 @@ static inline const char *dev_name(const struct device *dev)
622 return kobject_name(&dev->kobj); 622 return kobject_name(&dev->kobj);
623} 623}
624 624
625extern int dev_set_name(struct device *dev, const char *name, ...) 625extern __printf(2, 3)
626 __attribute__((format(printf, 2, 3))); 626int dev_set_name(struct device *dev, const char *name, ...);
627 627
628#ifdef CONFIG_NUMA 628#ifdef CONFIG_NUMA
629static inline int dev_to_node(struct device *dev) 629static inline int dev_to_node(struct device *dev)
@@ -753,10 +753,10 @@ extern struct device *device_create_vargs(struct class *cls,
753 void *drvdata, 753 void *drvdata,
754 const char *fmt, 754 const char *fmt,
755 va_list vargs); 755 va_list vargs);
756extern struct device *device_create(struct class *cls, struct device *parent, 756extern __printf(5, 6)
757 dev_t devt, void *drvdata, 757struct device *device_create(struct class *cls, struct device *parent,
758 const char *fmt, ...) 758 dev_t devt, void *drvdata,
759 __attribute__((format(printf, 5, 6))); 759 const char *fmt, ...);
760extern void device_destroy(struct class *cls, dev_t devt); 760extern void device_destroy(struct class *cls, dev_t devt);
761 761
762/* 762/*
@@ -800,64 +800,56 @@ extern const char *dev_driver_string(const struct device *dev);
800 800
801extern int __dev_printk(const char *level, const struct device *dev, 801extern int __dev_printk(const char *level, const struct device *dev,
802 struct va_format *vaf); 802 struct va_format *vaf);
803extern int dev_printk(const char *level, const struct device *dev, 803extern __printf(3, 4)
804 const char *fmt, ...) 804int dev_printk(const char *level, const struct device *dev,
805 __attribute__ ((format (printf, 3, 4))); 805 const char *fmt, ...)
806extern int dev_emerg(const struct device *dev, const char *fmt, ...) 806 ;
807 __attribute__ ((format (printf, 2, 3))); 807extern __printf(2, 3)
808extern int dev_alert(const struct device *dev, const char *fmt, ...) 808int dev_emerg(const struct device *dev, const char *fmt, ...);
809 __attribute__ ((format (printf, 2, 3))); 809extern __printf(2, 3)
810extern int dev_crit(const struct device *dev, const char *fmt, ...) 810int dev_alert(const struct device *dev, const char *fmt, ...);
811 __attribute__ ((format (printf, 2, 3))); 811extern __printf(2, 3)
812extern int dev_err(const struct device *dev, const char *fmt, ...) 812int dev_crit(const struct device *dev, const char *fmt, ...);
813 __attribute__ ((format (printf, 2, 3))); 813extern __printf(2, 3)
814extern int dev_warn(const struct device *dev, const char *fmt, ...) 814int dev_err(const struct device *dev, const char *fmt, ...);
815 __attribute__ ((format (printf, 2, 3))); 815extern __printf(2, 3)
816extern int dev_notice(const struct device *dev, const char *fmt, ...) 816int dev_warn(const struct device *dev, const char *fmt, ...);
817 __attribute__ ((format (printf, 2, 3))); 817extern __printf(2, 3)
818extern int _dev_info(const struct device *dev, const char *fmt, ...) 818int dev_notice(const struct device *dev, const char *fmt, ...);
819 __attribute__ ((format (printf, 2, 3))); 819extern __printf(2, 3)
820int _dev_info(const struct device *dev, const char *fmt, ...);
820 821
821#else 822#else
822 823
823static inline int __dev_printk(const char *level, const struct device *dev, 824static inline int __dev_printk(const char *level, const struct device *dev,
824 struct va_format *vaf) 825 struct va_format *vaf)
825 { return 0; } 826{ return 0; }
826static inline int dev_printk(const char *level, const struct device *dev, 827static inline __printf(3, 4)
827 const char *fmt, ...) 828int dev_printk(const char *level, const struct device *dev,
828 __attribute__ ((format (printf, 3, 4))); 829 const char *fmt, ...)
829static inline int dev_printk(const char *level, const struct device *dev, 830{ return 0; }
830 const char *fmt, ...) 831
831 { return 0; } 832static inline __printf(2, 3)
832 833int dev_emerg(const struct device *dev, const char *fmt, ...)
833static inline int dev_emerg(const struct device *dev, const char *fmt, ...) 834{ return 0; }
834 __attribute__ ((format (printf, 2, 3))); 835static inline __printf(2, 3)
835static inline int dev_emerg(const struct device *dev, const char *fmt, ...) 836int dev_crit(const struct device *dev, const char *fmt, ...)
836 { return 0; } 837{ return 0; }
837static inline int dev_crit(const struct device *dev, const char *fmt, ...) 838static inline __printf(2, 3)
838 __attribute__ ((format (printf, 2, 3))); 839int dev_alert(const struct device *dev, const char *fmt, ...)
839static inline int dev_crit(const struct device *dev, const char *fmt, ...) 840{ return 0; }
840 { return 0; } 841static inline __printf(2, 3)
841static inline int dev_alert(const struct device *dev, const char *fmt, ...) 842int dev_err(const struct device *dev, const char *fmt, ...)
842 __attribute__ ((format (printf, 2, 3))); 843{ return 0; }
843static inline int dev_alert(const struct device *dev, const char *fmt, ...) 844static inline __printf(2, 3)
844 { return 0; } 845int dev_warn(const struct device *dev, const char *fmt, ...)
845static inline int dev_err(const struct device *dev, const char *fmt, ...) 846{ return 0; }
846 __attribute__ ((format (printf, 2, 3))); 847static inline __printf(2, 3)
847static inline int dev_err(const struct device *dev, const char *fmt, ...) 848int dev_notice(const struct device *dev, const char *fmt, ...)
848 { return 0; } 849{ return 0; }
849static inline int dev_warn(const struct device *dev, const char *fmt, ...) 850static inline __printf(2, 3)
850 __attribute__ ((format (printf, 2, 3))); 851int _dev_info(const struct device *dev, const char *fmt, ...)
851static inline int dev_warn(const struct device *dev, const char *fmt, ...) 852{ return 0; }
852 { return 0; }
853static inline int dev_notice(const struct device *dev, const char *fmt, ...)
854 __attribute__ ((format (printf, 2, 3)));
855static inline int dev_notice(const struct device *dev, const char *fmt, ...)
856 { return 0; }
857static inline int _dev_info(const struct device *dev, const char *fmt, ...)
858 __attribute__ ((format (printf, 2, 3)));
859static inline int _dev_info(const struct device *dev, const char *fmt, ...)
860 { return 0; }
861 853
862#endif 854#endif
863 855
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index a8b1a847c103..731a60975101 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -26,6 +26,8 @@
26#include <linux/msi.h> 26#include <linux/msi.h>
27#include <linux/irqreturn.h> 27#include <linux/irqreturn.h>
28 28
29struct acpi_dmar_header;
30
29/* DMAR Flags */ 31/* DMAR Flags */
30#define DMAR_INTR_REMAP 0x1 32#define DMAR_INTR_REMAP 0x1
31#define DMAR_X2APIC_OPT_OUT 0x2 33#define DMAR_X2APIC_OPT_OUT 0x2
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 13aae8087b56..0564e3c39882 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -37,22 +37,21 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n,
37 37
38#if defined(CONFIG_DYNAMIC_DEBUG) 38#if defined(CONFIG_DYNAMIC_DEBUG)
39extern int ddebug_remove_module(const char *mod_name); 39extern int ddebug_remove_module(const char *mod_name);
40extern int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...) 40extern __printf(2, 3)
41 __attribute__ ((format (printf, 2, 3))); 41int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);
42 42
43struct device; 43struct device;
44 44
45extern int __dynamic_dev_dbg(struct _ddebug *descriptor, 45extern __printf(3, 4)
46 const struct device *dev, 46int __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,
47 const char *fmt, ...) 47 const char *fmt, ...);
48 __attribute__ ((format (printf, 3, 4)));
49 48
50struct net_device; 49struct net_device;
51 50
52extern int __dynamic_netdev_dbg(struct _ddebug *descriptor, 51extern __printf(3, 4)
53 const struct net_device *dev, 52int __dynamic_netdev_dbg(struct _ddebug *descriptor,
54 const char *fmt, ...) 53 const struct net_device *dev,
55 __attribute__ ((format (printf, 3, 4))); 54 const char *fmt, ...);
56 55
57#define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ 56#define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \
58 static struct _ddebug __used __aligned(8) \ 57 static struct _ddebug __used __aligned(8) \
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 67a803aee619..81965cce6bfa 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -937,15 +937,15 @@ extern int ext3_group_extend(struct super_block *sb,
937 ext3_fsblk_t n_blocks_count); 937 ext3_fsblk_t n_blocks_count);
938 938
939/* super.c */ 939/* super.c */
940extern void ext3_error (struct super_block *, const char *, const char *, ...) 940extern __printf(3, 4)
941 __attribute__ ((format (printf, 3, 4))); 941void ext3_error(struct super_block *, const char *, const char *, ...);
942extern void __ext3_std_error (struct super_block *, const char *, int); 942extern void __ext3_std_error (struct super_block *, const char *, int);
943extern void ext3_abort (struct super_block *, const char *, const char *, ...) 943extern __printf(3, 4)
944 __attribute__ ((format (printf, 3, 4))); 944void ext3_abort(struct super_block *, const char *, const char *, ...);
945extern void ext3_warning (struct super_block *, const char *, const char *, ...) 945extern __printf(3, 4)
946 __attribute__ ((format (printf, 3, 4))); 946void ext3_warning(struct super_block *, const char *, const char *, ...);
947extern void ext3_msg(struct super_block *, const char *, const char *, ...) 947extern __printf(3, 4)
948 __attribute__ ((format (printf, 3, 4))); 948void ext3_msg(struct super_block *, const char *, const char *, ...);
949extern void ext3_update_dynamic_rev (struct super_block *sb); 949extern void ext3_update_dynamic_rev (struct super_block *sb);
950 950
951#define ext3_std_error(sb, errno) \ 951#define ext3_std_error(sb, errno) \
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 14493a2d5a03..7a049fd2aa4c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1633,9 +1633,10 @@ struct inode_operations {
1633struct seq_file; 1633struct seq_file;
1634 1634
1635ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, 1635ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
1636 unsigned long nr_segs, unsigned long fast_segs, 1636 unsigned long nr_segs, unsigned long fast_segs,
1637 struct iovec *fast_pointer, 1637 struct iovec *fast_pointer,
1638 struct iovec **ret_pointer); 1638 struct iovec **ret_pointer,
1639 int check_access);
1639 1640
1640extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); 1641extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
1641extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); 1642extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
@@ -2634,8 +2635,8 @@ static const struct file_operations __fops = { \
2634 .llseek = generic_file_llseek, \ 2635 .llseek = generic_file_llseek, \
2635}; 2636};
2636 2637
2637static inline void __attribute__((format(printf, 1, 2))) 2638static inline __printf(1, 2)
2638__simple_attr_check_format(const char *fmt, ...) 2639void __simple_attr_check_format(const char *fmt, ...)
2639{ 2640{
2640 /* don't do anything, just let the compiler check the arguments; */ 2641 /* don't do anything, just let the compiler check the arguments; */
2641} 2642}
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h
index af095b54502e..ce31408b1e47 100644
--- a/include/linux/fscache-cache.h
+++ b/include/linux/fscache-cache.h
@@ -492,10 +492,10 @@ static inline void fscache_end_io(struct fscache_retrieval *op,
492/* 492/*
493 * out-of-line cache backend functions 493 * out-of-line cache backend functions
494 */ 494 */
495extern void fscache_init_cache(struct fscache_cache *cache, 495extern __printf(3, 4)
496 const struct fscache_cache_ops *ops, 496void fscache_init_cache(struct fscache_cache *cache,
497 const char *idfmt, 497 const struct fscache_cache_ops *ops,
498 ...) __attribute__ ((format (printf, 3, 4))); 498 const char *idfmt, ...);
499 499
500extern int fscache_add_cache(struct fscache_cache *cache, 500extern int fscache_add_cache(struct fscache_cache *cache,
501 struct fscache_object *fsdef, 501 struct fscache_object *fsdef,
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index b65a6f472775..069ee4139105 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -78,8 +78,8 @@ static inline void gameport_register_port(struct gameport *gameport)
78 78
79void gameport_unregister_port(struct gameport *gameport); 79void gameport_unregister_port(struct gameport *gameport);
80 80
81void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) 81__printf(2, 3)
82 __attribute__ ((format (printf, 2, 3))); 82void gameport_set_phys(struct gameport *gameport, const char *fmt, ...);
83 83
84#else 84#else
85 85
@@ -93,8 +93,8 @@ static inline void gameport_unregister_port(struct gameport *gameport)
93 return; 93 return;
94} 94}
95 95
96static inline void gameport_set_phys(struct gameport *gameport, 96static inline __printf(2, 3)
97 const char *fmt, ...) 97void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
98{ 98{
99 return; 99 return;
100} 100}
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 48c32ebf65a7..a9ace9c32507 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -22,6 +22,11 @@ extern int zap_huge_pmd(struct mmu_gather *tlb,
22extern int mincore_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, 22extern int mincore_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
23 unsigned long addr, unsigned long end, 23 unsigned long addr, unsigned long end,
24 unsigned char *vec); 24 unsigned char *vec);
25extern int move_huge_pmd(struct vm_area_struct *vma,
26 struct vm_area_struct *new_vma,
27 unsigned long old_addr,
28 unsigned long new_addr, unsigned long old_end,
29 pmd_t *old_pmd, pmd_t *new_pmd);
25extern int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, 30extern int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
26 unsigned long addr, pgprot_t newprot); 31 unsigned long addr, pgprot_t newprot);
27 32
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index 0df513b7a9f8..387571959dd9 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -101,9 +101,8 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u
101#endif /*CONFIG_KALLSYMS*/ 101#endif /*CONFIG_KALLSYMS*/
102 102
103/* This macro allows us to keep printk typechecking */ 103/* This macro allows us to keep printk typechecking */
104static void __check_printsym_format(const char *fmt, ...) 104static __printf(1, 2)
105__attribute__((format(printf,1,2))); 105void __check_printsym_format(const char *fmt, ...)
106static inline void __check_printsym_format(const char *fmt, ...)
107{ 106{
108} 107}
109 108
diff --git a/include/linux/kdb.h b/include/linux/kdb.h
index 529d9a0c75a5..064725854db8 100644
--- a/include/linux/kdb.h
+++ b/include/linux/kdb.h
@@ -114,12 +114,9 @@ typedef enum {
114} kdb_reason_t; 114} kdb_reason_t;
115 115
116extern int kdb_trap_printk; 116extern int kdb_trap_printk;
117extern int vkdb_printf(const char *fmt, va_list args) 117extern __printf(1, 0) int vkdb_printf(const char *fmt, va_list args);
118 __attribute__ ((format (printf, 1, 0))); 118extern __printf(1, 2) int kdb_printf(const char *, ...);
119extern int kdb_printf(const char *, ...) 119typedef __printf(1, 2) int (*kdb_printf_t)(const char *, ...);
120 __attribute__ ((format (printf, 1, 2)));
121typedef int (*kdb_printf_t)(const char *, ...)
122 __attribute__ ((format (printf, 1, 2)));
123 120
124extern void kdb_init(int level); 121extern void kdb_init(int level);
125 122
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 8eefcf7e95eb..4c0d3b2fd5fc 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -287,6 +287,8 @@ static inline int __must_check kstrtos32_from_user(const char __user *s, size_t
287 return kstrtoint_from_user(s, count, base, res); 287 return kstrtoint_from_user(s, count, base, res);
288} 288}
289 289
290/* Obsolete, do not use. Use kstrto<foo> instead */
291
290extern unsigned long simple_strtoul(const char *,char **,unsigned int); 292extern unsigned long simple_strtoul(const char *,char **,unsigned int);
291extern long simple_strtol(const char *,char **,unsigned int); 293extern long simple_strtol(const char *,char **,unsigned int);
292extern unsigned long long simple_strtoull(const char *,char **,unsigned int); 294extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
@@ -296,20 +298,20 @@ extern long long simple_strtoll(const char *,char **,unsigned int);
296#define strict_strtoull kstrtoull 298#define strict_strtoull kstrtoull
297#define strict_strtoll kstrtoll 299#define strict_strtoll kstrtoll
298 300
299extern int sprintf(char * buf, const char * fmt, ...) 301/* lib/printf utilities */
300 __attribute__ ((format (printf, 2, 3))); 302
301extern int vsprintf(char *buf, const char *, va_list) 303extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...);
302 __attribute__ ((format (printf, 2, 0))); 304extern __printf(2, 0) int vsprintf(char *buf, const char *, va_list);
303extern int snprintf(char * buf, size_t size, const char * fmt, ...) 305extern __printf(3, 4)
304 __attribute__ ((format (printf, 3, 4))); 306int snprintf(char *buf, size_t size, const char *fmt, ...);
305extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) 307extern __printf(3, 0)
306 __attribute__ ((format (printf, 3, 0))); 308int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
307extern int scnprintf(char * buf, size_t size, const char * fmt, ...) 309extern __printf(3, 4)
308 __attribute__ ((format (printf, 3, 4))); 310int scnprintf(char *buf, size_t size, const char *fmt, ...);
309extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) 311extern __printf(3, 0)
310 __attribute__ ((format (printf, 3, 0))); 312int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
311extern char *kasprintf(gfp_t gfp, const char *fmt, ...) 313extern __printf(2, 3)
312 __attribute__ ((format (printf, 2, 3))); 314char *kasprintf(gfp_t gfp, const char *fmt, ...);
313extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); 315extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
314 316
315extern int sscanf(const char *, const char *, ...) 317extern int sscanf(const char *, const char *, ...)
@@ -374,13 +376,18 @@ extern const char hex_asc[];
374#define hex_asc_lo(x) hex_asc[((x) & 0x0f)] 376#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
375#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] 377#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
376 378
377static inline char *pack_hex_byte(char *buf, u8 byte) 379static inline char *hex_byte_pack(char *buf, u8 byte)
378{ 380{
379 *buf++ = hex_asc_hi(byte); 381 *buf++ = hex_asc_hi(byte);
380 *buf++ = hex_asc_lo(byte); 382 *buf++ = hex_asc_lo(byte);
381 return buf; 383 return buf;
382} 384}
383 385
386static inline char * __deprecated pack_hex_byte(char *buf, u8 byte)
387{
388 return hex_byte_pack(buf, byte);
389}
390
384extern int hex_to_bin(char ch); 391extern int hex_to_bin(char ch);
385extern int __must_check hex2bin(u8 *dst, const char *src, size_t count); 392extern int __must_check hex2bin(u8 *dst, const char *src, size_t count);
386 393
@@ -427,8 +434,8 @@ extern void tracing_start(void);
427extern void tracing_stop(void); 434extern void tracing_stop(void);
428extern void ftrace_off_permanent(void); 435extern void ftrace_off_permanent(void);
429 436
430static inline void __attribute__ ((format (printf, 1, 2))) 437static inline __printf(1, 2)
431____trace_printk_check_format(const char *fmt, ...) 438void ____trace_printk_check_format(const char *fmt, ...)
432{ 439{
433} 440}
434#define __trace_printk_check_format(fmt, args...) \ 441#define __trace_printk_check_format(fmt, args...) \
@@ -467,13 +474,11 @@ do { \
467 __trace_printk(_THIS_IP_, fmt, ##args); \ 474 __trace_printk(_THIS_IP_, fmt, ##args); \
468} while (0) 475} while (0)
469 476
470extern int 477extern __printf(2, 3)
471__trace_bprintk(unsigned long ip, const char *fmt, ...) 478int __trace_bprintk(unsigned long ip, const char *fmt, ...);
472 __attribute__ ((format (printf, 2, 3)));
473 479
474extern int 480extern __printf(2, 3)
475__trace_printk(unsigned long ip, const char *fmt, ...) 481int __trace_printk(unsigned long ip, const char *fmt, ...);
476 __attribute__ ((format (printf, 2, 3)));
477 482
478extern void trace_dump_stack(void); 483extern void trace_dump_stack(void);
479 484
@@ -502,8 +507,8 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
502 507
503extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); 508extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode);
504#else 509#else
505static inline int 510static inline __printf(1, 2)
506trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); 511int trace_printk(const char *fmt, ...);
507 512
508static inline void tracing_start(void) { } 513static inline void tracing_start(void) { }
509static inline void tracing_stop(void) { } 514static inline void tracing_stop(void) { }
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index fe45136b32cc..2fa0901219d4 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -140,8 +140,8 @@ void crash_save_vmcoreinfo(void);
140void crash_map_reserved_pages(void); 140void crash_map_reserved_pages(void);
141void crash_unmap_reserved_pages(void); 141void crash_unmap_reserved_pages(void);
142void arch_crash_save_vmcoreinfo(void); 142void arch_crash_save_vmcoreinfo(void);
143void vmcoreinfo_append_str(const char *fmt, ...) 143__printf(1, 2)
144 __attribute__ ((format (printf, 1, 2))); 144void vmcoreinfo_append_str(const char *fmt, ...);
145unsigned long paddr_vmcoreinfo_note(void); 145unsigned long paddr_vmcoreinfo_note(void);
146 146
147#define VMCOREINFO_OSRELEASE(value) \ 147#define VMCOREINFO_OSRELEASE(value) \
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 0da38cf7db7b..b16f65390734 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -32,8 +32,8 @@
32extern char modprobe_path[]; /* for sysctl */ 32extern char modprobe_path[]; /* for sysctl */
33/* modprobe exit status on success, -ve on error. Return value 33/* modprobe exit status on success, -ve on error. Return value
34 * usually useless though. */ 34 * usually useless though. */
35extern int __request_module(bool wait, const char *name, ...) \ 35extern __printf(2, 3)
36 __attribute__((format(printf, 2, 3))); 36int __request_module(bool wait, const char *name, ...);
37#define request_module(mod...) __request_module(true, mod) 37#define request_module(mod...) __request_module(true, mod)
38#define request_module_nowait(mod...) __request_module(false, mod) 38#define request_module_nowait(mod...) __request_module(false, mod)
39#define try_then_request_module(x, mod...) \ 39#define try_then_request_module(x, mod...) \
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 668729cc0fe9..ad81e1c51487 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -72,8 +72,8 @@ struct kobject {
72 unsigned int uevent_suppress:1; 72 unsigned int uevent_suppress:1;
73}; 73};
74 74
75extern int kobject_set_name(struct kobject *kobj, const char *name, ...) 75extern __printf(2, 3)
76 __attribute__((format(printf, 2, 3))); 76int kobject_set_name(struct kobject *kobj, const char *name, ...);
77extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, 77extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
78 va_list vargs); 78 va_list vargs);
79 79
@@ -83,15 +83,13 @@ static inline const char *kobject_name(const struct kobject *kobj)
83} 83}
84 84
85extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); 85extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
86extern int __must_check kobject_add(struct kobject *kobj, 86extern __printf(3, 4) __must_check
87 struct kobject *parent, 87int kobject_add(struct kobject *kobj, struct kobject *parent,
88 const char *fmt, ...) 88 const char *fmt, ...);
89 __attribute__((format(printf, 3, 4))); 89extern __printf(4, 5) __must_check
90extern int __must_check kobject_init_and_add(struct kobject *kobj, 90int kobject_init_and_add(struct kobject *kobj,
91 struct kobj_type *ktype, 91 struct kobj_type *ktype, struct kobject *parent,
92 struct kobject *parent, 92 const char *fmt, ...);
93 const char *fmt, ...)
94 __attribute__((format(printf, 4, 5)));
95 93
96extern void kobject_del(struct kobject *kobj); 94extern void kobject_del(struct kobject *kobj);
97 95
@@ -212,8 +210,8 @@ int kobject_uevent(struct kobject *kobj, enum kobject_action action);
212int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, 210int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
213 char *envp[]); 211 char *envp[]);
214 212
215int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) 213__printf(2, 3)
216 __attribute__((format (printf, 2, 3))); 214int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...);
217 215
218int kobject_action_type(const char *buf, size_t count, 216int kobject_action_type(const char *buf, size_t count,
219 enum kobject_action *type); 217 enum kobject_action *type);
@@ -226,7 +224,7 @@ static inline int kobject_uevent_env(struct kobject *kobj,
226 char *envp[]) 224 char *envp[])
227{ return 0; } 225{ return 0; }
228 226
229static inline __attribute__((format(printf, 2, 3))) 227static inline __printf(2, 3)
230int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) 228int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
231{ return 0; } 229{ return 0; }
232 230
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 1e923e5e88e8..5cac19b3a266 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -4,11 +4,11 @@
4#include <linux/err.h> 4#include <linux/err.h>
5#include <linux/sched.h> 5#include <linux/sched.h>
6 6
7__printf(4, 5)
7struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), 8struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
8 void *data, 9 void *data,
9 int node, 10 int node,
10 const char namefmt[], ...) 11 const char namefmt[], ...);
11 __attribute__((format(printf, 4, 5)));
12 12
13#define kthread_create(threadfn, data, namefmt, arg...) \ 13#define kthread_create(threadfn, data, namefmt, arg...) \
14 kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) 14 kthread_create_on_node(threadfn, data, -1, namefmt, ##arg)
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 23fa829bf7a3..cafc09a64fe4 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1256,13 +1256,13 @@ static inline int sata_srst_pmp(struct ata_link *link)
1256/* 1256/*
1257 * printk helpers 1257 * printk helpers
1258 */ 1258 */
1259__attribute__((format (printf, 3, 4))) 1259__printf(3, 4)
1260int ata_port_printk(const struct ata_port *ap, const char *level, 1260int ata_port_printk(const struct ata_port *ap, const char *level,
1261 const char *fmt, ...); 1261 const char *fmt, ...);
1262__attribute__((format (printf, 3, 4))) 1262__printf(3, 4)
1263int ata_link_printk(const struct ata_link *link, const char *level, 1263int ata_link_printk(const struct ata_link *link, const char *level,
1264 const char *fmt, ...); 1264 const char *fmt, ...);
1265__attribute__((format (printf, 3, 4))) 1265__printf(3, 4)
1266int ata_dev_printk(const struct ata_device *dev, const char *level, 1266int ata_dev_printk(const struct ata_device *dev, const char *level,
1267 const char *fmt, ...); 1267 const char *fmt, ...);
1268 1268
@@ -1304,10 +1304,10 @@ void ata_print_version(const struct device *dev, const char *version);
1304/* 1304/*
1305 * ata_eh_info helpers 1305 * ata_eh_info helpers
1306 */ 1306 */
1307extern void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...) 1307extern __printf(2, 3)
1308 __attribute__ ((format (printf, 2, 3))); 1308void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...);
1309extern void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...) 1309extern __printf(2, 3)
1310 __attribute__ ((format (printf, 2, 3))); 1310void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...);
1311extern void ata_ehi_clear_desc(struct ata_eh_info *ehi); 1311extern void ata_ehi_clear_desc(struct ata_eh_info *ehi);
1312 1312
1313static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) 1313static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi)
@@ -1321,8 +1321,8 @@ static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi)
1321/* 1321/*
1322 * port description helpers 1322 * port description helpers
1323 */ 1323 */
1324extern void ata_port_desc(struct ata_port *ap, const char *fmt, ...) 1324extern __printf(2, 3)
1325 __attribute__ ((format (printf, 2, 3))); 1325void ata_port_desc(struct ata_port *ap, const char *fmt, ...);
1326#ifdef CONFIG_PCI 1326#ifdef CONFIG_PCI
1327extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset, 1327extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset,
1328 const char *name); 1328 const char *name);
diff --git a/include/linux/lis3lv02d.h b/include/linux/lis3lv02d.h
index d4292c8431e0..f1664c636af0 100644
--- a/include/linux/lis3lv02d.h
+++ b/include/linux/lis3lv02d.h
@@ -113,7 +113,6 @@ struct lis3lv02d_platform_data {
113 s8 axis_x; 113 s8 axis_x;
114 s8 axis_y; 114 s8 axis_y;
115 s8 axis_z; 115 s8 axis_z;
116#define LIS3_USE_REGULATOR_CTRL 0x01
117#define LIS3_USE_BLOCK_READ 0x02 116#define LIS3_USE_BLOCK_READ 0x02
118 u16 driver_features; 117 u16 driver_features;
119 int default_rate; 118 int default_rate;
diff --git a/include/linux/llist.h b/include/linux/llist.h
index 7287734e08d1..801b44b07aac 100644
--- a/include/linux/llist.h
+++ b/include/linux/llist.h
@@ -148,7 +148,7 @@ static inline struct llist_node *llist_next(struct llist_node *node)
148 * @new: new entry to be added 148 * @new: new entry to be added
149 * @head: the head for your lock-less list 149 * @head: the head for your lock-less list
150 * 150 *
151 * Return whether list is empty before adding. 151 * Returns true if the list was empty prior to adding this entry.
152 */ 152 */
153static inline bool llist_add(struct llist_node *new, struct llist_head *head) 153static inline bool llist_add(struct llist_node *new, struct llist_head *head)
154{ 154{
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 7525e38c434d..e6b843e16e81 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -80,6 +80,7 @@ extern phys_addr_t __memblock_alloc_base(phys_addr_t size,
80 phys_addr_t align, 80 phys_addr_t align,
81 phys_addr_t max_addr); 81 phys_addr_t max_addr);
82extern phys_addr_t memblock_phys_mem_size(void); 82extern phys_addr_t memblock_phys_mem_size(void);
83extern phys_addr_t memblock_start_of_DRAM(void);
83extern phys_addr_t memblock_end_of_DRAM(void); 84extern phys_addr_t memblock_end_of_DRAM(void);
84extern void memblock_enforce_memory_limit(phys_addr_t memory_limit); 85extern void memblock_enforce_memory_limit(phys_addr_t memory_limit);
85extern int memblock_is_memory(phys_addr_t addr); 86extern int memblock_is_memory(phys_addr_t addr);
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 343bd7661f2a..ac797fa03ef8 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -35,7 +35,8 @@ enum mem_cgroup_page_stat_item {
35extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, 35extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
36 struct list_head *dst, 36 struct list_head *dst,
37 unsigned long *scanned, int order, 37 unsigned long *scanned, int order,
38 int mode, struct zone *z, 38 isolate_mode_t mode,
39 struct zone *z,
39 struct mem_cgroup *mem_cont, 40 struct mem_cgroup *mem_cont,
40 int active, int file); 41 int active, int file);
41 42
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7438071b44aa..3b3e3b8bb706 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1334,7 +1334,8 @@ extern void si_meminfo(struct sysinfo * val);
1334extern void si_meminfo_node(struct sysinfo *val, int nid); 1334extern void si_meminfo_node(struct sysinfo *val, int nid);
1335extern int after_bootmem; 1335extern int after_bootmem;
1336 1336
1337extern void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...); 1337extern __printf(3, 4)
1338void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
1338 1339
1339extern void setup_per_cpu_pageset(void); 1340extern void setup_per_cpu_pageset(void);
1340 1341
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index c93d00a6e95d..3e01a19a91e8 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -304,8 +304,15 @@ struct mm_struct {
304 unsigned long hiwater_rss; /* High-watermark of RSS usage */ 304 unsigned long hiwater_rss; /* High-watermark of RSS usage */
305 unsigned long hiwater_vm; /* High-water virtual memory usage */ 305 unsigned long hiwater_vm; /* High-water virtual memory usage */
306 306
307 unsigned long total_vm, locked_vm, shared_vm, exec_vm; 307 unsigned long total_vm; /* Total pages mapped */
308 unsigned long stack_vm, reserved_vm, def_flags, nr_ptes; 308 unsigned long locked_vm; /* Pages that have PG_mlocked set */
309 unsigned long pinned_vm; /* Refcount permanently increased */
310 unsigned long shared_vm; /* Shared pages (files) */
311 unsigned long exec_vm; /* VM_EXEC & ~VM_WRITE */
312 unsigned long stack_vm; /* VM_GROWSUP/DOWN */
313 unsigned long reserved_vm; /* VM_RESERVED|VM_IO pages */
314 unsigned long def_flags;
315 unsigned long nr_ptes; /* Page table pages */
309 unsigned long start_code, end_code, start_data, end_data; 316 unsigned long start_code, end_code, start_data, end_data;
310 unsigned long start_brk, brk, start_stack; 317 unsigned long start_brk, brk, start_stack;
311 unsigned long arg_start, arg_end, env_start, env_end; 318 unsigned long arg_start, arg_end, env_start, env_end;
@@ -336,9 +343,6 @@ struct mm_struct {
336 unsigned int token_priority; 343 unsigned int token_priority;
337 unsigned int last_interval; 344 unsigned int last_interval;
338 345
339 /* How many tasks sharing this mm are OOM_DISABLE */
340 atomic_t oom_disable_count;
341
342 unsigned long flags; /* Must use atomic bitops to access the bits */ 346 unsigned long flags; /* Must use atomic bitops to access the bits */
343 347
344 struct core_state *core_state; /* coredumping support */ 348 struct core_state *core_state; /* coredumping support */
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h
index 97491f78b08c..c5d52780d6a0 100644
--- a/include/linux/mmiotrace.h
+++ b/include/linux/mmiotrace.h
@@ -49,8 +49,7 @@ extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size,
49extern void mmiotrace_iounmap(volatile void __iomem *addr); 49extern void mmiotrace_iounmap(volatile void __iomem *addr);
50 50
51/* For anyone to insert markers. Remember trailing newline. */ 51/* For anyone to insert markers. Remember trailing newline. */
52extern int mmiotrace_printk(const char *fmt, ...) 52extern __printf(1, 2) int mmiotrace_printk(const char *fmt, ...);
53 __attribute__ ((format (printf, 1, 2)));
54#else /* !CONFIG_MMIOTRACE: */ 53#else /* !CONFIG_MMIOTRACE: */
55static inline int is_kmmio_active(void) 54static inline int is_kmmio_active(void)
56{ 55{
@@ -71,10 +70,7 @@ static inline void mmiotrace_iounmap(volatile void __iomem *addr)
71{ 70{
72} 71}
73 72
74static inline int mmiotrace_printk(const char *fmt, ...) 73static inline __printf(1, 2) int mmiotrace_printk(const char *fmt, ...)
75 __attribute__ ((format (printf, 1, 0)));
76
77static inline int mmiotrace_printk(const char *fmt, ...)
78{ 74{
79 return 0; 75 return 0;
80} 76}
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index be1ac8d7789b..188cb2ffe8db 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -100,6 +100,7 @@ enum zone_stat_item {
100 NR_UNSTABLE_NFS, /* NFS unstable pages */ 100 NR_UNSTABLE_NFS, /* NFS unstable pages */
101 NR_BOUNCE, 101 NR_BOUNCE,
102 NR_VMSCAN_WRITE, 102 NR_VMSCAN_WRITE,
103 NR_VMSCAN_IMMEDIATE, /* Prioritise for reclaim when writeback ends */
103 NR_WRITEBACK_TEMP, /* Writeback using temporary buffers */ 104 NR_WRITEBACK_TEMP, /* Writeback using temporary buffers */
104 NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */ 105 NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */
105 NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */ 106 NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */
@@ -164,6 +165,18 @@ static inline int is_unevictable_lru(enum lru_list l)
164#define LRU_ALL_EVICTABLE (LRU_ALL_FILE | LRU_ALL_ANON) 165#define LRU_ALL_EVICTABLE (LRU_ALL_FILE | LRU_ALL_ANON)
165#define LRU_ALL ((1 << NR_LRU_LISTS) - 1) 166#define LRU_ALL ((1 << NR_LRU_LISTS) - 1)
166 167
168/* Isolate inactive pages */
169#define ISOLATE_INACTIVE ((__force isolate_mode_t)0x1)
170/* Isolate active pages */
171#define ISOLATE_ACTIVE ((__force isolate_mode_t)0x2)
172/* Isolate clean file */
173#define ISOLATE_CLEAN ((__force isolate_mode_t)0x4)
174/* Isolate unmapped file */
175#define ISOLATE_UNMAPPED ((__force isolate_mode_t)0x8)
176
177/* LRU Isolation modes. */
178typedef unsigned __bitwise__ isolate_mode_t;
179
167enum zone_watermarks { 180enum zone_watermarks {
168 WMARK_MIN, 181 WMARK_MIN,
169 WMARK_LOW, 182 WMARK_LOW,
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index df1c836e6948..cbeb5867cff7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2622,23 +2622,23 @@ static inline const char *netdev_name(const struct net_device *dev)
2622extern int __netdev_printk(const char *level, const struct net_device *dev, 2622extern int __netdev_printk(const char *level, const struct net_device *dev,
2623 struct va_format *vaf); 2623 struct va_format *vaf);
2624 2624
2625extern int netdev_printk(const char *level, const struct net_device *dev, 2625extern __printf(3, 4)
2626 const char *format, ...) 2626int netdev_printk(const char *level, const struct net_device *dev,
2627 __attribute__ ((format (printf, 3, 4))); 2627 const char *format, ...);
2628extern int netdev_emerg(const struct net_device *dev, const char *format, ...) 2628extern __printf(2, 3)
2629 __attribute__ ((format (printf, 2, 3))); 2629int netdev_emerg(const struct net_device *dev, const char *format, ...);
2630extern int netdev_alert(const struct net_device *dev, const char *format, ...) 2630extern __printf(2, 3)
2631 __attribute__ ((format (printf, 2, 3))); 2631int netdev_alert(const struct net_device *dev, const char *format, ...);
2632extern int netdev_crit(const struct net_device *dev, const char *format, ...) 2632extern __printf(2, 3)
2633 __attribute__ ((format (printf, 2, 3))); 2633int netdev_crit(const struct net_device *dev, const char *format, ...);
2634extern int netdev_err(const struct net_device *dev, const char *format, ...) 2634extern __printf(2, 3)
2635 __attribute__ ((format (printf, 2, 3))); 2635int netdev_err(const struct net_device *dev, const char *format, ...);
2636extern int netdev_warn(const struct net_device *dev, const char *format, ...) 2636extern __printf(2, 3)
2637 __attribute__ ((format (printf, 2, 3))); 2637int netdev_warn(const struct net_device *dev, const char *format, ...);
2638extern int netdev_notice(const struct net_device *dev, const char *format, ...) 2638extern __printf(2, 3)
2639 __attribute__ ((format (printf, 2, 3))); 2639int netdev_notice(const struct net_device *dev, const char *format, ...);
2640extern int netdev_info(const struct net_device *dev, const char *format, ...) 2640extern __printf(2, 3)
2641 __attribute__ ((format (printf, 2, 3))); 2641int netdev_info(const struct net_device *dev, const char *format, ...);
2642 2642
2643#define MODULE_ALIAS_NETDEV(device) \ 2643#define MODULE_ALIAS_NETDEV(device) \
2644 MODULE_ALIAS("netdev-" device) 2644 MODULE_ALIAS("netdev-" device)
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 13b7b02e599a..6f9d04a85336 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -40,6 +40,7 @@ enum oom_constraint {
40 CONSTRAINT_MEMCG, 40 CONSTRAINT_MEMCG,
41}; 41};
42 42
43extern void compare_swap_oom_score_adj(int old_val, int new_val);
43extern int test_set_oom_score_adj(int new_val); 44extern int test_set_oom_score_adj(int new_val);
44 45
45extern unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem, 46extern unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem,
diff --git a/include/linux/platform_data/leds-renesas-tpu.h b/include/linux/platform_data/leds-renesas-tpu.h
new file mode 100644
index 000000000000..055387086fc1
--- /dev/null
+++ b/include/linux/platform_data/leds-renesas-tpu.h
@@ -0,0 +1,14 @@
1#ifndef __LEDS_RENESAS_TPU_H__
2#define __LEDS_RENESAS_TPU_H__
3
4struct led_renesas_tpu_config {
5 char *name;
6 unsigned pin_gpio_fn;
7 unsigned pin_gpio;
8 unsigned int channel_offset;
9 unsigned int timer_bit;
10 unsigned int max_brightness;
11 unsigned int refresh_rate;
12};
13
14#endif /* __LEDS_RENESAS_TPU_H__ */
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 0101d55d9651..f0e22f75143f 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -82,22 +82,22 @@ struct va_format {
82 * Dummy printk for disabled debugging statements to use whilst maintaining 82 * Dummy printk for disabled debugging statements to use whilst maintaining
83 * gcc's format and side-effect checking. 83 * gcc's format and side-effect checking.
84 */ 84 */
85static inline __attribute__ ((format (printf, 1, 2))) 85static inline __printf(1, 2)
86int no_printk(const char *fmt, ...) 86int no_printk(const char *fmt, ...)
87{ 87{
88 return 0; 88 return 0;
89} 89}
90 90
91extern asmlinkage __attribute__ ((format (printf, 1, 2))) 91extern asmlinkage __printf(1, 2)
92void early_printk(const char *fmt, ...); 92void early_printk(const char *fmt, ...);
93 93
94extern int printk_needs_cpu(int cpu); 94extern int printk_needs_cpu(int cpu);
95extern void printk_tick(void); 95extern void printk_tick(void);
96 96
97#ifdef CONFIG_PRINTK 97#ifdef CONFIG_PRINTK
98asmlinkage __attribute__ ((format (printf, 1, 0))) 98asmlinkage __printf(1, 0)
99int vprintk(const char *fmt, va_list args); 99int vprintk(const char *fmt, va_list args);
100asmlinkage __attribute__ ((format (printf, 1, 2))) __cold 100asmlinkage __printf(1, 2) __cold
101int printk(const char *fmt, ...); 101int printk(const char *fmt, ...);
102 102
103/* 103/*
@@ -117,12 +117,12 @@ extern int kptr_restrict;
117void log_buf_kexec_setup(void); 117void log_buf_kexec_setup(void);
118void __init setup_log_buf(int early); 118void __init setup_log_buf(int early);
119#else 119#else
120static inline __attribute__ ((format (printf, 1, 0))) 120static inline __printf(1, 0)
121int vprintk(const char *s, va_list args) 121int vprintk(const char *s, va_list args)
122{ 122{
123 return 0; 123 return 0;
124} 124}
125static inline __attribute__ ((format (printf, 1, 2))) __cold 125static inline __printf(1, 2) __cold
126int printk(const char *s, ...) 126int printk(const char *s, ...)
127{ 127{
128 return 0; 128 return 0;
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 26f9e3612e0f..d93f95e6177c 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -31,7 +31,7 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia)
31#define quota_error(sb, fmt, args...) \ 31#define quota_error(sb, fmt, args...) \
32 __quota_error((sb), __func__, fmt , ## args) 32 __quota_error((sb), __func__, fmt , ## args)
33 33
34extern __attribute__((format (printf, 3, 4))) 34extern __printf(3, 4)
35void __quota_error(struct super_block *sb, const char *func, 35void __quota_error(struct super_block *sb, const char *func,
36 const char *fmt, ...); 36 const char *fmt, ...);
37 37
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index be720cd2038d..0b69a4684216 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -84,8 +84,7 @@ int seq_putc(struct seq_file *m, char c);
84int seq_puts(struct seq_file *m, const char *s); 84int seq_puts(struct seq_file *m, const char *s);
85int seq_write(struct seq_file *seq, const void *data, size_t len); 85int seq_write(struct seq_file *seq, const void *data, size_t len);
86 86
87int seq_printf(struct seq_file *, const char *, ...) 87__printf(2, 3) int seq_printf(struct seq_file *, const char *, ...);
88 __attribute__ ((format (printf,2,3)));
89 88
90int seq_path(struct seq_file *, struct path *, char *); 89int seq_path(struct seq_file *, struct path *, char *);
91int seq_dentry(struct seq_file *, struct dentry *, char *); 90int seq_dentry(struct seq_file *, struct dentry *, char *);
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
index 790651b4e5ba..a83833a1f7a2 100644
--- a/include/linux/shrinker.h
+++ b/include/linux/shrinker.h
@@ -20,6 +20,7 @@ struct shrink_control {
20 * 'nr_to_scan' entries and attempt to free them up. It should return 20 * 'nr_to_scan' entries and attempt to free them up. It should return
21 * the number of objects which remain in the cache. If it returns -1, it means 21 * the number of objects which remain in the cache. If it returns -1, it means
22 * it cannot do any scanning at this time (eg. there is a risk of deadlock). 22 * it cannot do any scanning at this time (eg. there is a risk of deadlock).
23 * The callback must not return -1 if nr_to_scan is zero.
23 * 24 *
24 * The 'gfpmask' refers to the allocation we are currently trying to 25 * The 'gfpmask' refers to the allocation we are currently trying to
25 * fulfil. 26 * fulfil.
diff --git a/include/linux/spi/l4f00242t03.h b/include/linux/spi/l4f00242t03.h
index aee1dbda4edc..bc8677c8eba9 100644
--- a/include/linux/spi/l4f00242t03.h
+++ b/include/linux/spi/l4f00242t03.h
@@ -24,8 +24,6 @@
24struct l4f00242t03_pdata { 24struct l4f00242t03_pdata {
25 unsigned int reset_gpio; 25 unsigned int reset_gpio;
26 unsigned int data_enable_gpio; 26 unsigned int data_enable_gpio;
27 const char *io_supply; /* will be set to 1.8 V */
28 const char *core_supply; /* will be set to 2.8 V */
29}; 27};
30 28
31#endif /* _INCLUDE_LINUX_SPI_L4F00242T03_H_ */ 29#endif /* _INCLUDE_LINUX_SPI_L4F00242T03_H_ */
diff --git a/include/linux/string.h b/include/linux/string.h
index a176db2f2c85..e033564f10ba 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -114,6 +114,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t);
114#ifndef __HAVE_ARCH_MEMCHR 114#ifndef __HAVE_ARCH_MEMCHR
115extern void * memchr(const void *,int,__kernel_size_t); 115extern void * memchr(const void *,int,__kernel_size_t);
116#endif 116#endif
117void *memchr_inv(const void *s, int c, size_t n);
117 118
118extern char *kstrdup(const char *s, gfp_t gfp); 119extern char *kstrdup(const char *s, gfp_t gfp);
119extern char *kstrndup(const char *s, size_t len, gfp_t gfp); 120extern char *kstrndup(const char *s, size_t len, gfp_t gfp);
diff --git a/include/linux/swap.h b/include/linux/swap.h
index c71f84bb62ec..1e22e126d2ac 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -243,15 +243,10 @@ static inline void lru_cache_add_file(struct page *page)
243 __lru_cache_add(page, LRU_INACTIVE_FILE); 243 __lru_cache_add(page, LRU_INACTIVE_FILE);
244} 244}
245 245
246/* LRU Isolation modes. */
247#define ISOLATE_INACTIVE 0 /* Isolate inactive pages. */
248#define ISOLATE_ACTIVE 1 /* Isolate active pages. */
249#define ISOLATE_BOTH 2 /* Isolate both active and inactive pages. */
250
251/* linux/mm/vmscan.c */ 246/* linux/mm/vmscan.c */
252extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, 247extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
253 gfp_t gfp_mask, nodemask_t *mask); 248 gfp_t gfp_mask, nodemask_t *mask);
254extern int __isolate_lru_page(struct page *page, int mode, int file); 249extern int __isolate_lru_page(struct page *page, isolate_mode_t mode, int file);
255extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, 250extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
256 gfp_t gfp_mask, bool noswap); 251 gfp_t gfp_mask, bool noswap);
257extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, 252extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 1ff0ec2a5e8d..86a24b1166d1 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -844,4 +844,17 @@ asmlinkage long sys_open_by_handle_at(int mountdirfd,
844 struct file_handle __user *handle, 844 struct file_handle __user *handle,
845 int flags); 845 int flags);
846asmlinkage long sys_setns(int fd, int nstype); 846asmlinkage long sys_setns(int fd, int nstype);
847asmlinkage long sys_process_vm_readv(pid_t pid,
848 const struct iovec __user *lvec,
849 unsigned long liovcnt,
850 const struct iovec __user *rvec,
851 unsigned long riovcnt,
852 unsigned long flags);
853asmlinkage long sys_process_vm_writev(pid_t pid,
854 const struct iovec __user *lvec,
855 unsigned long liovcnt,
856 const struct iovec __user *rvec,
857 unsigned long riovcnt,
858 unsigned long flags);
859
847#endif 860#endif
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
index 5cf397ceb726..7dadc3df0c77 100644
--- a/include/linux/trace_seq.h
+++ b/include/linux/trace_seq.h
@@ -29,10 +29,10 @@ trace_seq_init(struct trace_seq *s)
29 * Currently only defined when tracing is enabled. 29 * Currently only defined when tracing is enabled.
30 */ 30 */
31#ifdef CONFIG_TRACING 31#ifdef CONFIG_TRACING
32extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...) 32extern __printf(2, 3)
33 __attribute__ ((format (printf, 2, 3))); 33int trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
34extern int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args) 34extern __printf(2, 0)
35 __attribute__ ((format (printf, 2, 0))); 35int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
36extern int 36extern int
37trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary); 37trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
38extern int trace_print_seq(struct seq_file *m, struct trace_seq *s); 38extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 9332e52ea8c2..687fb11e2010 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -13,6 +13,7 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
13#define VM_MAP 0x00000004 /* vmap()ed pages */ 13#define VM_MAP 0x00000004 /* vmap()ed pages */
14#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ 14#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
15#define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ 15#define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */
16#define VM_UNLIST 0x00000020 /* vm_struct is not listed in vmlist */
16/* bits [20..32] reserved for arch specific ioremap internals */ 17/* bits [20..32] reserved for arch specific ioremap internals */
17 18
18/* 19/*
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index e727555d4ee9..e86af08293a8 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -77,7 +77,7 @@ struct bt_power {
77#define BT_POWER_FORCE_ACTIVE_OFF 0 77#define BT_POWER_FORCE_ACTIVE_OFF 0
78#define BT_POWER_FORCE_ACTIVE_ON 1 78#define BT_POWER_FORCE_ACTIVE_ON 1
79 79
80__attribute__((format (printf, 2, 3))) 80__printf(2, 3)
81int bt_printk(const char *level, const char *fmt, ...); 81int bt_printk(const char *level, const char *fmt, ...);
82 82
83#define BT_INFO(fmt, arg...) bt_printk(KERN_INFO, pr_fmt(fmt), ##arg) 83#define BT_INFO(fmt, arg...) bt_printk(KERN_INFO, pr_fmt(fmt), ##arg)
diff --git a/include/net/netfilter/nf_log.h b/include/net/netfilter/nf_log.h
index 920997f1aff0..e991bd0a27af 100644
--- a/include/net/netfilter/nf_log.h
+++ b/include/net/netfilter/nf_log.h
@@ -53,12 +53,13 @@ int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger);
53void nf_log_unbind_pf(u_int8_t pf); 53void nf_log_unbind_pf(u_int8_t pf);
54 54
55/* Calls the registered backend logging function */ 55/* Calls the registered backend logging function */
56__printf(7, 8)
56void nf_log_packet(u_int8_t pf, 57void nf_log_packet(u_int8_t pf,
57 unsigned int hooknum, 58 unsigned int hooknum,
58 const struct sk_buff *skb, 59 const struct sk_buff *skb,
59 const struct net_device *in, 60 const struct net_device *in,
60 const struct net_device *out, 61 const struct net_device *out,
61 const struct nf_loginfo *li, 62 const struct nf_loginfo *li,
62 const char *fmt, ...) __attribute__ ((format(printf,7,8))); 63 const char *fmt, ...);
63 64
64#endif /* _NF_LOG_H */ 65#endif /* _NF_LOG_H */
diff --git a/include/net/sock.h b/include/net/sock.h
index 5ac682f73d63..c6658bef7f32 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -76,8 +76,8 @@
76 printk(KERN_DEBUG msg); } while (0) 76 printk(KERN_DEBUG msg); } while (0)
77#else 77#else
78/* Validate arguments and do nothing */ 78/* Validate arguments and do nothing */
79static inline void __attribute__ ((format (printf, 2, 3))) 79static inline __printf(2, 3)
80SOCK_DEBUG(struct sock *sk, const char *msg, ...) 80void SOCK_DEBUG(struct sock *sk, const char *msg, ...)
81{ 81{
82} 82}
83#endif 83#endif
diff --git a/include/sound/core.h b/include/sound/core.h
index 1fa2407c966f..91d513879a78 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -326,9 +326,9 @@ void release_and_free_resource(struct resource *res);
326/* --- */ 326/* --- */
327 327
328#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) 328#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
329__printf(4, 5)
329void __snd_printk(unsigned int level, const char *file, int line, 330void __snd_printk(unsigned int level, const char *file, int line,
330 const char *format, ...) 331 const char *format, ...);
331 __attribute__ ((format (printf, 4, 5)));
332#else 332#else
333#define __snd_printk(level, file, line, format, args...) \ 333#define __snd_printk(level, file, line, format, args...) \
334 printk(format, ##args) 334 printk(format, ##args)
diff --git a/include/sound/info.h b/include/sound/info.h
index 4e94cf1ff762..5492cc40dc57 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -110,8 +110,8 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer);
110static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} 110static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}
111#endif 111#endif
112 112
113int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) \ 113__printf(2, 3)
114 __attribute__ ((format (printf, 2, 3))); 114int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...);
115int snd_info_init(void); 115int snd_info_init(void);
116int snd_info_done(void); 116int snd_info_done(void);
117 117
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
index 3d9afb6a8c9c..f352a98ce4f4 100644
--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -75,9 +75,9 @@ struct snd_seq_port_callback {
75}; 75};
76 76
77/* interface for kernel client */ 77/* interface for kernel client */
78__printf(3, 4)
78int snd_seq_create_kernel_client(struct snd_card *card, int client_index, 79int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
79 const char *name_fmt, ...) 80 const char *name_fmt, ...);
80 __attribute__ ((format (printf, 3, 4)));
81int snd_seq_delete_kernel_client(int client); 81int snd_seq_delete_kernel_client(int client);
82int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop); 82int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
83int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop); 83int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index 36851f7f13da..edc4b3d25a2d 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -266,7 +266,7 @@ DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template,
266 unsigned long nr_lumpy_taken, 266 unsigned long nr_lumpy_taken,
267 unsigned long nr_lumpy_dirty, 267 unsigned long nr_lumpy_dirty,
268 unsigned long nr_lumpy_failed, 268 unsigned long nr_lumpy_failed,
269 int isolate_mode), 269 isolate_mode_t isolate_mode),
270 270
271 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode), 271 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode),
272 272
@@ -278,7 +278,7 @@ DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template,
278 __field(unsigned long, nr_lumpy_taken) 278 __field(unsigned long, nr_lumpy_taken)
279 __field(unsigned long, nr_lumpy_dirty) 279 __field(unsigned long, nr_lumpy_dirty)
280 __field(unsigned long, nr_lumpy_failed) 280 __field(unsigned long, nr_lumpy_failed)
281 __field(int, isolate_mode) 281 __field(isolate_mode_t, isolate_mode)
282 ), 282 ),
283 283
284 TP_fast_assign( 284 TP_fast_assign(
@@ -312,7 +312,7 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
312 unsigned long nr_lumpy_taken, 312 unsigned long nr_lumpy_taken,
313 unsigned long nr_lumpy_dirty, 313 unsigned long nr_lumpy_dirty,
314 unsigned long nr_lumpy_failed, 314 unsigned long nr_lumpy_failed,
315 int isolate_mode), 315 isolate_mode_t isolate_mode),
316 316
317 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode) 317 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode)
318 318
@@ -327,7 +327,7 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
327 unsigned long nr_lumpy_taken, 327 unsigned long nr_lumpy_taken,
328 unsigned long nr_lumpy_dirty, 328 unsigned long nr_lumpy_dirty,
329 unsigned long nr_lumpy_failed, 329 unsigned long nr_lumpy_failed,
330 int isolate_mode), 330 isolate_mode_t isolate_mode),
331 331
332 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode) 332 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode)
333 333
diff --git a/include/xen/hvc-console.h b/include/xen/hvc-console.h
index 901724dc528d..b62dfef15f61 100644
--- a/include/xen/hvc-console.h
+++ b/include/xen/hvc-console.h
@@ -6,12 +6,12 @@ extern struct console xenboot_console;
6#ifdef CONFIG_HVC_XEN 6#ifdef CONFIG_HVC_XEN
7void xen_console_resume(void); 7void xen_console_resume(void);
8void xen_raw_console_write(const char *str); 8void xen_raw_console_write(const char *str);
9__attribute__((format(printf, 1, 2))) 9__printf(1, 2)
10void xen_raw_printk(const char *fmt, ...); 10void xen_raw_printk(const char *fmt, ...);
11#else 11#else
12static inline void xen_console_resume(void) { } 12static inline void xen_console_resume(void) { }
13static inline void xen_raw_console_write(const char *str) { } 13static inline void xen_raw_console_write(const char *str) { }
14static inline __attribute__((format(printf, 1, 2))) 14static inline __printf(1, 2)
15void xen_raw_printk(const char *fmt, ...) { } 15void xen_raw_printk(const char *fmt, ...) { }
16#endif 16#endif
17 17
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
index aceeca799fd7..b9f9fb5af0d8 100644
--- a/include/xen/xenbus.h
+++ b/include/xen/xenbus.h
@@ -156,9 +156,9 @@ int xenbus_scanf(struct xenbus_transaction t,
156 __attribute__((format(scanf, 4, 5))); 156 __attribute__((format(scanf, 4, 5)));
157 157
158/* Single printf and write: returns -errno or 0. */ 158/* Single printf and write: returns -errno or 0. */
159__printf(4, 5)
159int xenbus_printf(struct xenbus_transaction t, 160int xenbus_printf(struct xenbus_transaction t,
160 const char *dir, const char *node, const char *fmt, ...) 161 const char *dir, const char *node, const char *fmt, ...);
161 __attribute__((format(printf, 4, 5)));
162 162
163/* Generic read function: NULL-terminated triples of name, 163/* Generic read function: NULL-terminated triples of name,
164 * sprintf-style type string, and pointer. Returns 0 or errno.*/ 164 * sprintf-style type string, and pointer. Returns 0 or errno.*/
@@ -200,11 +200,11 @@ int xenbus_watch_path(struct xenbus_device *dev, const char *path,
200 struct xenbus_watch *watch, 200 struct xenbus_watch *watch,
201 void (*callback)(struct xenbus_watch *, 201 void (*callback)(struct xenbus_watch *,
202 const char **, unsigned int)); 202 const char **, unsigned int));
203__printf(4, 5)
203int xenbus_watch_pathfmt(struct xenbus_device *dev, struct xenbus_watch *watch, 204int xenbus_watch_pathfmt(struct xenbus_device *dev, struct xenbus_watch *watch,
204 void (*callback)(struct xenbus_watch *, 205 void (*callback)(struct xenbus_watch *,
205 const char **, unsigned int), 206 const char **, unsigned int),
206 const char *pathfmt, ...) 207 const char *pathfmt, ...);
207 __attribute__ ((format (printf, 4, 5)));
208 208
209int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state); 209int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state);
210int xenbus_grant_ring(struct xenbus_device *dev, unsigned long ring_mfn); 210int xenbus_grant_ring(struct xenbus_device *dev, unsigned long ring_mfn);
@@ -223,9 +223,9 @@ int xenbus_free_evtchn(struct xenbus_device *dev, int port);
223 223
224enum xenbus_state xenbus_read_driver_state(const char *path); 224enum xenbus_state xenbus_read_driver_state(const char *path);
225 225
226__attribute__((format(printf, 3, 4))) 226__printf(3, 4)
227void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, ...); 227void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, ...);
228__attribute__((format(printf, 3, 4))) 228__printf(3, 4)
229void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt, ...); 229void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt, ...);
230 230
231const char *xenbus_strstate(enum xenbus_state state); 231const char *xenbus_strstate(enum xenbus_state state);