diff options
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r-- | include/linux/kobject.h | 26 |
1 files changed, 12 insertions, 14 deletions
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 | ||
75 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) | 75 | extern __printf(2, 3) |
76 | __attribute__((format(printf, 2, 3))); | 76 | int kobject_set_name(struct kobject *kobj, const char *name, ...); |
77 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | 77 | extern 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 | ||
85 | extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); | 85 | extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); |
86 | extern int __must_check kobject_add(struct kobject *kobj, | 86 | extern __printf(3, 4) __must_check |
87 | struct kobject *parent, | 87 | int kobject_add(struct kobject *kobj, struct kobject *parent, |
88 | const char *fmt, ...) | 88 | const char *fmt, ...); |
89 | __attribute__((format(printf, 3, 4))); | 89 | extern __printf(4, 5) __must_check |
90 | extern int __must_check kobject_init_and_add(struct kobject *kobj, | 90 | int 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 | ||
96 | extern void kobject_del(struct kobject *kobj); | 94 | extern void kobject_del(struct kobject *kobj); |
97 | 95 | ||
@@ -212,8 +210,8 @@ int kobject_uevent(struct kobject *kobj, enum kobject_action action); | |||
212 | int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | 210 | int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, |
213 | char *envp[]); | 211 | char *envp[]); |
214 | 212 | ||
215 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 213 | __printf(2, 3) |
216 | __attribute__((format (printf, 2, 3))); | 214 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...); |
217 | 215 | ||
218 | int kobject_action_type(const char *buf, size_t count, | 216 | int 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 | ||
229 | static inline __attribute__((format(printf, 2, 3))) | 227 | static inline __printf(2, 3) |
230 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 228 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) |
231 | { return 0; } | 229 | { return 0; } |
232 | 230 | ||