Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1547708 > unrolled thread

Re: [PATCH 1/1] Coccinelle: memdup: fix the report mode

Started byJulia Lawall <julia.lawall@lip6.fr>
First post2016-12-27 18:50 +0100
Last post2016-12-27 18:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/1] Coccinelle: memdup: fix the report mode Julia Lawall <julia.lawall@lip6.fr> - 2016-12-27 18:50 +0100

#1547708 — Re: [PATCH 1/1] Coccinelle: memdup: fix the report mode

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-12-27 18:50 +0100
SubjectRe: [PATCH 1/1] Coccinelle: memdup: fix the report mode
Message-ID<sT42R-56S-3@gated-at.bofh.it>

On Tue, 27 Dec 2016, Nicolas Iooss wrote:

> The pattern which was used in report mode included an annoying kmemdup
> call, which has no chance of being there. Remove this stray line.
>
> While at it, the name of function kmemdup was misspelled in the warning
> message. Fix this.
>
> Fixes: 29a36d4dec6c ("scripts/coccinelle: improve the coverage of some
> semantic patches")
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

Thanks for the fixes.

julia

> ---
>  scripts/coccinelle/api/memdup.cocci | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/coccinelle/api/memdup.cocci b/scripts/coccinelle/api/memdup.cocci
> index 3d1aa71b7579..8fd6437beda8 100644
> --- a/scripts/coccinelle/api/memdup.cocci
> +++ b/scripts/coccinelle/api/memdup.cocci
> @@ -49,7 +49,6 @@ statement S;
>  @@
>
>  *  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
> -   to = kmemdup(from,size,flag);
>     if (to==NULL || ...) S
>  *  memcpy(to, from, size);
>
> @@ -57,10 +56,10 @@ statement S;
>  p << r.p;
>  @@
>
> -coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdep")
> +coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdup")
>
>  @script:python depends on report@
>  p << r.p;
>  @@
>
> -coccilib.report.print_report(p[0], "WARNING opportunity for kmemdep")
> +coccilib.report.print_report(p[0], "WARNING opportunity for kmemdup")
> --
> 2.11.0
>
>

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web