+ seq_file-delete-small-value-optimization.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs/seq_file.c: delete small-value optimization
has been added to the -mm tree.  Its filename is
     seq_file-delete-small-value-optimization.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/seq_file-delete-small-value-optimization.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/seq_file-delete-small-value-optimization.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Subject: 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@xxxxxxxxx>
Cc: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/seq_file.c |   10 ----------
 1 file changed, 10 deletions(-)

diff -puN fs/seq_file.c~seq_file-delete-small-value-optimization fs/seq_file.c
--- a/fs/seq_file.c~seq_file-delete-small-value-optimization
+++ a/fs/seq_file.c
@@ -694,11 +694,6 @@ void seq_put_decimal_ull(struct seq_file
 	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
 		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;
_

Patches currently in -mm which might be from adobriyan@xxxxxxxxx are

kstrtox-delete-end-of-string-test.patch
kstrtox-use-unsigned-int-more.patch
seq_file-delete-small-value-optimization.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux