[PATCH] dm cache: remove unused function too_many_discard_blocks
From: SeongJae Park
Date: Wed Mar 26 2014 - 00:08:17 EST
Fix following trivial build warning:
drivers/md/dm-cache-target.c:2182:13: warning:
âtoo_many_discard_blocksâ defined but not used [-Wunused-function]
static bool too_many_discard_blocks(sector_t discard_block_size,
^
It's usage removed by ab1f4c35b7("dm cache: prevent corruption caused by
discard_block_size > cache_block_size") as work-around and the
definition was not removed though it was only one usage. Let's remove
the definition now for clean build result and get back the definition
again after the workarounded problem solved well.
Signed-off-by: SeongJae Park <sj38.park@xxxxxxxxx>
---
drivers/md/dm-cache-target.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 9f96e7a..2c1d347 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2178,6 +2178,8 @@ static int create_cache_policy(struct cache *cache, struct cache_args *ca,
*/
#define MAX_DISCARD_BLOCKS (1 << 14)
+#if 0
+/* FIXME: remove if 0 macro after stop-gap workaround solved */
static bool too_many_discard_blocks(sector_t discard_block_size,
sector_t origin_size)
{
@@ -2185,6 +2187,7 @@ static bool too_many_discard_blocks(sector_t discard_block_size,
return origin_size > MAX_DISCARD_BLOCKS;
}
+#endif
static sector_t calculate_discard_block_size(sector_t cache_block_size,
sector_t origin_size)
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/