diff options
author | Bob Liu <lliubbo@gmail.com> | 2013-04-02 02:47:42 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-02 19:43:41 (GMT) |
commit | 555ee46f58c12a0b48b1d0b6b62637f874f00f2d (patch) | |
tree | 853a72a200d6acb6df56e32b960dfeb4deb2692b /drivers/staging/zcache/zbud.c | |
parent | 6d3a63790c6b280351fbb7cf31690c5d0043ea49 (diff) | |
download | linux-fsl-qoriq-555ee46f58c12a0b48b1d0b6b62637f874f00f2d.tar.xz |
drivers: staging: zcache: fix compile error
Because 'ramster_debugfs_init' is not defined if !CONFIG_DEBUG_FS, there is
compile error:
$ make drivers/staging/zcache/
staging/zcache/ramster/ramster.c: In function ‘ramster_init’:
staging/zcache/ramster/ramster.c:981:2: error: implicit declaration of
function ‘ramster_debugfs_init’ [-Werror=implicit-function-declaration]
This patch fix it and reduce some #ifdef CONFIG_DEBUG_FS in .c files the same
way.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/zcache/zbud.c')
-rw-r--r-- | drivers/staging/zcache/zbud.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/zcache/zbud.c b/drivers/staging/zcache/zbud.c index fdff5c6..6cda4ed 100644 --- a/drivers/staging/zcache/zbud.c +++ b/drivers/staging/zcache/zbud.c @@ -342,6 +342,11 @@ static int zbud_debugfs_init(void) } #undef zdfs #undef zdfs64 +#else +static inline int zbud_debugfs_init(void) +{ + return 0; +} #endif /* protects the buddied list and all unbuddied lists */ @@ -1051,9 +1056,7 @@ void zbud_init(void) { int i; -#ifdef CONFIG_DEBUG_FS zbud_debugfs_init(); -#endif BUG_ON((sizeof(struct tmem_handle) * 2 > CHUNK_SIZE)); BUG_ON(sizeof(struct zbudpage) > sizeof(struct page)); for (i = 0; i < NCHUNKS; i++) { |