aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2017-05-31 09:17:34 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-06-01 08:44:37 +1000
commit0e961ed4d39c8c95f5dcf10b13213d6128486c7b (patch)
treea308f79cb5fa8403f91003f14addd4151f3c8276
parent0dfae2badc76dd071dd001e65050048980d869d1 (diff)
fs/seq_file.c: delete small-value optimization
num_to_str() optimizes printing small integers [0..9], so the same check higher in callchain is unnecessary. Link: http://lkml.kernel.org/r/20170516204246.GA18123@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--fs/seq_file.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c
index dc7c2be963ed..13e8c092d4d2 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -694,11 +694,6 @@ void seq_put_decimal_ull(struct seq_file *m, const char *delimiter,
if (m->count + 1 >= m->size)
goto overflow;
- if (num < 10) {
- m->buf[m->count++] = num + '0';
- return;
- }
-
len = num_to_str(m->buf + m->count, m->size - m->count, num);
if (!len)
goto overflow;
@@ -733,11 +728,6 @@ void seq_put_decimal_ll(struct seq_file *m, const char *delimiter, long long num
num = -num;
}
- if (num < 10) {
- m->buf[m->count++] = num + '0';
- return;
- }
-
len = num_to_str(m->buf + m->count, m->size - m->count, num);
if (!len)
goto overflow;