aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aicasm/aicasm.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2008-04-25 09:01:41 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-27 13:20:00 -0400
commit3dbd10f3d8b00dad35d3fac95e91c066ae71d9a8 (patch)
treecbd020e0d4e9911afc88dbfc725f66139fb30129 /drivers/scsi/aic7xxx/aicasm/aicasm.c
parenta198c3d0393faa1fa9f0e6e917ce980d3638f8df (diff)
[SCSI] aic7xxx: teach aicasm to not emit unused debug code/data
Add a 'count' variable to each symbol which gets increased every time the symbol is referenced. And then modify the register definition to include counts for symbols which are referenced from the source code only and not from the sequencer code. This will give us an automatic usage count for the symbols with only minimal hand-crafting. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aicasm/aicasm.c')
-rw-r--r--drivers/scsi/aic7xxx/aicasm/aicasm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm.c b/drivers/scsi/aic7xxx/aicasm/aicasm.c
index 924102720b14..e4a778720301 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm.c
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm.c
@@ -362,7 +362,7 @@ output_code()
362" *\n" 362" *\n"
363"%s */\n", versions); 363"%s */\n", versions);
364 364
365 fprintf(ofile, "static uint8_t seqprog[] = {\n"); 365 fprintf(ofile, "static const uint8_t seqprog[] = {\n");
366 for (cur_instr = STAILQ_FIRST(&seq_program); 366 for (cur_instr = STAILQ_FIRST(&seq_program);
367 cur_instr != NULL; 367 cur_instr != NULL;
368 cur_instr = STAILQ_NEXT(cur_instr, links)) { 368 cur_instr = STAILQ_NEXT(cur_instr, links)) {
@@ -415,7 +415,7 @@ output_code()
415 } 415 }
416 416
417 fprintf(ofile, 417 fprintf(ofile,
418"static struct patch {\n" 418"static const struct patch {\n"
419" %spatch_func_t *patch_func;\n" 419" %spatch_func_t *patch_func;\n"
420" uint32_t begin :10,\n" 420" uint32_t begin :10,\n"
421" skip_instr :10,\n" 421" skip_instr :10,\n"
@@ -435,7 +435,7 @@ output_code()
435 fprintf(ofile, "\n};\n\n"); 435 fprintf(ofile, "\n};\n\n");
436 436
437 fprintf(ofile, 437 fprintf(ofile,
438"static struct cs {\n" 438"static const struct cs {\n"
439" uint16_t begin;\n" 439" uint16_t begin;\n"
440" uint16_t end;\n" 440" uint16_t end;\n"
441"} critical_sections[] = {\n"); 441"} critical_sections[] = {\n");