Skip to content

Commit

Permalink
scsi: aic7xxx: Remove multiple definition of globals
Browse files Browse the repository at this point in the history
Building aicasm with gcc 10.2 + gas 26.1 causes these errors:

  multiple definition of `args';
  multiple definition of `yylineno';

args came from the expansion of:

  STAILQ_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 it.

yylineno is defined by flex, so defining it in bison/*.y file is not
needed. Also delete this.

Link: https://lore.kernel.org/r/20210517205057.1850010-1-trix@redhat.com
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Tom Rix authored and Martin K. Petersen committed May 22, 2021
1 parent 7e76063 commit b4de11d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
#include "aicasm_symbol.h"
#include "aicasm_insformat.h"

int yylineno;
char *yyfilename;
char stock_prefix[] = "aic_";
char *prefix = stock_prefix;
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b4de11d

Please sign in to comment.