raid6/test: fix a compilation warning
authorZhengyuan Liu <liuzhengyuan@kylinos.cn>
Fri, 20 Dec 2019 02:21:27 +0000 (10:21 +0800)
committerSong Liu <songliubraving@fb.com>
Mon, 13 Jan 2020 19:44:09 +0000 (11:44 -0800)
The compilation warning is redefination showed as following:

        In file included from tables.c:2:
        ../../../include/linux/export.h:180: warning: "EXPORT_SYMBOL" redefined
         #define EXPORT_SYMBOL(sym)  __EXPORT_SYMBOL(sym, "")

        In file included from tables.c:1:
        ../../../include/linux/raid/pq.h:61: note: this is the location of the previous definition
         #define EXPORT_SYMBOL(sym)

Fixes: 69a94abb82ee ("export.h, genksyms: do not make genksyms calculate CRC of trimmed symbols")
Signed-off-by: Zhengyuan Liu <liuzhengyuan@kylinos.cn>
Signed-off-by: Song Liu <songliubraving@fb.com>
include/linux/raid/pq.h
lib/raid6/mktables.c

index 0b6e7ad9cd2a8dcc43642d175c68202d09e700ee..e0ddb47f44020fd5498d60057fe89c51761b00cc 100644 (file)
@@ -58,7 +58,9 @@ extern const char raid6_empty_zero_page[PAGE_SIZE];
 #define enable_kernel_altivec()
 #define disable_kernel_altivec()
 
+#undef EXPORT_SYMBOL
 #define EXPORT_SYMBOL(sym)
+#undef EXPORT_SYMBOL_GPL
 #define EXPORT_SYMBOL_GPL(sym)
 #define MODULE_LICENSE(licence)
 #define MODULE_DESCRIPTION(desc)
index 9c485df1308fbdba0dd79ae5f718f9f6bb4778bf..f02e10fa6238174c25662be782d1c6ccd1fea768 100644 (file)
@@ -56,8 +56,8 @@ int main(int argc, char *argv[])
        uint8_t v;
        uint8_t exptbl[256], invtbl[256];
 
-       printf("#include <linux/raid/pq.h>\n");
        printf("#include <linux/export.h>\n");
+       printf("#include <linux/raid/pq.h>\n");
 
        /* Compute multiplication table */
        printf("\nconst u8  __attribute__((aligned(256)))\n"