2019-03-26 21:23:39

by Michael Stefaniuc

[permalink] [raw]
Subject: [PATCH] scripts: coccinelle: Fix description of badty.cocci

Summary was copy and pasted from array_size.cocci.

Signed-off-by: Michael Stefaniuc <[email protected]>
---
scripts/coccinelle/misc/badty.cocci | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccinelle/misc/badty.cocci b/scripts/coccinelle/misc/badty.cocci
index 481cf301ccfc..08470362199c 100644
--- a/scripts/coccinelle/misc/badty.cocci
+++ b/scripts/coccinelle/misc/badty.cocci
@@ -1,4 +1,4 @@
-/// Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
+/// Correct the size argument to alloc functions
///
//# This makes an effort to find cases where the argument to sizeof is wrong
//# in memory allocation functions by checking the type of the allocated memory
--
2.20.1



2019-03-26 21:33:29

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH] scripts: coccinelle: Fix description of badty.cocci



On Tue, 26 Mar 2019, Michael Stefaniuc wrote:

> Summary was copy and pasted from array_size.cocci.
>
> Signed-off-by: Michael Stefaniuc <[email protected]>
> ---
> scripts/coccinelle/misc/badty.cocci | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/coccinelle/misc/badty.cocci b/scripts/coccinelle/misc/badty.cocci
> index 481cf301ccfc..08470362199c 100644
> --- a/scripts/coccinelle/misc/badty.cocci
> +++ b/scripts/coccinelle/misc/badty.cocci
> @@ -1,4 +1,4 @@
> -/// Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
> +/// Correct the size argument to alloc functions

Oops! Thanks.

Acked-by: Julia Lawall <[email protected]>



> ///
> //# This makes an effort to find cases where the argument to sizeof is wrong
> //# in memory allocation functions by checking the type of the allocated memory
> --
> 2.20.1
>
>

2019-03-28 13:26:51

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH] scripts: coccinelle: Fix description of badty.cocci

On Wed, Mar 27, 2019 at 6:24 AM Michael Stefaniuc <[email protected]> wrote:
>
> Summary was copy and pasted from array_size.cocci.
>
> Signed-off-by: Michael Stefaniuc <[email protected]>


Applied to linux-kbuild/fixes. Thanks.


> ---
> scripts/coccinelle/misc/badty.cocci | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/coccinelle/misc/badty.cocci b/scripts/coccinelle/misc/badty.cocci
> index 481cf301ccfc..08470362199c 100644
> --- a/scripts/coccinelle/misc/badty.cocci
> +++ b/scripts/coccinelle/misc/badty.cocci
> @@ -1,4 +1,4 @@
> -/// Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
> +/// Correct the size argument to alloc functions
> ///
> //# This makes an effort to find cases where the argument to sizeof is wrong
> //# in memory allocation functions by checking the type of the allocated memory
> --
> 2.20.1
>


--
Best Regards
Masahiro Yamada