mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonas Rebmann <jre@pengutronix.de>
To: Kees Cook <kees@kernel.org>, Andy Shevchenko <andy@kernel.org>,
	 Andrew Morton <akpm@linux-foundation.org>
Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
	 kernel@pengutronix.de, Jonas Rebmann <jre@pengutronix.de>
Subject: [PATCH 2/5] lib/tests: string_helpers: drop unused parameters
Date: Wed, 16 Sep 2026 19:38:07 +0200	[thread overview]
Message-ID: <20260916-string_unescape-v1-2-7f8bd986fa33@pengutronix.de> (raw)
In-Reply-To: <20260916-string_unescape-v1-0-7f8bd986fa33@pengutronix.de>

Drop the unused parameters from test_string_check_buf() to improve
readability.

Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
 lib/tests/string_helpers_kunit.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lib/tests/string_helpers_kunit.c b/lib/tests/string_helpers_kunit.c
index 9bc3acffaf2f..1ed652f762d1 100644
--- a/lib/tests/string_helpers_kunit.c
+++ b/lib/tests/string_helpers_kunit.c
@@ -18,7 +18,6 @@
 
 static void test_string_check_buf(struct kunit *test,
 				  const char *name, unsigned int flags,
-				  char *in, size_t p,
 				  char *out_real, size_t q_real,
 				  char *out_test, size_t q_test)
 {
@@ -101,8 +100,7 @@ static void test_string_unescape(struct kunit *test,
 		q_real = string_unescape(in, out_real, q_real, flags);
 	}
 
-	test_string_check_buf(test, name, flags, in, p - 1, out_real, q_real,
-			      out_test, q_test);
+	test_string_check_buf(test, name, flags, out_real, q_real, out_test, q_test);
 	KUNIT_EXPECT_EQ_MSG(test, out_real[q_real], '\0', "name:%s", name);
 }
 
@@ -457,8 +455,7 @@ static void test_string_escape(struct kunit *test, const char *name,
 
 	q_real = string_escape_mem(in, p, out_real, out_size, flags, esc);
 
-	test_string_check_buf(test, name, flags, in, p, out_real, q_real, out_test,
-			      q_test);
+	test_string_check_buf(test, name, flags, out_real, q_real, out_test, q_test);
 
 	test_string_escape_overflow(test, in, p, flags, esc, q_test, name);
 }

-- 
2.56.0.rc0.108.gf0ef1b96a0


  parent reply	other threads:[~2026-09-16 17:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 17:38 [PATCH 0/5] lib/string_helpers: fixes and test cases for string_unescape() Jonas Rebmann
2026-09-16 17:38 ` [PATCH 1/5] lib/tests: string_helpers: check null terminator too Jonas Rebmann
2026-09-17  7:14   ` Andy Shevchenko
2026-09-17  8:58     ` Jonas Rebmann
2026-09-17  9:07       ` Andy Shevchenko
2026-09-16 17:38 ` Jonas Rebmann [this message]
2026-09-17  7:18   ` [PATCH 2/5] lib/tests: string_helpers: drop unused parameters Andy Shevchenko
2026-09-17  8:58     ` Jonas Rebmann
2026-09-16 17:38 ` [PATCH 3/5] lib/tests: string_helpers: introduce test_string_unescape_one Jonas Rebmann
2026-09-17  7:21   ` Andy Shevchenko
2026-09-17  8:58     ` Jonas Rebmann
2026-09-17  9:08       ` Andy Shevchenko
2026-09-17  9:56         ` Jonas Rebmann
2026-09-17 12:17           ` Andy Shevchenko
2026-09-16 17:38 ` [PATCH 4/5] lib/string_helpers: use full destination buffer in string_unescape() Jonas Rebmann
2026-09-17  7:45   ` Andy Shevchenko
2026-09-17  9:02     ` Jonas Rebmann
2026-09-16 17:38 ` [PATCH 5/5] lib/string_helpers: fix counting of remaining bytes " Jonas Rebmann
2026-09-17  8:04   ` Andy Shevchenko
2026-09-16 21:36 ` [PATCH 0/5] lib/string_helpers: fixes and test cases for string_unescape() Andrew Morton
2026-09-16 23:13   ` Eric Biggers
2026-09-17  0:04     ` Andrew Morton

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=20260916-string_unescape-v1-2-7f8bd986fa33@pengutronix.de \
    --to=jre@pengutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=andy@kernel.org \
    --cc=kees@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®