Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1494380rwd; Sun, 14 May 2023 21:27:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Kfnsoio1WfsYOvBSn1Ogu2qEqe7QIcWrj5pxq6YQqXqy1UO6c40wSJ6XiUh+SMwb7thY7 X-Received: by 2002:a05:6a00:8cf:b0:640:e12a:3a20 with SMTP id s15-20020a056a0008cf00b00640e12a3a20mr39150272pfu.1.1684124837066; Sun, 14 May 2023 21:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684124837; cv=none; d=google.com; s=arc-20160816; b=eJDj8LdsaCzcXYDioVY+KbofGzZFgFLkeOzR5sFLvoVMsWen2W4QrMUA6UZ21txD3h Db5wMctFVlRz+dZIjYtGc737ZbXdha3X3Rfk8eEcqYn+b6qad3NSCSV/b6iz7714nphc 2oxV9xSuXTaDQAJZd9WtHrhsDGxCnwih/fR2TMAAVRzHSffLg1Yev0cWidvRAQwVOk00 XU9K//UyhE6jRgQ1gETumn2XX0jRa9zTCwHfIyUXaS2+w55bMr0u9Krsdfjy6zWgwRrE qb/4aBMh35WDLKDVr4ugzhHxf2d7fppDPleRuTSbUP3z4+D8UboxI9S7x/q5rSQmIFun 5AkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=8NtW6WUGY0nZ+1NfxpoY/egivQ1K9N21VyVSufFjtbk=; b=m+C5SoXWTvj2//oRWzIrjJH+izRSprxsfSWx22vTxIquGvZeZs7FV4Kr3cpvlcmdfU unrTv8IGQrQqFMs3M92jozqVrB/NfVso/5EqO9bOwS7UeagqgoUwIXAmgIggm5SEvxLW U+1u/MPWuAbVXYM6V14Btomj1RsNuTET4oa2NeRcYY47YN6eDX45KxcE2HhO+jVuS+SK cVKBFKe4Y7PTxYXJMJNPzhBQIot2+dB5kYrDfCLrr0Q5lyBZ1mhUnsczADJ6cwQQaz66 htagCu+QQQgro+fejx1TG2IG1iqlyMgbgHEIeZSnWy2t/mfvHFW2j2zS+th66lJswWF+ 6dGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a056a00004600b00643bac6f81esi16453217pfk.16.2023.05.14.21.26.58; Sun, 14 May 2023 21:27:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231910AbjEOEZI (ORCPT + 99 others); Mon, 15 May 2023 00:25:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjEOEZG (ORCPT ); Mon, 15 May 2023 00:25:06 -0400 Received: from 167-179-156-38.a7b39c.syd.nbn.aussiebb.net (167-179-156-38.a7b39c.syd.nbn.aussiebb.net [167.179.156.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EFC810CC; Sun, 14 May 2023 21:25:04 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1pyPkf-0090a9-6j; Mon, 15 May 2023 12:24:02 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 15 May 2023 12:24:01 +0800 Date: Mon, 15 May 2023 12:24:01 +0800 From: Herbert Xu To: Jia Jie Ho Cc: "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Conor Dooley , Palmer Dabbelt , 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 Message-ID: References: <20230504073400.1170979-1-jiajie.ho@starfivetech.com> <20230504073400.1170979-5-jiajie.ho@starfivetech.com> <2ae2d187-5db7-9207-7846-1a80e87047b2@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ae2d187-5db7-9207-7846-1a80e87047b2@starfivetech.com> X-Spam-Status: No, score=2.7 required=5.0 tests=BAYES_00,HELO_DYNAMIC_IPADDR2, RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS,TVD_RCVD_IP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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. 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 Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt