summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Kammerer <roland.kammerer@linbit.com>2015-04-16 04:17:51 -0400
committerJens Axboe <axboe@fb.com>2015-11-25 11:22:02 -0500
commitbb649b34dd3d8f69308f5f193cb64457069c7222 (patch)
tree9efb049c70f7a0c6a90c4f8d0644c72e4ce41bf7
parent63a7c8ad92af5f57d4a2c5be223d6ca424c3670b (diff)
lru_cache: Converted lc_seq_printf_status to return void
Fix the semantic of lc_seq_printf. Currently, it always returns 0 and the return value is unused, therefore, convert the return type to void. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--include/linux/lru_cache.h2
-rw-r--r--lib/lru_cache.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h
index 46262284de47..04fc6e6c7ff0 100644
--- a/include/linux/lru_cache.h
+++ b/include/linux/lru_cache.h
@@ -264,7 +264,7 @@ extern unsigned int lc_put(struct lru_cache *lc, struct lc_element *e);
264extern void lc_committed(struct lru_cache *lc); 264extern void lc_committed(struct lru_cache *lc);
265 265
266struct seq_file; 266struct seq_file;
267extern size_t lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc); 267extern void lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc);
268 268
269extern void lc_seq_dump_details(struct seq_file *seq, struct lru_cache *lc, char *utext, 269extern void lc_seq_dump_details(struct seq_file *seq, struct lru_cache *lc, char *utext,
270 void (*detail) (struct seq_file *, struct lc_element *)); 270 void (*detail) (struct seq_file *, struct lc_element *));
diff --git a/lib/lru_cache.c b/lib/lru_cache.c
index 028f5d996eef..28ba40b99337 100644
--- a/lib/lru_cache.c
+++ b/lib/lru_cache.c
@@ -238,7 +238,7 @@ void lc_reset(struct lru_cache *lc)
238 * @seq: the seq_file to print into 238 * @seq: the seq_file to print into
239 * @lc: the lru cache to print statistics of 239 * @lc: the lru cache to print statistics of
240 */ 240 */
241size_t lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc) 241void lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc)
242{ 242{
243 /* NOTE: 243 /* NOTE:
244 * total calls to lc_get are 244 * total calls to lc_get are
@@ -250,8 +250,6 @@ size_t lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc)
250 seq_printf(seq, "\t%s: used:%u/%u hits:%lu misses:%lu starving:%lu locked:%lu changed:%lu\n", 250 seq_printf(seq, "\t%s: used:%u/%u hits:%lu misses:%lu starving:%lu locked:%lu changed:%lu\n",
251 lc->name, lc->used, lc->nr_elements, 251 lc->name, lc->used, lc->nr_elements,
252 lc->hits, lc->misses, lc->starving, lc->locked, lc->changed); 252 lc->hits, lc->misses, lc->starving, lc->locked, lc->changed);
253
254 return 0;
255} 253}
256 254
257static struct hlist_head *lc_hash_slot(struct lru_cache *lc, unsigned int enr) 255static struct hlist_head *lc_hash_slot(struct lru_cache *lc, unsigned int enr)