1efe1e
From a5359ddd052860bacf957e65fe819c63e974b3a6 Mon Sep 17 00:00:00 2001
1efe1e
From: =?UTF-8?q?Dirk=20M=C3=BCller?= <dmueller@suse.de>
1efe1e
Date: Tue, 8 Feb 2022 17:50:50 +0100
1efe1e
Subject: [PATCH] lib/raid6/test: fix multiple definition linking error
1efe1e
MIME-Version: 1.0
1efe1e
Content-Type: text/plain; charset=UTF-8
1efe1e
Content-Transfer-Encoding: 8bit
1efe1e
Git-commit: a5359ddd052860bacf957e65fe819c63e974b3a6
1efe1e
Patch-mainline: v5.18-rc1
1efe1e
References: git-fixes
1efe1e
1efe1e
GCC 10+ defaults to -fno-common, which enforces proper declaration of
1efe1e
external references using "extern". without this change a link would
1efe1e
fail with:
1efe1e
1efe1e
  lib/raid6/test/algos.c:28: multiple definition of `raid6_call';
1efe1e
  lib/raid6/test/test.c:22: first defined here
1efe1e
1efe1e
the pq.h header that is included already includes an extern declaration
1efe1e
so we can just remove the redundant one here.
1efe1e
1efe1e
Cc: <stable@vger.kernel.org>
1efe1e
Signed-off-by: Dirk Müller <dmueller@suse.de>
1efe1e
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
1efe1e
Signed-off-by: Song Liu <song@kernel.org>
1efe1e
---
1efe1e
 lib/raid6/test/test.c | 1 -
1efe1e
 1 file changed, 1 deletion(-)
1efe1e
1efe1e
diff --git a/lib/raid6/test/test.c b/lib/raid6/test/test.c
1efe1e
index a3cf071941ab..841a55242aba 100644
1efe1e
--- a/lib/raid6/test/test.c
1efe1e
+++ b/lib/raid6/test/test.c
1efe1e
@@ -19,7 +19,6 @@
1efe1e
 #define NDISKS		16	/* Including P and Q */
1efe1e
 
1efe1e
 const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE)));
1efe1e
-struct raid6_calls raid6_call;
1efe1e
 
1efe1e
 char *dataptrs[NDISKS];
1efe1e
 char data[NDISKS][PAGE_SIZE] __attribute__((aligned(PAGE_SIZE)));
1efe1e
-- 
1efe1e
2.37.1
1efe1e