Thread (16 messages) 16 messages, 5 authors, 2021-06-23

[LTP] [PATCH v4 1/3] Add Coccinelle helper scripts for reference

From: Li Wang <hidden>
Date: 2021-06-16 07:24:23

Hi Richard,
+for spatch_file in $*; do
+    case $spatch_file in
+       libltp-test-macro)
+           libltp_spatch --sp-file scripts/coccinelle/libltp-test-macro.cocci;;
+       libltp-test-macro-vars)
+           libltp_spatch --sp-file scripts/coccinelle/libltp-test-macro-vars.cocci \
+                         --ignore lib/tst_test.c;;
+       *)
+           tests_spatch --sp-file scripts/coccinelle/$spatch_file.cocci;;
Why here use the coccinelle/ path and add suffix with the spatch_file?
Wouldn't this below more simple to us:

   scripts/coccinelle/$spatch_file.cocci  ==> $spatch_file
+    esac
+done



--
Regards,
Li Wang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help