aic7xxx: remove multiple definition of globals
Subsystems (2)
PATCH 1/1 aic7xxx: remove multiple definition of globals
From: Tom Rix <[email protected]>
When building the aicasm with gcc 10.2 + gas 26.1 Multiple definitions of global variables cause these errors.
multiple definition of `args';
multiple definition of `yylineno';
args came from the expansion ofSTAILQ_HEAD(macro_arg_list, macro_arg) args;
The definition of the macro_arg_list structure is needed. The global variable 'args' is not, so delete.
yylineno is defined by flex, so defining it in bison/*.y file is not needed, so delete.
--- drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | 1 - drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +0 -1
@@ -58,7 +58,6 @@ #include "aicasm_symbol.h" #include "aicasm_insformat.h" -int yylineno; char *yyfilename; char stock_prefix[] = "aic_"; char *prefix = stock_prefix;
drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h +1 -1
@@ -108,7 +108,7 @@ struct macro_arg {regex_t arg_regex;char *replacement_text; }; -STAILQ_HEAD(macro_arg_list, macro_arg) args; +STAILQ_HEAD (macro_arg_list, macro_arg);struct macro_info {struct macro_arg_list args;
Signature · 1 line
2.26.3
Martin K. Petersen
AppliedQuoted 10 lines · On Mon, 17 May 2021 13:50:57 -0700, [email protected] wrote:
When building the aicasm with gcc 10.2 + gas 26.1 Multiple definitions of global variables cause these errors.
multiple definition of `args';
multiple definition of `yylineno';args came from the expansion of
STAILQ_HEAD(macro_arg_list, macro_arg)args;[...]
Applied to 5.13/scsi-fixes, thanks!
[1/1] aic7xxx: remove multiple definition of globals
https://git.kernel.org/mkp/scsi/c/b4de11dfb569
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering