All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Bracey <kevin@bracey.fi>
To: <linux-arm-kernel@lists.infradead.org>
Cc: Kevin Bracey <kevin@bracey.fi>
Subject: [PATCH 1/4] lib/crc32.c: remove unneeded casts
Date: Thu, 13 Jan 2022 08:41:15 +0200	[thread overview]
Message-ID: <20220113064118.1580916-2-kevin@bracey.fi> (raw)
In-Reply-To: <20220113064118.1580916-1-kevin@bracey.fi>

Casts were added in 8f243af42ade ("sections: fix const sections for
crc32 table") to cope with the tables not being const. They are no
longer required since f5e38b9284e1 ("lib: crc32: constify crc32 lookup
table").

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
---
 lib/crc32.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/crc32.c b/lib/crc32.c
index 2a68dfd3b96c..7f062a2639df 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -194,13 +194,11 @@ u32 __pure __weak __crc32c_le(u32 crc, unsigned char const *p, size_t len)
 #else
 u32 __pure __weak crc32_le(u32 crc, unsigned char const *p, size_t len)
 {
-	return crc32_le_generic(crc, p, len,
-			(const u32 (*)[256])crc32table_le, CRC32_POLY_LE);
+	return crc32_le_generic(crc, p, len, crc32table_le, CRC32_POLY_LE);
 }
 u32 __pure __weak __crc32c_le(u32 crc, unsigned char const *p, size_t len)
 {
-	return crc32_le_generic(crc, p, len,
-			(const u32 (*)[256])crc32ctable_le, CRC32C_POLY_LE);
+	return crc32_le_generic(crc, p, len, crc32ctable_le, CRC32C_POLY_LE);
 }
 #endif
 EXPORT_SYMBOL(crc32_le);
@@ -339,8 +337,7 @@ u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
 #else
 u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
 {
-	return crc32_be_generic(crc, p, len,
-			(const u32 (*)[256])crc32table_be, CRC32_POLY_BE);
+	return crc32_be_generic(crc, p, len, crc32table_be, CRC32_POLY_BE);
 }
 #endif
 EXPORT_SYMBOL(crc32_be);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-01-13  6:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13  6:41 [PATCH 0/4] arm64: accelerate crc32_be Kevin Bracey
2022-01-13  6:41 ` Kevin Bracey [this message]
2022-01-13  6:41 ` [PATCH 2/4] lib/crc32.c: Make crc32_be weak for arch override Kevin Bracey
2022-01-13  6:41 ` [PATCH 3/4] lib/crc32test.c: correct printed bytes count Kevin Bracey
2022-01-13  6:41 ` [PATCH 4/4] arm64: accelerate crc32_be Kevin Bracey
2022-01-13 11:56   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220113064118.1580916-2-kevin@bracey.fi \
    --to=kevin@bracey.fi \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.