Skip to contentSkip to conversation

scripts: coccinelle: Fix description of badty.cocci

PATCH In review Michael Stefaniuc 3 participants 3 messages Mar 26, 2019 – Mar 28, 2019 Coccinelle/Semantic Patches (SmPL)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: coccinelle: Fix description of badty.cocci

Summary was copy and pasted from array_size.cocci.

---
 scripts/coccinelle/misc/badty.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccinelle/misc/badty.cocci +1 -1
index 481cf301ccfc..08470362199c 100644
@@ -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
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Michael Stefaniuc

Summary was copy and pasted from array_size.cocci.

---
 scripts/coccinelle/misc/badty.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccinelle/misc/badty.cocci +0 -0
index 481cf301ccfc..08470362199c 100644

scripts/coccinelle/misc/badty.cocci line 1

Quoted 2 lines
scripts/coccinelle/misc/badty.cocci +1 -1
@@ -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.

Quoted 7 lines
scripts/coccinelle/misc/badty.cocci +0 -1
 ///
 //# 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

#2 lore raw
In reply to Michael Stefaniuc
Quoted 4 lines · Michael Stefaniuc

Summary was copy and pasted from array_size.cocci.

Applied to linux-kbuild/fixes. Thanks.

Quoted 17 lines
---
 scripts/coccinelle/misc/badty.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccinelle/misc/badty.cocci +1 -2
index 481cf301ccfc..08470362199c 100644
@@ -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

Signature · 2 lines
Best Regards
Masahiro Yamada