[PATCH v2 1/6] mips/crc32: remove unused enums

Eric Biggers posted 6 patches 10 months, 1 week ago
[PATCH v2 1/6] mips/crc32: remove unused enums
Posted by Eric Biggers 10 months, 1 week ago
From: Eric Biggers <ebiggers@google.com>

Remove enum crc_op_size and enum crc_type, since they are never actually
used.  Tokens with the names of the enum values do appear in the file,
but they are only used for token concatenation with the preprocessor.

This prevents a conflict with the addition of crc32c() to linux/crc32.h.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/r/20250207224233.GA1261167@ax162
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/mips/lib/crc32-mips.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/arch/mips/lib/crc32-mips.c b/arch/mips/lib/crc32-mips.c
index 083e5d693a169..100ac586aadb2 100644
--- a/arch/mips/lib/crc32-mips.c
+++ b/arch/mips/lib/crc32-mips.c
@@ -14,19 +14,10 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <asm/mipsregs.h>
 #include <linux/unaligned.h>
 
-enum crc_op_size {
-	b, h, w, d,
-};
-
-enum crc_type {
-	crc32,
-	crc32c,
-};
-
 #ifndef TOOLCHAIN_SUPPORTS_CRC
 #define _ASM_SET_CRC(OP, SZ, TYPE)					  \
 _ASM_MACRO_3R(OP, rt, rs, rt2,						  \
 	".ifnc	\\rt, \\rt2\n\t"					  \
 	".error	\"invalid operands \\\"" #OP " \\rt,\\rs,\\rt2\\\"\"\n\t" \
-- 
2.48.1
Re: [PATCH v2 1/6] mips/crc32: remove unused enums
Posted by Ard Biesheuvel 10 months, 1 week ago
On Sat, 8 Feb 2025 at 03:49, Eric Biggers <ebiggers@kernel.org> wrote:
>
> From: Eric Biggers <ebiggers@google.com>
>
> Remove enum crc_op_size and enum crc_type, since they are never actually
> used.  Tokens with the names of the enum values do appear in the file,
> but they are only used for token concatenation with the preprocessor.
>
> This prevents a conflict with the addition of crc32c() to linux/crc32.h.
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/r/20250207224233.GA1261167@ax162
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  arch/mips/lib/crc32-mips.c | 9 ---------
>  1 file changed, 9 deletions(-)
>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

> diff --git a/arch/mips/lib/crc32-mips.c b/arch/mips/lib/crc32-mips.c
> index 083e5d693a169..100ac586aadb2 100644
> --- a/arch/mips/lib/crc32-mips.c
> +++ b/arch/mips/lib/crc32-mips.c
> @@ -14,19 +14,10 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <asm/mipsregs.h>
>  #include <linux/unaligned.h>
>
> -enum crc_op_size {
> -       b, h, w, d,
> -};
> -
> -enum crc_type {
> -       crc32,
> -       crc32c,
> -};
> -
>  #ifndef TOOLCHAIN_SUPPORTS_CRC
>  #define _ASM_SET_CRC(OP, SZ, TYPE)                                       \
>  _ASM_MACRO_3R(OP, rt, rs, rt2,                                           \
>         ".ifnc  \\rt, \\rt2\n\t"                                          \
>         ".error \"invalid operands \\\"" #OP " \\rt,\\rs,\\rt2\\\"\"\n\t" \
> --
> 2.48.1
>