devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jia Jie Ho <jiajie.ho@starfivetech.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S . Miller" <davem@davemloft.net>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Emil Renner Berthing <kernel@esmil.dk>,
	Conor Dooley <conor@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	<linux-crypto@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>
Subject: Re: [PATCH v7 4/4] crypto: starfive - Add hash and HMAC support
Date: Mon, 15 May 2023 14:04:21 +0800	[thread overview]
Message-ID: <3ec4b399-48d8-0129-85b7-0fe30e6de9c5@starfivetech.com> (raw)
In-Reply-To: <ZGGz4YFDMKQThG2x@gondor.apana.org.au>

On 15/5/2023 12:24 pm, Herbert Xu wrote:
> On Mon, May 15, 2023 at 11:27:35AM +0800, Jia Jie Ho wrote:
>>
>> I've added COMPILE_TEST in the Kconfig, then ran make W=1, sparse and smatch.
>> However it did not produce the error message.
> 
> I guess you weren't testing on a 64-bit platform.  BIT(2) is
> an unsigned long, so ~BIT(2) is 64-bit long on 64-bit platforms.
> 
I am cross-compiling on a 64-bit platform. 
I'll check my compiler settings again in case this masks errors in future patches.

> You're trying to feed it into writel which takes a 32-bit value,
> hence the warning.
> 
> If you have to use the BIT macro, then you need to cast the result
> to u32:
> 
> #define STARFIVE_IE_MASK_HASH_DONE ((u32)BIT(2))
> 
> But it's probably a lot clearer if you do it as:
> 
> #define STARFIVE_IE_MASK_HASH_DONE 0x4
Sure, I'll do this for the next version.

Thanks,
Jia Jie


      reply	other threads:[~2023-05-15  6:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04  7:33 [PATCH v7 0/4] crypto: starfive - Add drivers for crypto engine Jia Jie Ho
2023-05-04  7:33 ` [PATCH v7 1/4] dt-bindings: crypto: Add StarFive crypto module Jia Jie Ho
2023-05-04  7:33 ` [PATCH v7 2/4] crypto: starfive - Add crypto engine support Jia Jie Ho
2023-05-12 10:54   ` Herbert Xu
2023-05-04  7:33 ` [PATCH v7 3/4] riscv: dts: starfive: Add crypto and DMA node for VisionFive 2 Jia Jie Ho
2023-05-04  7:34 ` [PATCH v7 4/4] crypto: starfive - Add hash and HMAC support Jia Jie Ho
2023-05-12 10:55   ` Herbert Xu
2023-05-15  3:27     ` Jia Jie Ho
2023-05-15  4:24       ` Herbert Xu
2023-05-15  6:04         ` Jia Jie Ho [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=3ec4b399-48d8-0129-85b7-0fe30e6de9c5@starfivetech.com \
    --to=jiajie.ho@starfivetech.com \
    --cc=conor@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel@esmil.dk \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=robh+dt@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).