Re: [Cocci] [PATCH] net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2019-11-21 Thread Enrico Weigelt, metux IT consult
>> >> if (copy_to_user(useraddr, , sizeof(wol))) > > It seems likely there are more of these. > > Is there any way for coccinelle to find them? Just curios: is static struct initialization (on stack) something that should be avoided ? I've been under the impression t

[Cocci] field access scoping / check who accesses certain struct members ?

2019-11-20 Thread Enrico Weigelt, metux IT consult
that access certain struct members and filter out those files that are allowed to do so. This should print out all sites which do those unallowed direct access w/o going through the appropriate helpers. --mtx --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i

NULL pointer constraints vs. compiler checks

2019-07-12 Thread Enrico Weigelt, metux IT consult
-- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [PATCH v2] Coccinelle: Add a SmPL script for the reconsideration of redundant dev_err() calls

2019-07-01 Thread Enrico Weigelt, metux IT consult
omething similar to certain #praga directives for explicitly ignoring invididual warnings in specific lines of code) I believe such a feature, so we don't get spammed with the same false positives again and again. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [Cocci] drivers: Inline code in devm_platform_ioremap_resource() from two functions

2019-06-18 Thread Enrico Weigelt, metux IT consult
and would like to introduce build knobs for, but I have to understand that maintainers have to be pretty reluctant towards those things. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287 ___

Re: [PATCH] drivers: Inline code in devm_platform_ioremap_resource() from two functions

2019-06-17 Thread Enrico Weigelt, metux IT consult
f this ? Looks like a notable code duplication ... I thought we usually try to reduce this, instead of introducing new ones. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: Coccinelle: api: add devm_platform_ioremap_resource script

2019-06-11 Thread Enrico Weigelt, metux IT consult
nt to have completely separate versions of devm_platform_ioremap_resource(), so we don't even have to pass that parameter on stack. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [Cocci] How to replace obsolete #ifdef's?

2019-06-07 Thread Enrico Weigelt, metux IT consult
#define, and addition of comments pragmas and ifdefs. Could you perhaps give an quick example for a newbie ? --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287 ___ Cocci mailing list

Re: [Cocci] How to replace obsolete #ifdef's?

2019-06-07 Thread Enrico Weigelt, metux IT consult
ther simple cases ? --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287 ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] how to replace obsolete #ifdef's

2019-06-05 Thread Enrico Weigelt, metux IT consult
understand preprocessor directives at all, just treats them as literal strings. Maybe that even would be fine in my case, if I only could match on that. Any way for matching just a raw text pattern (w/o being parsed), which includes special chars (eg. #) ? --mtx -- Enrico Weigelt, metux IT co

[Cocci] splitting and fingerprinting findings

2019-06-05 Thread Enrico Weigelt, metux IT consult
to see how well that works ... Did anyone else already working on that topic ? --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287 ___ Cocci mailing list Cocci@systeme.lip6.fr https

[Cocci] how to replace obsolete #ifdef's

2019-06-05 Thread Enrico Weigelt, metux IT consult
be, Just wrapping the assignment into the macro call turned out to be easy. But I haven't found a way to remove the now #ifdef :( Any idea how I could solve this ? --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-15