8e54fe1b | 11-Jul-2022 |
Steven Rostedt (Google) <rostedt@goodmis.org> |
coccinelle: Remove script that checks replacing 0/1 with false/true in functions returning bool
There is nothing wrong with current code that returns 0 or 1 for a function returning bool. It is perf
coccinelle: Remove script that checks replacing 0/1 with false/true in functions returning bool
There is nothing wrong with current code that returns 0 or 1 for a function returning bool. It is perfectly acceptable by the C standard.
To avoid churn of unwanted patches that are constantly sent to maintainers who do not care about this change, remove the script that flags it as an issue. This issue is not worth the burden on maintainers to accept useless patches.
Link: https://lore.kernel.org/all/20220705073822.7276-1-jiapeng.chong@linux.alibaba.com/ Link: https://lore.kernel.org/all/20220429075201.68581-1-jiapeng.chong@linux.alibaba.com/ Link: https://lore.kernel.org/all/1649236467-29390-1-git-send-email-baihaowen@meizu.com/ Link: https://lore.kernel.org/all/20220317014740.3138-1-jiapeng.chong@linux.alibaba.com/ Link: https://lore.kernel.org/all/190b5c2f2f2fb9cc775fce8daed72bf893be48a4.1642065293.git.davidcomponentone@gmail.com/ Link: https://lore.kernel.org/all/20211214113845.439392-1-deng.changcheng@zte.com.cn/ Link: https://lore.kernel.org/all/20210824065735.60660-1-deng.changcheng@zte.com.cn/ Link: https://lore.kernel.org/all/20210824064305.60081-1-deng.changcheng@zte.com.cn/ Link: https://lore.kernel.org/all/20210824062359.59474-1-deng.changcheng@zte.com.cn/
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Cc: Michal Marek <mmarek@suse.cz> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
show more ...
|
aeb300c1 | 28-Apr-2021 |
Denis Efremov <efremov@linux.com> |
coccinelle: misc: minmax: suppress patch generation for err returns
There is a standard idiom for "if 'ret' holds an error, return it": return ret < 0 ? ret : 0;
Developers prefer to keep the thin
coccinelle: misc: minmax: suppress patch generation for err returns
There is a standard idiom for "if 'ret' holds an error, return it": return ret < 0 ? ret : 0;
Developers prefer to keep the things as they are because stylistic change to "return min(ret, 0);" breaks readability.
Let's suppress automatic generation for this type of patches.
Signed-off-by: Denis Efremov <efremov@linux.com>
show more ...
|
5d2db9bb | 23-Apr-2021 |
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> |
coccinelle: irqf_oneshot: reduce the severity due to false positives
The IRQF_ONESHOT should be present for threaded IRQ using default primary handler. However intetrupt of many child devices, e.g.
coccinelle: irqf_oneshot: reduce the severity due to false positives
The IRQF_ONESHOT should be present for threaded IRQ using default primary handler. However intetrupt of many child devices, e.g. children of MFD, is nested thus the IRQF_ONESHOT is not needed. The coccinelle message about error misleads submitters and reviewers about the severity of the issue, so make it a warning and mention possible false positive.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
show more ...
|
cb62732d | 08-Mar-2021 |
Denis Efremov <efremov@linux.com> |
coccinelle: misc: update uninitialized_var.cocci documentation
Remove the documentation link from the warning message because commit 3942ea7a10c9 ("deprecated.rst: Remove now removed uninitialized_v
coccinelle: misc: update uninitialized_var.cocci documentation
Remove the documentation link from the warning message because commit 3942ea7a10c9 ("deprecated.rst: Remove now removed uninitialized_var") removed the section from documentation. Update the rule documentation accordingly.
Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
show more ...
|
3afb532b | 08-Mar-2021 |
Denis Efremov <efremov@linux.com> |
coccinelle: misc: restrict patch mode in flexible_array.cocci
Skip patches generation for structs with a single field. Changing a zero-length array to a flexible array member in a struct with no nam
coccinelle: misc: restrict patch mode in flexible_array.cocci
Skip patches generation for structs with a single field. Changing a zero-length array to a flexible array member in a struct with no named members breaks the compilation. However, reporting such cases is still valuable, e.g. commit 637464c59e0b ("ACPI: NFIT: Fix flexible_array.cocci warnings").
Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
show more ...
|
7b36c139 | 21-Sep-2020 |
Denis Efremov <efremov@linux.com> |
coccinelle: misc: add flexible_array.cocci script
One-element and zero-length arrays are deprecated [1]. Kernel code should always use "flexible array members" instead, except for existing uapi defi
coccinelle: misc: add flexible_array.cocci script
One-element and zero-length arrays are deprecated [1]. Kernel code should always use "flexible array members" instead, except for existing uapi definitions.
The script warns about one-element and zero-length arrays in structs.
[1] commit 68e4cd17e218 ("docs: deprecated.rst: Add zero-length and one-element arrays")
Cc: Kees Cook <keescook@chromium.org> Cc: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
show more ...
|
518d8a56 | 12-Dec-2018 |
Julia Lawall <Julia.Lawall@lip6.fr> |
scripts: coccinelle: Correct warning message
"Assignment" requires the assigned value before the place that value is stored into.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: M
scripts: coccinelle: Correct warning message
"Assignment" requires the assigned value before the place that value is stored into.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|