Re: [PATCH] modpost: introduce get_basename() helper

From: Nicolas Schier
Date: Sat Feb 08 2025 - 04:31:53 EST


On Sat 08 Feb 2025 02:50:13 GMT, Masahiro Yamada wrote:
> The logic to retrieve the basename appears multiple times.
> Factor out the common pattern into a helper function.
>
> I copied kbasename() from include/linux/string.h and renamed it
> to get_basename().
>
> Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> ---
>
> scripts/mod/modpost.c | 41 ++++++++++++++++++----------------------
> scripts/mod/modpost.h | 1 +
> scripts/mod/sumversion.c | 13 ++++---------
> 3 files changed, 23 insertions(+), 32 deletions(-)

Thanks.

Reviewed-by: Nicolas Schier <nicolas@xxxxxxxxx>