modpost: explain why we can't use strsep
diff mbox series

Message ID 20200726214419.3362-1-wsa@kernel.org
State New
Headers show
Series
  • modpost: explain why we can't use strsep
Related show

Commit Message

Wolfram Sang July 26, 2020, 9:44 p.m. UTC
Mention why we open-code strsep, so it is clear that it is intentional.

Fixes: 736bb11898ef ("modpost: remove use of non-standard strsep() in HOSTCC code")
Signed-off-by: Wolfram Sang <wsa@kernel.org>
---
 scripts/mod/modpost.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Masahiro Yamada July 27, 2020, 4:39 a.m. UTC | #1
On Mon, Jul 27, 2020 at 6:44 AM Wolfram Sang <wsa@kernel.org> wrote:
>
> Mention why we open-code strsep, so it is clear that it is intentional.
>
> Fixes: 736bb11898ef ("modpost: remove use of non-standard strsep() in HOSTCC code")


Applied, but this Fixes tag looks questionable to me
because this patch is just adding a comment.




> Signed-off-by: Wolfram Sang <wsa@kernel.org>
> ---
>  scripts/mod/modpost.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 45f2ab2ec2d4..69341b36f271 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -144,6 +144,7 @@ char *get_line(char **stringp)
>         if (!orig || *orig == '\0')
>                 return NULL;
>
> +       /* don't use strsep here, it is not available everywhere */
>         next = strchr(orig, '\n');
>         if (next)
>                 *next++ = '\0';
> --
> 2.27.0
>
Wolfram Sang July 27, 2020, 7:54 a.m. UTC | #2
> > Mention why we open-code strsep, so it is clear that it is intentional.
> >
> > Fixes: 736bb11898ef ("modpost: remove use of non-standard strsep() in HOSTCC code")
> 
> Applied, but this Fixes tag looks questionable to me
> because this patch is just adding a comment.

Yes, agreed.

Patch
diff mbox series

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 45f2ab2ec2d4..69341b36f271 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -144,6 +144,7 @@  char *get_line(char **stringp)
 	if (!orig || *orig == '\0')
 		return NULL;
 
+	/* don't use strsep here, it is not available everywhere */
 	next = strchr(orig, '\n');
 	if (next)
 		*next++ = '\0';