diff options
author | Steffen Trumtrar <s.trumtrar@pengutronix.de> | 2015-02-23 10:15:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-02 07:43:25 +0100 |
commit | 093dd1e7befa01aff30c5849994e4195331812fb (patch) | |
tree | 166785417f8ef464cec68b0447eb1aa147dd8936 /scripts/coccinelle | |
parent | e9cd1542ccd193f4bd6a6a57e5f0a143759eb997 (diff) | |
download | barebox-093dd1e7befa01aff30c5849994e4195331812fb.tar.gz barebox-093dd1e7befa01aff30c5849994e4195331812fb.tar.xz |
scripts: socfpga: add coccinelle magic
Use coccinelle to cleanup the imported u-boot code some more.
This will remove:
- debugging macros (TCL_RPT, BFM_STAGE, ALTERA_ASSERT)
- empty if/else/for blocks resulting from macro deletion
- some unused functions (scc_mgr_xxx)
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r-- | scripts/coccinelle/misc/altera_sequencer.cocci | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/scripts/coccinelle/misc/altera_sequencer.cocci b/scripts/coccinelle/misc/altera_sequencer.cocci new file mode 100644 index 0000000000..9fea239c0c --- /dev/null +++ b/scripts/coccinelle/misc/altera_sequencer.cocci @@ -0,0 +1,93 @@ +@r_shadow@ +@@ + +- ...curr_shadow_reg = 0; + +@r_out2_delay@ +type T; +@@ + +- T scc_mgr_apply_group_dq_out2_delay(...) +- { +- ... +- } + +@r_oct_out2@ +type T; +@@ +- T scc_mgr_apply_group_dqs_io_and_oct_out2(...) +- { +- ... +- } + +@r_oct_out2_gradual@ +type T; +@@ + +- T scc_mgr_set_group_dqs_io_and_oct_out2_gradual(...) +- { +- ... +- } + +@r_eye_diag@ +type T; +@@ + +- T rw_mgr_mem_calibrate_eye_diag_aid(...) +- { +- ... +- } + +@r_full_test@ +type T; +@@ + +- T rw_mgr_mem_calibrate_full_test(...) +- { +- ... +- } + +@r_user_init_cal_req@ +@@ + +- static void user_init_cal_req (...) +- { +- ... +- } + +@r_tcl@ +@@ + +- TCLRPT_SET(...); + +@r_bfm@ +@@ + +- BFM_STAGE(...); + +@r_trace@ +@@ + +- TRACE_FUNC(...); + +@r_assert@ +@@ + +- ALTERA_ASSERT(...); + +@r_if@ +@@ + +- if (...) {} + +@r_if_else@ +@@ + +- if (...) { +- } else { +- } + +@r_for@ +@@ + +- for (...;...;...) {} |