All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Llamas <cmllamas@google.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Matt Atwood" <matthew.s.atwood@intel.com>,
	kernel-team@android.com, linux-kernel@vger.kernel.org,
	"open list:INTEL DRM XE DRIVER (Lunar Lake and newer)"
	<intel-xe@lists.freedesktop.org>,
	"open list:DRM DRIVERS" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: replace basename() with portable strrchr()
Date: Thu, 21 Aug 2025 21:32:07 +0000	[thread overview]
Message-ID: <aKeQV4EeNgfIsX_k@google.com> (raw)
In-Reply-To: <v5j6nxynzvvlcxu3m3mkeyjv5dlozzp7ixkgc6u6hdzh7en6jh@zvzqm5n7njfd>

On Thu, Aug 21, 2025 at 04:00:33PM -0500, Lucas De Marchi wrote:
> 
> IMO the POSIX version is horrible. Let's add a xbasename() in this
> xe_gen_wa_oob.c and use it:
> 
> /*
>  * Avoid the libgen.h vs string.h differences or lack thereof, just use
>  * our own.
>  */
> static const char *xbasename(const char *s)
> {
> 	const char *p = strrchr(s, '/');
> 	return p ? p + 1 : s;
> }
> 
> static int fn_to_prefix(const char *fn, char *prefix, size_t size)
> {
> ...
> 	fn = xbasename(fn);
> ...
> }
> 

Sounds good. Would you mind if I use __basename()? I'll send the v2 in a
bit.

  reply	other threads:[~2025-08-21 21:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 20:16 [PATCH] drm/xe: replace basename() with portable strrchr() Carlos Llamas
2025-08-20 21:15 ` Lucas De Marchi
2025-08-20 23:05   ` Carlos Llamas
2025-08-21 21:00     ` Lucas De Marchi
2025-08-21 21:32       ` Carlos Llamas [this message]
2025-08-21 22:00       ` [PATCH v2] drm/xe: switch to local __basename() helper Carlos Llamas
2025-08-23 11:56         ` Lucas De Marchi
2025-08-25 15:49           ` Carlos Llamas
2025-08-25 15:57           ` [PATCH v3] drm/xe: switch to local xbasename() helper Carlos Llamas
2025-08-25 16:01             ` Lucas De Marchi
2025-08-20 21:18 ` [PATCH] drm/xe: replace basename() with portable strrchr() Tiffany Yang
2025-08-21 13:14 ` ✓ CI.KUnit: success for " Patchwork
2025-08-21 13:58 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-21 22:08 ` ✓ CI.KUnit: success for drm/xe: replace basename() with portable strrchr() (rev2) Patchwork
2025-08-21 22:46 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-22 11:15 ` ✓ Xe.CI.Full: success for drm/xe: replace basename() with portable strrchr() Patchwork
2025-08-22 22:12 ` ✗ Xe.CI.Full: failure for drm/xe: replace basename() with portable strrchr() (rev2) Patchwork
2025-08-25 17:29 ` ✓ CI.KUnit: success for drm/xe: replace basename() with portable strrchr() (rev3) Patchwork
2025-08-25 18:18 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-26  2:01 ` ✗ Xe.CI.Full: failure " Patchwork

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=aKeQV4EeNgfIsX_k@google.com \
    --to=cmllamas@google.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.s.atwood@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    /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.