Skip to content

lib/string_helpers et al.: Change return value of strreplace()

Andy Shevchenko linux-ext4 lkml 3 versions – Applied

Status from this message: Applied to for-next/hardening, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyApplied
  2. v23 patches 8 repliesSuperseded
  3. v13 patches 5 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3jbd2: Avoid printing outside the boundary of the bufferfs/jbd2/journal.c+2 -40 replies
2/3lib/string_helpers: Change returned value of the strreplace()include/linux/string.h lib/string_helpers.c+9 -50 replies
3/3kobject: Use return value of strreplace()lib/kobject.c+1 -20 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJan Kara
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] lib/string_helpers et al.: Change return value of strreplace()

It's more convenient to have strreplace() to return the pointer to
the string itself. This will help users to make their code better.

The patch 1 kills the only user of the returned value of strreplace(), Patch 2 converts the return value of strreplace(). And patch 3 shows how it may be useful. That said, the series can be routed via fs tree, with or without the last patch.

In v3:
- rebased on top of latest Linux Next

In v2:
- removed not anymore used variable (LKP)
- added tag (Jan)
- fixed wording (Kees)
- actually return the pointer to the string itself

Andy Shevchenko (3):
jbd2: Avoid printing outside the boundary of the buffer lib/string_helpers: Change returned value of the strreplace()
kobject: Use return value of strreplace()

 fs/jbd2/journal.c      |  6 ++----
 include/linux/string.h |  2 +-
 lib/kobject.c          |  3 +--
 lib/string_helpers.c   | 12 ++++++++----
 4 files changed, 12 insertions(+), 11 deletions(-)
Signature · 1 line
2.40.0.1.gaa8946217a0b