The patch titled aic7xxx: introduce "dont_generate_debug_code" keyword in aicasm parser has been added to the -mm tree. Its filename is aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: aic7xxx: introduce "dont_generate_debug_code" keyword in aicasm parser From: Denys Vlasenko <vda.linux@xxxxxxxxxxxxxx> aic7xxx still contains ~30kb of dead code if pretty printing of registers is requested. These patches deal with it. Size differences: text data bss dec hex filename DEBUG_ENABLE+PRETTY_PRINT: 234697 2362 1188 238247 3a2a7 linux-2.6.26-rc8-/drivers/scsi/aic7xxx/built-in.o 205092 2362 1188 208642 32f02 linux-2.6.26-rc8/drivers/scsi/aic7xxx/built-in.o NO_DEBUG_ENABLE+PRETTY_PRINT: 227272 2362 1172 230806 38596 linux-2.6.26-rc8-/drivers/scsi/aic7xxx/built-in.o 197671 2362 1172 201205 311f5 linux-2.6.26-rc8/drivers/scsi/aic7xxx/built-in.o DEBUG_ENABLE+NO_PRETTY_PRINT: 192457 2362 1188 196007 2fda7 linux-2.6.26-rc8-/drivers/scsi/aic7xxx/built-in.o 192457 2362 1188 196007 2fda7 linux-2.6.26-rc8/drivers/scsi/aic7xxx/built-in.o NO_DEBUG_ENABLE+NO_PRETTY_PRINT: 185040 2362 1172 188574 2e09e linux-2.6.26-rc8-/drivers/scsi/aic7xxx/built-in.o 185040 2362 1172 188574 2e09e linux-2.6.26-rc8/drivers/scsi/aic7xxx/built-in.o This patch: Introduce "dont_generate_debug_code" keyword in aicasm parser. Signed-off-by: Denys Vlasenko <vda.linux@xxxxxxxxxxxxxx> Cc: Hannes Reinecke <hare@xxxxxxx> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | 10 ++++++++++ drivers/scsi/aic7xxx/aicasm/aicasm_scan.l | 1 + drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c | 3 +++ drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h | 3 ++- 4 files changed, 16 insertions(+), 1 deletion(-) diff -puN drivers/scsi/aic7xxx/aicasm/aicasm_gram.y~aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser drivers/scsi/aic7xxx/aicasm/aicasm_gram.y --- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y~aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser +++ a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y @@ -147,6 +147,8 @@ void yyerror(const char *string); %token T_ACCESS_MODE +%token T_DONT_GENERATE_DEBUG_CODE + %token T_MODES %token T_DEFINE @@ -357,6 +359,7 @@ reg_attribute: | size | count | access_mode +| dont_generate_debug_code | modes | field_defn | enum_defn @@ -410,6 +413,13 @@ access_mode: } ; +dont_generate_debug_code: + T_DONT_GENERATE_DEBUG_CODE + { + cur_symbol->dont_generate_debug_code = 1; + } +; + modes: T_MODES mode_list { diff -puN drivers/scsi/aic7xxx/aicasm/aicasm_scan.l~aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser drivers/scsi/aic7xxx/aicasm/aicasm_scan.l --- a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l~aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser +++ a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l @@ -164,6 +164,7 @@ download { return T_DOWNLOAD; } address { return T_ADDRESS; } count { return T_COUNT; } access_mode { return T_ACCESS_MODE; } +dont_generate_debug_code { return T_DONT_GENERATE_DEBUG_CODE; } modes { return T_MODES; } RW|RO|WO { if (strcmp(yytext, "RW") == 0) diff -puN drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c~aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c --- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c~aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser +++ a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c @@ -539,6 +539,9 @@ symtable_dump(FILE *ofile, FILE *dfile) aic_print_include(dfile, stock_include_file); SLIST_FOREACH(curnode, ®isters, links) { + if (curnode->symbol->dont_generate_debug_code) + continue; + switch(curnode->symbol->type) { case REGISTER: case SCBLOC: diff -puN drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h~aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h --- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h~aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser +++ a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h @@ -137,7 +137,8 @@ typedef struct symbol { struct label_info *linfo; struct cond_info *condinfo; struct macro_info *macroinfo; - }info; + } info; + int dont_generate_debug_code; } symbol_t; typedef struct symbol_ref { _ Patches currently in -mm which might be from vda.linux@xxxxxxxxxxxxxx are aic7xxx-introduce-dont_generate_debug_code-keyword-in-aicasm-parser.patch aic7xxx-update-reg-files.patch aic7xxx-update-_shipped-files.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html