All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] aic7xxx: remove multiple definition of globals
@ 2021-05-17 20:50 trix
  2021-05-22  4:40 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: trix @ 2021-05-17 20:50 UTC (permalink / raw)
  To: hare, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

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;

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.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/scsi/aic7xxx/aicasm/aicasm_gram.y   | 1 -
 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
index 924d55a8acbfc..65182ad9cdf82 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
@@ -58,7 +58,6 @@
 #include "aicasm_symbol.h"
 #include "aicasm_insformat.h"
 
-int yylineno;
 char *yyfilename;
 char stock_prefix[] = "aic_";
 char *prefix = stock_prefix;
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
index 7bf7fd5953ac9..ed3bdd43c2976 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
@@ -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;
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [SCSI] aic7xxx: remove multiple definition of globals
  2021-05-17 20:50 [PATCH] [SCSI] aic7xxx: remove multiple definition of globals trix
@ 2021-05-22  4:40 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-05-22  4:40 UTC (permalink / raw)
  To: hare, jejb, trix; +Cc: Martin K . Petersen, linux-kernel, linux-scsi

On Mon, 17 May 2021 13:50:57 -0700, trix@redhat.com 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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-22  4:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 20:50 [PATCH] [SCSI] aic7xxx: remove multiple definition of globals trix
2021-05-22  4:40 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.