Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1277236
| From | Philipp Reisner <philipp.reisner@linbit.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 31/38] lru_cache: Converted lc_seq_printf_status to return void |
| Date | 2015-11-25 12:20 +0100 |
| Message-ID | <qyGhc-5xi-17@gated-at.bofh.it> (permalink) |
| References | <qyG7v-5tK-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Roland Kammerer <roland.kammerer@linbit.com>
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>
---
include/linux/lru_cache.h | 2 +-
lib/lru_cache.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h
index 4626228..04fc6e6 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);
extern void lc_committed(struct lru_cache *lc);
struct seq_file;
-extern size_t lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc);
+extern void lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc);
extern void lc_seq_dump_details(struct seq_file *seq, struct lru_cache *lc, char *utext,
void (*detail) (struct seq_file *, struct lc_element *));
diff --git a/lib/lru_cache.c b/lib/lru_cache.c
index 028f5d9..28ba40b 100644
--- a/lib/lru_cache.c
+++ b/lib/lru_cache.c
@@ -238,7 +238,7 @@ void lc_reset(struct lru_cache *lc)
* @seq: the seq_file to print into
* @lc: the lru cache to print statistics of
*/
-size_t lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc)
+void lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc)
{
/* NOTE:
* total calls to lc_get are
@@ -250,8 +250,6 @@ size_t lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc)
seq_printf(seq, "\t%s: used:%u/%u hits:%lu misses:%lu starving:%lu locked:%lu changed:%lu\n",
lc->name, lc->used, lc->nr_elements,
lc->hits, lc->misses, lc->starving, lc->locked, lc->changed);
-
- return 0;
}
static struct hlist_head *lc_hash_slot(struct lru_cache *lc, unsigned int enr)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/38] DRBD update Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:10 +0100 [PATCH 24/38] drbd: debugfs: expose ed_data_gen_id Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 16/38] drbd: add comment why we want to first call local-io-error, then send state Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 05/38] drbd: Move enum write_ordering_e to drbd.h Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 38/38] drbd: fix error path during resize Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 31/38] lru_cache: Converted lc_seq_printf_status to return void Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 14/38] drbd: drbdsetup detach of an unresponsive local disk should not block IO "forever" Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 37/38] drbd: avoid potential deadlock during handshake Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 22/38] drbd: Create a dedicated workqueue for sending acks on the control connection Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 03/38] drbd: De-inline drbd_should_do_remote() and drbd_should_send_out_of_sync() Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 23/38] drbd: prevent NULL pointer deref when resuming diskless primary Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 13/38] drbd: drop remnants of connector -- we don't use it anymore in drbd 8.4 Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 28/38] drbd: fix spurious alert level printk Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 Re: [PATCH 00/38] DRBD update Jens Axboe <axboe@fb.com> - 2015-11-25 19:10 +0100
csiph-web