U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Cc: Simon Glass <sjg@chromium.org>,
	u-boot@lists.denx.de, Casey Connolly <casey.connolly@linaro.org>
Subject: Re: [PATCH 6/8] string: add strcasestr()
Date: Wed, 8 Jul 2026 13:09:20 -0600	[thread overview]
Message-ID: <20260708190920.GH749385@bill-the-cat> (raw)
In-Reply-To: <878q7luxxg.fsf@rasmusvillemoes.dk>

[-- Attachment #1: Type: text/plain, Size: 2024 bytes --]

On Wed, Jul 08, 2026 at 08:40:59PM +0200, Rasmus Villemoes wrote:
> On Thu, Jul 02 2026, "Simon Glass" <sjg@chromium.org> wrote:
> 
> > Hi Rasmus,
> >
> > On 2026-07-01T17:15:27, Rasmus Villemoes <rv@rasmusvillemoes.dk> wrote:
> >> string: add strcasestr()
> >>
> >> While this is not likely needed by any 'real' driver code, a later
> >> convenience addition to the 'config' command will need this. As usual,
> >> the linker will throw it away if nothing actually uses it, so it
> >> should have no size impact when not used.
> >>
> >> Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
> >>
> >> include/linux/string.h |  1 +
> >>  lib/string.c           | 27 +++++++++++++++++++++++++++
> >>  2 files changed, 28 insertions(+)
> >
> >> diff --git a/include/linux/string.h b/include/linux/string.h
> >> @@ -77,6 +77,7 @@ extern __kernel_size_t strlen(const char *);
> >>  #ifndef __HAVE_ARCH_STRNLEN
> >>  extern __kernel_size_t strnlen(const char *,__kernel_size_t);
> >>  #endif
> >> +char *strcasestr(const char *, const char *);
> >
> > I've been trying to add proper function docs to newly added ones, so
> > we can clearly see the behaviour. Despite these being well-known
> > function, they sometimes differ in how they handle edge-conditions.
> >
> > Also you could group this with the strstr()/strnstr() declarations a
> > few lines above, so it sits alongside its siblings.
> 
> Sure, I can move the declaration up. As for function docs, they exist,
> but in string.c, which is also where the docs for str[n]str is (an
> earlier patch had fixups for those). I see some kernel docs in
> string.h, and I dunno which is preferred, but most, including the
> sibling str[n]str ones, are in the .c file. So I'll leave it there.

The most consistent place for kernel-doc comments has been in the header
files, and not C files. So it would be another part of this series of
cleanups, or a follow-up, to make that all consistent and make something
for doc/api/

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-07-08 19:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 17:15 [PATCH 0/8] some string cleanup, and a tweak of the "config" command Rasmus Villemoes
2026-07-01 17:15 ` [PATCH 1/8] sh: clean up asm/string.h Rasmus Villemoes
2026-07-02  8:29   ` Simon Glass
2026-07-01 17:15 ` [PATCH 2/8] string: correct prototype of strchrnul() Rasmus Villemoes
2026-07-02  8:30   ` Simon Glass
2026-07-01 17:15 ` [PATCH 3/8] string: correct documentation for strstr and strnstr Rasmus Villemoes
2026-07-02  8:30   ` Simon Glass
2026-07-01 17:15 ` [PATCH 4/8] string: remove unused strswab() function Rasmus Villemoes
2026-07-02  8:30   ` Simon Glass
2026-07-01 17:15 ` [PATCH 5/8] string: remove more pointless __HAVE_ARCH_STR* Rasmus Villemoes
2026-07-02  8:30   ` Simon Glass
2026-07-01 17:15 ` [PATCH 6/8] string: add strcasestr() Rasmus Villemoes
2026-07-02  8:30   ` Simon Glass
2026-07-08 18:40     ` Rasmus Villemoes
2026-07-08 19:09       ` Tom Rini [this message]
2026-07-01 17:15 ` [PATCH 7/8] test: string: add test of new strcasestr() function Rasmus Villemoes
2026-07-02  8:30   ` Simon Glass
2026-07-01 17:15 ` [PATCH 8/8] cmd: config: allow simple filtering of output Rasmus Villemoes
2026-07-01 18:15   ` Tom Rini
2026-07-02  8:30   ` Simon Glass
2026-07-08 18:59     ` Rasmus Villemoes

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=20260708190920.GH749385@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=casey.connolly@linaro.org \
    --cc=rv@rasmusvillemoes.dk \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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