linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj38.park@gmail.com>
To: agk@redhat.com, trivial@kernel.org, snitzer@redhat.com
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
	SeongJae Park <sj38.park@gmail.com>
Subject: [PATCH] dm cache: remove unused function too_many_discard_blocks
Date: Wed, 26 Mar 2014 13:09:48 +0900	[thread overview]
Message-ID: <1395806988-29189-1-git-send-email-sj38.park@gmail.com> (raw)

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@gmail.com>
---
 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

                 reply	other threads:[~2014-03-26  4:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395806988-29189-1-git-send-email-sj38.park@gmail.com \
    --to=sj38.park@gmail.com \
    --cc=agk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=snitzer@redhat.com \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).