Files
linux/drivers/gpu/drm/xe
Carlos Llamas 75671d90fd drm/xe: switch to local xbasename() helper
Commit b0a2ee5567 ("drm/xe: prepare xe_gen_wa_oob to be multi-use")
introduced a call to basename(). The GNU version of this function is not
portable and fails to build with alternative libc implementations like
musl or bionic. This causes the following build error:

  drivers/gpu/drm/xe/xe_gen_wa_oob.c:130:12: error: assignment to ‘const char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
    130 |         fn = basename(fn);
        |            ^

While a POSIX version of basename() could be used, it would require a
separate header plus the behavior differs from GNU version in that it
might modify its argument. Not great.

Instead, implement a local xbasename() helper based on strrchr() that
provides the same functionality and avoids portability issues.

Fixes: b0a2ee5567 ("drm/xe: prepare xe_gen_wa_oob to be multi-use")
Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Tiffany Yang <ynaffit@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250825155743.1132433-1-cmllamas@google.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit 41be792f5b)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-08-26 10:12:11 -04:00
..
2025-08-14 10:30:53 -04:00
2024-05-09 21:28:25 +02:00
2025-07-14 13:20:02 -07:00
2025-01-09 17:58:09 +01:00
2025-06-27 14:52:31 -07:00
2025-07-14 07:55:18 -07:00
2025-06-02 11:00:46 -07:00
2025-06-27 14:52:31 -07:00
2025-07-01 13:58:50 -07:00
2025-06-27 14:52:31 -07:00
2025-06-27 14:52:31 -07:00
2025-03-25 20:51:29 -07:00
2025-01-14 07:02:49 -08:00
2024-11-15 15:59:51 -08:00
2024-05-13 21:36:50 +02:00
2025-06-27 14:52:31 -07:00
2025-07-01 13:55:19 -07:00
2025-07-01 13:55:19 -07:00
2025-06-27 14:52:31 -07:00
2024-05-22 12:03:55 +02:00
2025-07-14 13:40:17 -07:00
2024-09-19 10:15:40 +02:00
2024-05-07 12:03:49 +02:00
2025-08-14 10:30:53 -04:00
2025-01-27 08:54:06 -08:00
2025-02-03 11:51:26 -08:00
2024-05-13 21:36:52 +02:00
2025-07-14 07:55:18 -07:00
2025-07-14 07:55:18 -07:00
2025-01-19 00:12:02 +01:00
2025-06-27 14:52:31 -07:00
2025-07-28 10:22:28 -04:00
2025-01-17 00:01:58 +05:30
2025-04-10 15:50:01 -07:00