Skip to content

Commit

Permalink
codafs: fix compile warning when CONFIG_SYSCTL=n
Browse files Browse the repository at this point in the history
When CONFIG_SYSCTL=n, we get the following warning:

fs/coda/sysctl.c:18: warning: `coda_tabl' defined but not used

Fix the warning by making sure coda_table and it's callee function are in
the same context.  Also clean up the code by removing extra #ifdef.

[[email protected]: remove unneeded stub macros]
Signed-off-by: Rakib Mullick <[email protected]>
Cc: Jan Harkes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rmullick authored and torvalds committed Mar 23, 2011
1 parent 1c00f01 commit 0bc825d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions fs/coda/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#ifdef CONFIG_SYSCTL
static struct ctl_table_header *fs_table_header;
#endif

static ctl_table coda_table[] = {
{
Expand All @@ -40,7 +39,6 @@ static ctl_table coda_table[] = {
{}
};

#ifdef CONFIG_SYSCTL
static ctl_table fs_table[] = {
{
.procname = "coda",
Expand All @@ -49,22 +47,18 @@ static ctl_table fs_table[] = {
},
{}
};
#endif

void coda_sysctl_init(void)
{
#ifdef CONFIG_SYSCTL
if ( !fs_table_header )
fs_table_header = register_sysctl_table(fs_table);
#endif
}

void coda_sysctl_clean(void)
{
#ifdef CONFIG_SYSCTL
if ( fs_table_header ) {
unregister_sysctl_table(fs_table_header);
fs_table_header = NULL;
}
#endif
}
#endif

0 comments on commit 0bc825d

Please sign in to comment.