Re: [U-Boot] [PATCH 1/1] Makefile: add coccicheck target
On 10 November 2017 at 11:54, Heinrich Schuchardtwrote: > Coccinelle is a program for static code analysis. > For details on Coccinelle see > > http://coccinelle.lip6.fr/ > > Add scripts/coccicheck and Documentation/dev-tools/coccinelle.rst > copied from Linux kernel v4.14-rc8. > > The coccicheck script executes the tests *.cocci in > directory scripts/coccinelle by calling spatch. > > In Makefile add a coccicheck target. You can use it with > > make coccicheck MODE= > > where mode in patch, report, context, org. > > Signed-off-by: Heinrich Schuchardt > --- > The patch depends on > > [PATCH v2 1/1] scripts/ld-version.sh: regular expression compile fails > https://patchwork.ozlabs.org/patch/836029/ > --- > Documentation/dev-tools/coccinelle.rst | 491 > + > Makefile | 9 + > scripts/coccicheck | 256 + > 3 files changed, 756 insertions(+) > create mode 100644 Documentation/dev-tools/coccinelle.rst > create mode 100755 scripts/coccicheck Can you please put the docs in the doc/ directory? Otherwise: Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] Makefile: add coccicheck target
2017-11-15 1:21 GMT+09:00 Heinrich Schuchardt: > On 11/14/2017 10:34 AM, Masahiro Yamada wrote: >> >> Hi. >> >> >> 2017-11-11 3:54 GMT+09:00 Heinrich Schuchardt : >>> >>> Coccinelle is a program for static code analysis. >>> For details on Coccinelle see >>> >>> http://coccinelle.lip6.fr/ >>> >>> Add scripts/coccicheck and Documentation/dev-tools/coccinelle.rst >>> copied from Linux kernel v4.14-rc8. >>> >>> The coccicheck script executes the tests *.cocci in >>> directory scripts/coccinelle by calling spatch. >>> >>> In Makefile add a coccicheck target. You can use it with >>> >>> make coccicheck MODE= >>> >>> where mode in patch, report, context, org. >>> >>> Signed-off-by: Heinrich Schuchardt >> >> >> You can run "make coccicheck" without the .config file. >> So, you need to add coccinelle to no-dot-config-targets. >> >> >> Refer to the following code in Linux. >> >> no-dot-config-targets := clean mrproper distclean \ >> cscope gtags TAGS tags help% %docs check% >> coccicheck \ >> $(version_h) headers_% archheaders archscripts \ >> kernelversion %src-pkg >> > > For whatever reason the Makefile without my patch already had a coccicheck > entry in this list. > > We should not add it twice. > Oops, I missed the current Makefile had it. Sorry for noise. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] Makefile: add coccicheck target
On 11/14/2017 10:34 AM, Masahiro Yamada wrote: Hi. 2017-11-11 3:54 GMT+09:00 Heinrich Schuchardt: Coccinelle is a program for static code analysis. For details on Coccinelle see http://coccinelle.lip6.fr/ Add scripts/coccicheck and Documentation/dev-tools/coccinelle.rst copied from Linux kernel v4.14-rc8. The coccicheck script executes the tests *.cocci in directory scripts/coccinelle by calling spatch. In Makefile add a coccicheck target. You can use it with make coccicheck MODE= where mode in patch, report, context, org. Signed-off-by: Heinrich Schuchardt You can run "make coccicheck" without the .config file. So, you need to add coccinelle to no-dot-config-targets. Refer to the following code in Linux. no-dot-config-targets := clean mrproper distclean \ cscope gtags TAGS tags help% %docs check% coccicheck \ $(version_h) headers_% archheaders archscripts \ kernelversion %src-pkg For whatever reason the Makefile without my patch already had a coccicheck entry in this list. We should not add it twice. Best regards Heinrich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] Makefile: add coccicheck target
Hi. 2017-11-11 3:54 GMT+09:00 Heinrich Schuchardt: > Coccinelle is a program for static code analysis. > For details on Coccinelle see > > http://coccinelle.lip6.fr/ > > Add scripts/coccicheck and Documentation/dev-tools/coccinelle.rst > copied from Linux kernel v4.14-rc8. > > The coccicheck script executes the tests *.cocci in > directory scripts/coccinelle by calling spatch. > > In Makefile add a coccicheck target. You can use it with > > make coccicheck MODE= > > where mode in patch, report, context, org. > > Signed-off-by: Heinrich Schuchardt You can run "make coccicheck" without the .config file. So, you need to add coccinelle to no-dot-config-targets. Refer to the following code in Linux. no-dot-config-targets := clean mrproper distclean \ cscope gtags TAGS tags help% %docs check% coccicheck \ $(version_h) headers_% archheaders archscripts \ kernelversion %src-pkg -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot