Commit fcd4ba3b authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Jakub Kicinski

net: dsa: sja1105: Remove unneeded cast in sja1105_crc32()

sja1105_unpack() takes a "const void *buf" as its first parameter, so
there is no need to cast away the "const" of the "buf" variable before
calling it.

Drop the cast, as it prevents the compiler performing some checks.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20210223112003.2223332-1-geert+renesas@glider.beSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8f1c0fd2
...@@ -85,7 +85,7 @@ u32 sja1105_crc32(const void *buf, size_t len) ...@@ -85,7 +85,7 @@ u32 sja1105_crc32(const void *buf, size_t len)
/* seed */ /* seed */
crc = ~0; crc = ~0;
for (i = 0; i < len; i += 4) { for (i = 0; i < len; i += 4) {
sja1105_unpack((void *)buf + i, &word, 31, 0, 4); sja1105_unpack(buf + i, &word, 31, 0, 4);
crc = crc32_le(crc, (u8 *)&word, 4); crc = crc32_le(crc, (u8 *)&word, 4);
} }
return ~crc; return ~crc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment