Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d50f8f8

Browse files
JoePerchestorvalds
authored andcommitted
lru_cache: remove use of seq_printf return value
The seq_printf return value, because it's frequently misused, will eventually be converted to void. See: commit 1f33c41 ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Signed-off-by: Joe Perches <[email protected]> Cc: Lars Ellenberg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 962e370 commit d50f8f8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/lru_cache.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,11 @@ size_t lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc)
247247
* progress) and "changed", when this in fact lead to an successful
248248
* update of the cache.
249249
*/
250-
return seq_printf(seq, "\t%s: used:%u/%u "
251-
"hits:%lu misses:%lu starving:%lu locked:%lu changed:%lu\n",
252-
lc->name, lc->used, lc->nr_elements,
253-
lc->hits, lc->misses, lc->starving, lc->locked, lc->changed);
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,
252+
lc->hits, lc->misses, lc->starving, lc->locked, lc->changed);
253+
254+
return 0;
254255
}
255256

256257
static struct hlist_head *lc_hash_slot(struct lru_cache *lc, unsigned int enr)

0 commit comments

Comments
 (0)