aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 668729cc0fe..ad81e1c5148 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