* + lib-string_helpers-drop-indentation-level-in-string_escape_mem.patch added to -mm tree
@ 2021-05-09 3:48 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-05-09 3:48 UTC (permalink / raw)
To: andriy.shevchenko, bfields, chuck.lever, mm-commits, viro
The patch titled
Subject: lib/string_helpers: drop indentation level in string_escape_mem()
has been added to the -mm tree. Its filename is
lib-string_helpers-drop-indentation-level-in-string_escape_mem.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/lib-string_helpers-drop-indentation-level-in-string_escape_mem.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/lib-string_helpers-drop-indentation-level-in-string_escape_mem.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/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: lib/string_helpers: drop indentation level in string_escape_mem()
The only one conditional is left on the upper level, move the rest to the
same level and drop indentation level. No functional changes.
Link: https://lkml.kernel.org/r/20210504180819.73127-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/string_helpers.c | 46 ++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 23 deletions(-)
--- a/lib/string_helpers.c~lib-string_helpers-drop-indentation-level-in-string_escape_mem
+++ a/lib/string_helpers.c
@@ -515,29 +515,29 @@ int string_escape_mem(const char *src, s
* In these cases we just pass through a character to the
* output buffer.
*/
- if (is_dict && !strchr(only, c)) {
- /* do nothing */
- } else {
- if (isprint(c) &&
- flags & ESCAPE_NP && escape_passthrough(c, &p, end))
- continue;
-
- if (flags & ESCAPE_SPACE && escape_space(c, &p, end))
- continue;
-
- if (flags & ESCAPE_SPECIAL && escape_special(c, &p, end))
- continue;
-
- if (flags & ESCAPE_NULL && escape_null(c, &p, end))
- continue;
-
- /* ESCAPE_OCTAL and ESCAPE_HEX always go last */
- if (flags & ESCAPE_OCTAL && escape_octal(c, &p, end))
- continue;
-
- if (flags & ESCAPE_HEX && escape_hex(c, &p, end))
- continue;
- }
+ if (is_dict && !strchr(only, c) &&
+ escape_passthrough(c, &p, end))
+ continue;
+
+ if (isprint(c) &&
+ flags & ESCAPE_NP && escape_passthrough(c, &p, end))
+ continue;
+
+ if (flags & ESCAPE_SPACE && escape_space(c, &p, end))
+ continue;
+
+ if (flags & ESCAPE_SPECIAL && escape_special(c, &p, end))
+ continue;
+
+ if (flags & ESCAPE_NULL && escape_null(c, &p, end))
+ continue;
+
+ /* ESCAPE_OCTAL and ESCAPE_HEX always go last */
+ if (flags & ESCAPE_OCTAL && escape_octal(c, &p, end))
+ continue;
+
+ if (flags & ESCAPE_HEX && escape_hex(c, &p, end))
+ continue;
escape_passthrough(c, &p, end);
}
_
Patches currently in -mm which might be from andriy.shevchenko@linux.intel.com are
lib-string_helpers-switch-to-use-bit-macro.patch
lib-string_helpers-move-escape_np-check-inside-else-branch-in-a-loop.patch
lib-string_helpers-drop-indentation-level-in-string_escape_mem.patch
lib-string_helpers-introduce-escape_na-for-escaping-non-ascii.patch
lib-string_helpers-introduce-escape_nap-to-escape-non-ascii-and-non-printable.patch
lib-string_helpers-allow-to-append-additional-characters-to-be-escaped.patch
lib-test-string_helpers-print-flags-in-hexadecimal-format.patch
lib-test-string_helpers-get-rid-of-trailing-comma-in-terminators.patch
lib-test-string_helpers-add-test-cases-for-new-features.patch
maintainers-add-myself-as-designated-reviewer-for-generic-string-library.patch
seq_file-introduce-seq_escape_mem.patch
seq_file-add-seq_escape_str-as-replica-of-string_escape_str.patch
seq_file-convert-seq_escape-to-use-seq_escape_str.patch
nfsd-avoid-non-flexible-api-in-seq_quote_mem.patch
seq_file-drop-unused-_escape_mem_ascii.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-09 3:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09 3:48 + lib-string_helpers-drop-indentation-level-in-string_escape_mem.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).