Commit 44650f33 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

kobject.h remove extern from function prototypes

The kernel coding style does not require 'extern' in function prototypes
in .h files, so remove them from include/linux/kobject.h as they are not
needed.
Acked-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230324122711.2664537-6-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e44d5c9
...@@ -79,43 +79,37 @@ struct kobject { ...@@ -79,43 +79,37 @@ struct kobject {
unsigned int uevent_suppress:1; unsigned int uevent_suppress:1;
}; };
extern __printf(2, 3) __printf(2, 3) int kobject_set_name(struct kobject *kobj, const char *name, ...);
int kobject_set_name(struct kobject *kobj, const char *name, ...); __printf(2, 0) int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list vargs);
extern __printf(2, 0)
int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
va_list vargs);
static inline const char *kobject_name(const struct kobject *kobj) static inline const char *kobject_name(const struct kobject *kobj)
{ {
return kobj->name; return kobj->name;
} }
extern void kobject_init(struct kobject *kobj, const struct kobj_type *ktype); void kobject_init(struct kobject *kobj, const struct kobj_type *ktype);
extern __printf(3, 4) __must_check __printf(3, 4) __must_check int kobject_add(struct kobject *kobj,
int kobject_add(struct kobject *kobj, struct kobject *parent, struct kobject *parent,
const char *fmt, ...); const char *fmt, ...);
extern __printf(4, 5) __must_check __printf(4, 5) __must_check int kobject_init_and_add(struct kobject *kobj,
int kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype,
const struct kobj_type *ktype, struct kobject *parent, struct kobject *parent,
const char *fmt, ...); const char *fmt, ...);
extern void kobject_del(struct kobject *kobj); void kobject_del(struct kobject *kobj);
extern struct kobject * __must_check kobject_create_and_add(const char *name, struct kobject * __must_check kobject_create_and_add(const char *name, struct kobject *parent);
struct kobject *parent);
extern int __must_check kobject_rename(struct kobject *, const char *new_name); int __must_check kobject_rename(struct kobject *, const char *new_name);
extern int __must_check kobject_move(struct kobject *, struct kobject *); int __must_check kobject_move(struct kobject *, struct kobject *);
extern struct kobject *kobject_get(struct kobject *kobj); struct kobject *kobject_get(struct kobject *kobj);
extern struct kobject * __must_check kobject_get_unless_zero( struct kobject * __must_check kobject_get_unless_zero(struct kobject *kobj);
struct kobject *kobj); void kobject_put(struct kobject *kobj);
extern void kobject_put(struct kobject *kobj);
extern const void *kobject_namespace(const struct kobject *kobj); const void *kobject_namespace(const struct kobject *kobj);
extern void kobject_get_ownership(const struct kobject *kobj, void kobject_get_ownership(const struct kobject *kobj, kuid_t *uid, kgid_t *gid);
kuid_t *uid, kgid_t *gid); char *kobject_get_path(const struct kobject *kobj, gfp_t flag);
extern char *kobject_get_path(const struct kobject *kobj, gfp_t flag);
struct kobj_type { struct kobj_type {
void (*release)(struct kobject *kobj); void (*release)(struct kobject *kobj);
...@@ -176,11 +170,10 @@ struct kset { ...@@ -176,11 +170,10 @@ struct kset {
const struct kset_uevent_ops *uevent_ops; const struct kset_uevent_ops *uevent_ops;
} __randomize_layout; } __randomize_layout;
extern void kset_init(struct kset *kset); void kset_init(struct kset *kset);
extern int __must_check kset_register(struct kset *kset); int __must_check kset_register(struct kset *kset);
extern void kset_unregister(struct kset *kset); void kset_unregister(struct kset *kset);
extern struct kset * __must_check kset_create_and_add(const char *name, struct kset * __must_check kset_create_and_add(const char *name, const struct kset_uevent_ops *u,
const struct kset_uevent_ops *u,
struct kobject *parent_kobj); struct kobject *parent_kobj);
static inline struct kset *to_kset(struct kobject *kobj) static inline struct kset *to_kset(struct kobject *kobj)
...@@ -203,7 +196,7 @@ static inline const struct kobj_type *get_ktype(const struct kobject *kobj) ...@@ -203,7 +196,7 @@ static inline const struct kobj_type *get_ktype(const struct kobject *kobj)
return kobj->ktype; return kobj->ktype;
} }
extern struct kobject *kset_find_obj(struct kset *, const char *); struct kobject *kset_find_obj(struct kset *, const char *);
/* The global /sys/kernel/ kobject for people to chain off of */ /* The global /sys/kernel/ kobject for people to chain off of */
extern struct kobject *kernel_kobj; extern struct kobject *kernel_kobj;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment