| 707f8e0d | 09-Aug-2026 |
Sang-Heon Jeon <ekffu200098@gmail.com> |
coccinelle: misc: struct_size: drop unneeded parentheses
The outer parentheses and the single-branch disjunction don't matter when just matching and reporting a line. Eliminating them reduces the co
coccinelle: misc: struct_size: drop unneeded parentheses
The outer parentheses and the single-branch disjunction don't matter when just matching and reporting a line. Eliminating them reduces the complexity of the pattern to match and gives a performance improvement in the non-patch cases, like the previous minmax change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
show more ...
|
| af8613c8 | 26-Jul-2026 |
Julia Lawall <Julia.Lawall@inria.fr> |
coccinelle: misc: minmax: check for the presence of if cases
As done previously for the ternary command, check that a file contains the min or max if pattern before applying the minif and maxif rule
coccinelle: misc: minmax: check for the presence of if cases
As done previously for the ternary command, check that a file contains the min or max if pattern before applying the minif and maxif rules.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
show more ...
|
| fd0a63f0 | 26-Jul-2026 |
Julia Lawall <Julia.Lawall@inria.fr> |
coccinelle: misc: minmax: drop unneeded parentheses
The outer parentheses don't matter when just matching an returning a line. Eliminating them reduces the complexity of the pattern to match and giv
coccinelle: misc: minmax: drop unneeded parentheses
The outer parentheses don't matter when just matching an returning a line. Eliminating them reduces the complexity of the pattern to match and gives a small performance improvement in the non-patch cases.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
show more ...
|
| 62aa6f2e | 03-Dec-2024 |
Masahiro Yamada <masahiroy@kernel.org> |
scripts/nsdeps: get 'make nsdeps' working again
Since commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal"), when MODULE_IMPORT_NS() is missing, 'make nsdeps' inserts pointless
scripts/nsdeps: get 'make nsdeps' working again
Since commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal"), when MODULE_IMPORT_NS() is missing, 'make nsdeps' inserts pointless code:
MODULE_IMPORT_NS("ns");
Here, "ns" is not a namespace, but the variable in the semantic patch. It must not be quoted. Instead, a string literal must be passed to Coccinelle.
Fixes: cdd30ebb1b9f ("module: Convert symbol namespace to string literal") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
| 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 ...
|