mirror of https://gitee.com/openkylin/linux.git
configfs: misc cleanups
1. item.c:config_item_cleanup() is a private function (only called by config_item_release() in same file). However, it is spuriously exported in include/linux/configfs.h, so remove that export and make it static in item.c. Also, it is no longer exported / interface function, so no need to give comment for this function (the comment was stating obvious thing, anyway). 2. Kernel-doc comment format does not allow empty line between end of comment and start of function (declaration line). There were several such spurious empty lines in item.c, so fix them. fs/configfs/item.c | 15 +++------------ include/linux/configfs.h | 1 - 2 files changed, 3 insertions(+), 13 deletions(-) Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
This commit is contained in:
parent
b23cdde4c6
commit
4c62b53454
|
@ -62,7 +62,6 @@ void config_item_init(struct config_item * item)
|
||||||
* dynamically allocated string that @item->ci_name points to.
|
* dynamically allocated string that @item->ci_name points to.
|
||||||
* Otherwise, use the static @item->ci_namebuf array.
|
* Otherwise, use the static @item->ci_namebuf array.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int config_item_set_name(struct config_item * item, const char * fmt, ...)
|
int config_item_set_name(struct config_item * item, const char * fmt, ...)
|
||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
@ -139,12 +138,7 @@ struct config_item * config_item_get(struct config_item * item)
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
static void config_item_cleanup(struct config_item * item)
|
||||||
* config_item_cleanup - free config_item resources.
|
|
||||||
* @item: item.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void config_item_cleanup(struct config_item * item)
|
|
||||||
{
|
{
|
||||||
struct config_item_type * t = item->ci_type;
|
struct config_item_type * t = item->ci_type;
|
||||||
struct config_group * s = item->ci_group;
|
struct config_group * s = item->ci_group;
|
||||||
|
@ -179,12 +173,10 @@ void config_item_put(struct config_item * item)
|
||||||
kref_put(&item->ci_kref, config_item_release);
|
kref_put(&item->ci_kref, config_item_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* config_group_init - initialize a group for use
|
* config_group_init - initialize a group for use
|
||||||
* @k: group
|
* @k: group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void config_group_init(struct config_group *group)
|
void config_group_init(struct config_group *group)
|
||||||
{
|
{
|
||||||
config_item_init(&group->cg_item);
|
config_item_init(&group->cg_item);
|
||||||
|
@ -201,8 +193,8 @@ void config_group_init(struct config_group *group)
|
||||||
* looking for a matching config_item. If matching item is found
|
* looking for a matching config_item. If matching item is found
|
||||||
* take a reference and return the item.
|
* take a reference and return the item.
|
||||||
*/
|
*/
|
||||||
|
struct config_item *config_group_find_obj(struct config_group *group,
|
||||||
struct config_item * config_group_find_obj(struct config_group * group, const char * name)
|
const char * name)
|
||||||
{
|
{
|
||||||
struct list_head * entry;
|
struct list_head * entry;
|
||||||
struct config_item * ret = NULL;
|
struct config_item * ret = NULL;
|
||||||
|
@ -219,7 +211,6 @@ struct config_item * config_group_find_obj(struct config_group * group, const ch
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(config_item_init);
|
EXPORT_SYMBOL(config_item_init);
|
||||||
EXPORT_SYMBOL(config_group_init);
|
EXPORT_SYMBOL(config_group_init);
|
||||||
EXPORT_SYMBOL(config_item_get);
|
EXPORT_SYMBOL(config_item_get);
|
||||||
|
|
|
@ -75,7 +75,6 @@ extern void config_item_init(struct config_item *);
|
||||||
extern void config_item_init_type_name(struct config_item *item,
|
extern void config_item_init_type_name(struct config_item *item,
|
||||||
const char *name,
|
const char *name,
|
||||||
struct config_item_type *type);
|
struct config_item_type *type);
|
||||||
extern void config_item_cleanup(struct config_item *);
|
|
||||||
|
|
||||||
extern struct config_item * config_item_get(struct config_item *);
|
extern struct config_item * config_item_get(struct config_item *);
|
||||||
extern void config_item_put(struct config_item *);
|
extern void config_item_put(struct config_item *);
|
||||||
|
|
Loading…
Reference in New Issue