dm cache: remove unused function too_many_discard_blocks
Subsystems (2)
PATCH 1/1 dm cache: remove unused function too_many_discard_blocks
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 <[email protected]>
--- drivers/md/dm-cache-target.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/md/dm-cache-target.c +3 -0
@@ -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)
Signature · 1 line
1.8.3.2