Skip to content

Commit

Permalink
module: make module_sect_attrs private to kernel/module.c
Browse files Browse the repository at this point in the history
No-one else is using these afaics.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Rusty Russell committed May 1, 2008
1 parent e4c576b commit a58730c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
17 changes: 0 additions & 17 deletions include/linux/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,23 +229,6 @@ enum module_state
MODULE_STATE_GOING,
};

/* Similar stuff for section attributes. */
struct module_sect_attr
{
struct module_attribute mattr;
char *name;
unsigned long address;
};

struct module_sect_attrs
{
struct attribute_group grp;
int nsections;
struct module_sect_attr attrs[0];
};

struct module_param_attrs;

struct module
{
enum module_state state;
Expand Down
16 changes: 15 additions & 1 deletion kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,20 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs,
* J. Corbet <corbet@lwn.net>
*/
#if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS)
struct module_sect_attr
{
struct module_attribute mattr;
char *name;
unsigned long address;
};

struct module_sect_attrs
{
struct attribute_group grp;
unsigned int nsections;
struct module_sect_attr attrs[0];
};

static ssize_t module_sect_show(struct module_attribute *mattr,
struct module *mod, char *buf)
{
Expand All @@ -1001,7 +1015,7 @@ static ssize_t module_sect_show(struct module_attribute *mattr,

static void free_sect_attrs(struct module_sect_attrs *sect_attrs)
{
int section;
unsigned int section;

for (section = 0; section < sect_attrs->nsections; section++)
kfree(sect_attrs->attrs[section].name);
Expand Down

0 comments on commit a58730c

Please sign in to comment.