Skip to content

Commit 3de1355

Browse files
arndbliu-song-6
authored andcommitted
raid6: neon: add missing prototypes
The raid6 syndrome functions are generated for different sizes and have no generic prototype, while in the inner functions have a prototype in a header that cannot be included from the correct file. In both cases, the compiler warns about missing prototypes: lib/raid6/recov_neon_inner.c:27:6: warning: no previous prototype for '__raid6_2data_recov_neon' [-Wmissing-prototypes] lib/raid6/recov_neon_inner.c:77:6: warning: no previous prototype for '__raid6_datap_recov_neon' [-Wmissing-prototypes] lib/raid6/neon1.c:56:6: warning: no previous prototype for 'raid6_neon1_gen_syndrome_real' [-Wmissing-prototypes] lib/raid6/neon1.c:86:6: warning: no previous prototype for 'raid6_neon1_xor_syndrome_real' [-Wmissing-prototypes] lib/raid6/neon2.c:56:6: warning: no previous prototype for 'raid6_neon2_gen_syndrome_real' [-Wmissing-prototypes] lib/raid6/neon2.c:97:6: warning: no previous prototype for 'raid6_neon2_xor_syndrome_real' [-Wmissing-prototypes] lib/raid6/neon4.c:56:6: warning: no previous prototype for 'raid6_neon4_gen_syndrome_real' [-Wmissing-prototypes] lib/raid6/neon4.c:119:6: warning: no previous prototype for 'raid6_neon4_xor_syndrome_real' [-Wmissing-prototypes] lib/raid6/neon8.c:56:6: warning: no previous prototype for 'raid6_neon8_gen_syndrome_real' [-Wmissing-prototypes] lib/raid6/neon8.c:163:6: warning: no previous prototype for 'raid6_neon8_xor_syndrome_real' [-Wmissing-prototypes] Add a new header file that contains the prototypes for both to avoid the warnings. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3dbd53c commit 3de1355

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

lib/raid6/neon.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
3+
void raid6_neon1_gen_syndrome_real(int disks, unsigned long bytes, void **ptrs);
4+
void raid6_neon1_xor_syndrome_real(int disks, int start, int stop,
5+
unsigned long bytes, void **ptrs);
6+
void raid6_neon2_gen_syndrome_real(int disks, unsigned long bytes, void **ptrs);
7+
void raid6_neon2_xor_syndrome_real(int disks, int start, int stop,
8+
unsigned long bytes, void **ptrs);
9+
void raid6_neon4_gen_syndrome_real(int disks, unsigned long bytes, void **ptrs);
10+
void raid6_neon4_xor_syndrome_real(int disks, int start, int stop,
11+
unsigned long bytes, void **ptrs);
12+
void raid6_neon8_gen_syndrome_real(int disks, unsigned long bytes, void **ptrs);
13+
void raid6_neon8_xor_syndrome_real(int disks, int start, int stop,
14+
unsigned long bytes, void **ptrs);
15+
void __raid6_2data_recov_neon(int bytes, uint8_t *p, uint8_t *q, uint8_t *dp,
16+
uint8_t *dq, const uint8_t *pbmul,
17+
const uint8_t *qmul);
18+
19+
void __raid6_datap_recov_neon(int bytes, uint8_t *p, uint8_t *q, uint8_t *dq,
20+
const uint8_t *qmul);
21+
22+

lib/raid6/neon.uc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626

2727
#include <arm_neon.h>
28+
#include "neon.h"
2829

2930
typedef uint8x16_t unative_t;
3031

lib/raid6/recov_neon.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#ifdef __KERNEL__
1010
#include <asm/neon.h>
11+
#include "neon.h"
1112
#else
1213
#define kernel_neon_begin()
1314
#define kernel_neon_end()
@@ -19,13 +20,6 @@ static int raid6_has_neon(void)
1920
return cpu_has_neon();
2021
}
2122

22-
void __raid6_2data_recov_neon(int bytes, uint8_t *p, uint8_t *q, uint8_t *dp,
23-
uint8_t *dq, const uint8_t *pbmul,
24-
const uint8_t *qmul);
25-
26-
void __raid6_datap_recov_neon(int bytes, uint8_t *p, uint8_t *q, uint8_t *dq,
27-
const uint8_t *qmul);
28-
2923
static void raid6_2data_recov_neon(int disks, size_t bytes, int faila,
3024
int failb, void **ptrs)
3125
{

lib/raid6/recov_neon_inner.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include <arm_neon.h>
8+
#include "neon.h"
89

910
#ifdef CONFIG_ARM
1011
/*

0 commit comments

Comments
 (0)