* [PATCH v2] lib/raid6/test: fix multiple definition linking error
@ 2022-02-08 16:50 Dirk Müller
2022-02-08 17:58 ` Song Liu
0 siblings, 1 reply; 2+ messages in thread
From: Dirk Müller @ 2022-02-08 16:50 UTC (permalink / raw
To: linux-raid; +Cc: Dirk Müller, stable, Paul Menzel
GCC 10+ defaults to -fno-common, which enforces proper declaration of
external references using "extern". without this change a link would
fail with:
lib/raid6/test/algos.c:28: multiple definition of `raid6_call';
lib/raid6/test/test.c:22: first defined here
the pq.h header that is included already includes an extern declaration
so we can just remove the redundant one here.
Cc: <stable@vger.kernel.org>
Signed-off-by: Dirk Müller <dmueller@suse.de>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
lib/raid6/test/test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/raid6/test/test.c b/lib/raid6/test/test.c
index a3cf071941ab..841a55242aba 100644
--- a/lib/raid6/test/test.c
+++ b/lib/raid6/test/test.c
@@ -19,7 +19,6 @@
#define NDISKS 16 /* Including P and Q */
const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE)));
-struct raid6_calls raid6_call;
char *dataptrs[NDISKS];
char data[NDISKS][PAGE_SIZE] __attribute__((aligned(PAGE_SIZE)));
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] lib/raid6/test: fix multiple definition linking error
2022-02-08 16:50 [PATCH v2] lib/raid6/test: fix multiple definition linking error Dirk Müller
@ 2022-02-08 17:58 ` Song Liu
0 siblings, 0 replies; 2+ messages in thread
From: Song Liu @ 2022-02-08 17:58 UTC (permalink / raw
To: Dirk Müller; +Cc: linux-raid, stable, Paul Menzel
On Tue, Feb 8, 2022 at 8:51 AM Dirk Müller <dmueller@suse.de> wrote:
>
> GCC 10+ defaults to -fno-common, which enforces proper declaration of
> external references using "extern". without this change a link would
> fail with:
>
> lib/raid6/test/algos.c:28: multiple definition of `raid6_call';
> lib/raid6/test/test.c:22: first defined here
>
> the pq.h header that is included already includes an extern declaration
> so we can just remove the redundant one here.
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Dirk Müller <dmueller@suse.de>
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Applied to md-next. Thanks!
Song
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-08 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-08 16:50 [PATCH v2] lib/raid6/test: fix multiple definition linking error Dirk Müller
2022-02-08 17:58 ` Song Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).