All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,mcgrof@kernel.org,jim.cromie@gmail.com,jbaron@akamai.com,andriy.shevchenko@linux.intel.com,akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] dyndbg-replace-kstrdup-strchr-with-kstrdup_and_replace.patch removed from -mm tree
Date: Wed, 06 Mar 2024 13:08:10 -0800	[thread overview]
Message-ID: <20240306210810.C648CC433F1@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: dyndbg: replace kstrdup() + strchr() with kstrdup_and_replace()
has been removed from the -mm tree.  Its filename was
     dyndbg-replace-kstrdup-strchr-with-kstrdup_and_replace.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: dyndbg: replace kstrdup() + strchr() with kstrdup_and_replace()
Date: Tue, 13 Feb 2024 18:27:41 +0200

Replace open coded functionalify of kstrdup_and_replace() with a call.

Link: https://lkml.kernel.org/r/20240213162741.3102810-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/dynamic_debug.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/lib/dynamic_debug.c~dyndbg-replace-kstrdup-strchr-with-kstrdup_and_replace
+++ a/lib/dynamic_debug.c
@@ -640,10 +640,9 @@ static int param_set_dyndbg_classnames(c
 	int cls_id, totct = 0;
 	bool wanted;
 
-	cl_str = tmp = kstrdup(instr, GFP_KERNEL);
-	p = strchr(cl_str, '\n');
-	if (p)
-		*p = '\0';
+	cl_str = tmp = kstrdup_and_replace(instr, '\n', '\0', GFP_KERNEL);
+	if (!tmp)
+		return -ENOMEM;
 
 	/* start with previously set state-bits, then modify */
 	curr_bits = old_bits = *dcp->bits;
_

Patches currently in -mm which might be from andriy.shevchenko@linux.intel.com are



                 reply	other threads:[~2024-03-06 21:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240306210810.C648CC433F1@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jbaron@akamai.com \
    --cc=jim.cromie@gmail.com \
    --cc=mcgrof@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.