From: Neal Liu <neal_liu@aspeedtech.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
Dhananjay Phadke <dphadke@linux.microsoft.com>
Cc: Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
"David S . Miller" <davem@davemloft.net>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 -next] crypto: aspeed: fix type warnings
Date: Fri, 3 Feb 2023 03:25:24 +0000 [thread overview]
Message-ID: <SG2PR06MB32070328ACE15F44F32BCD3580D79@SG2PR06MB3207.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <Y9xowUpO+Y7M0hho@gondor.apana.org.au>
> > > diff --git a/drivers/crypto/aspeed/aspeed-acry.c
> > > b/drivers/crypto/aspeed/aspeed-acry.c
> > > index 164c524015f0..f2429e699d14 100644
> > > --- a/drivers/crypto/aspeed/aspeed-acry.c
> > > +++ b/drivers/crypto/aspeed/aspeed-acry.c
> > > @@ -252,7 +252,7 @@ static int aspeed_acry_rsa_ctx_copy(struct
> aspeed_acry_dev *acry_dev, void *buf,
> > > enum aspeed_rsa_key_mode mode)
> > > {
> > > const u8 *src = xbuf;
> > > - u32 *dw_buf = (u32 *)buf;
> > > + __le32 *dw_buf = (__le32 *)buf;
> >
> > All callers are passing acry_dev->buf_addr as buf, can just change
> > that type to __le32 * and deref here directly?
>
> As buf is already void *, the cast can simply be removed.
I'll just remove the cast. Thanks for your suggestion.
> >
> > > int nbits, ndw;
> > > int i, j, idx;
> > > u32 data = 0;
> > > @@ -302,7 +302,7 @@ static int aspeed_acry_rsa_ctx_copy(struct
> aspeed_acry_dev *acry_dev, void *buf,
> > > static int aspeed_acry_rsa_transfer(struct aspeed_acry_dev *acry_dev)
> > > {
> > > struct akcipher_request *req = acry_dev->req;
> > > - u8 *sram_buffer = (u8 *)acry_dev->acry_sram;
> > > + u8 __iomem *sram_buffer = (u8 __iomem *)acry_dev->acry_sram;
> >
> > u8 cast seems unnecessary, readb takes (void *) and using "+ data_idx"
> > offset below anyway.
>
> Either way a cast is unnecessary as (void __iomem *) converts to
> (u8 __iomem *) just fine.
I'll just remove the cast too.
-Neal
prev parent reply other threads:[~2023-02-03 3:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 7:03 Neal Liu
2023-02-03 1:36 ` Dhananjay Phadke
2023-02-03 1:52 ` Herbert Xu
2023-02-03 3:25 ` Neal Liu [this message]
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=SG2PR06MB32070328ACE15F44F32BCD3580D79@SG2PR06MB3207.apcprd06.prod.outlook.com \
--to=neal_liu@aspeedtech.com \
--cc=andrew@aj.id.au \
--cc=davem@davemloft.net \
--cc=dphadke@linux.microsoft.com \
--cc=herbert@gondor.apana.org.au \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®