Skip to content

Commit

Permalink
asm-generic: xor: mark static functions as __maybe_unused
Browse files Browse the repository at this point in the history
The asm-generic/xor.h header file is nasty and defines static functions
that are not inline. The header file is include by the ARM version of
asm/xor.h, which uses some but not all of the symbols defined there.

Marking the extraneous functions as __maybe_unused lets gcc drop them
without complaining.

Without this patch, building iop13xx_defconfig results in:

include/asm-generic/xor.h:696:34: warning: 'xor_block_8regs_p' defined but not used [-Wunused-variable]
include/asm-generic/xor.h:704:34: warning: 'xor_block_32regs_p' defined but not used [-Wunused-variable]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Dan Williams <dan.j.williams@gmail.com>
Cc: Neil Brown <neilb@suse.de>
  • Loading branch information
Arnd Bergmann committed Oct 3, 2012
1 parent a0d271c commit 720fb19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-generic/xor.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,15 +693,15 @@ static struct xor_block_template xor_block_32regs = {
.do_5 = xor_32regs_5,
};

static struct xor_block_template xor_block_8regs_p = {
static struct xor_block_template xor_block_8regs_p __maybe_unused = {
.name = "8regs_prefetch",
.do_2 = xor_8regs_p_2,
.do_3 = xor_8regs_p_3,
.do_4 = xor_8regs_p_4,
.do_5 = xor_8regs_p_5,
};

static struct xor_block_template xor_block_32regs_p = {
static struct xor_block_template xor_block_32regs_p __maybe_unused = {
.name = "32regs_prefetch",
.do_2 = xor_32regs_p_2,
.do_3 = xor_32regs_p_3,
Expand Down

0 comments on commit 720fb19

Please sign in to comment.