mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
crypto: inside-secure - Fixed warnings on inconsistent byte order handling
This fixes a bunch of endianness related sparse warnings reported by the kbuild test robot as well as Ben Dooks. Credits for the fix to safexcel.c go to Ben Dooks. Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
9b537997b6
commit
13a1bb93f7
@@ -311,13 +311,14 @@ static void eip197_init_firmware(struct safexcel_crypto_priv *priv)
|
||||
static int eip197_write_firmware(struct safexcel_crypto_priv *priv,
|
||||
const struct firmware *fw)
|
||||
{
|
||||
const u32 *data = (const u32 *)fw->data;
|
||||
const __be32 *data = (const __be32 *)fw->data;
|
||||
int i;
|
||||
|
||||
/* Write the firmware */
|
||||
for (i = 0; i < fw->size / sizeof(u32); i++)
|
||||
writel(be32_to_cpu(data[i]),
|
||||
priv->base + EIP197_CLASSIFICATION_RAMS + i * sizeof(u32));
|
||||
priv->base + EIP197_CLASSIFICATION_RAMS +
|
||||
i * sizeof(__be32));
|
||||
|
||||
/* Exclude final 2 NOPs from size */
|
||||
return i - EIP197_FW_TERMINAL_NOPS;
|
||||
|
||||
Reference in New Issue
Block a user