From: David Miller <davem@davemloft.net>
To: ayush.sawal@chelsio.com
Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
netdev@vger.kernel.org, manojmalviya@chelsio.com
Subject: Re: [PATCH net-next 1/2] Crypto/chcr: Fixes compilations warnings
Date: Thu, 14 May 2020 12:53:00 -0700 (PDT) [thread overview]
Message-ID: <20200514.125300.1860838845258685507.davem@davemloft.net> (raw)
In-Reply-To: <20200514075330.25542-2-ayush.sawal@chelsio.com>
From: Ayush Sawal <ayush.sawal@chelsio.com>
Date: Thu, 14 May 2020 13:23:29 +0530
> @@ -256,7 +256,7 @@ static void get_aes_decrypt_key(unsigned char *dec_key,
> return;
> }
> for (i = 0; i < nk; i++)
> - w_ring[i] = be32_to_cpu(*(u32 *)&key[4 * i]);
> + w_ring[i] = be32_to_cpu(*(__be32 *)&key[4 * i]);
>
> i = 0;
If the key stored is a big endian value, please fix the type
of ablkctx->key to be __be32 instead of making the driver so
ugly with unnecessary casts all over the place.
This is a really lazy and sloppy way to fix these warnings, and
I'm not applying stuff like this, sorry.
next prev parent reply other threads:[~2020-05-14 19:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 7:53 [PATCH net-next 0/2] Fixing compilation warnings and errors Ayush Sawal
2020-05-14 7:53 ` [PATCH net-next 1/2] Crypto/chcr: Fixes compilations warnings Ayush Sawal
2020-05-14 19:53 ` David Miller [this message]
2020-05-14 7:53 ` [PATCH net-next 2/2] Crypto/chcr: Fixes a cocci check error Ayush Sawal
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=20200514.125300.1860838845258685507.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ayush.sawal@chelsio.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=manojmalviya@chelsio.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).