From patchwork Wed Sep 7 03:34:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Liu X-Patchwork-Id: 12968413 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18FBDC38145 for ; Wed, 7 Sep 2022 03:34:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbiIGDez (ORCPT ); Tue, 6 Sep 2022 23:34:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbiIGDew (ORCPT ); Tue, 6 Sep 2022 23:34:52 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDF2F12D23 for ; Tue, 6 Sep 2022 20:34:43 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2873EYr7015668; Wed, 7 Sep 2022 11:14:34 +0800 (GMT-8) (envelope-from neal_liu@aspeedtech.com) Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 7 Sep 2022 11:34:35 +0800 From: Neal Liu To: Randy Dunlap , Herbert Xu , "David S . Miller" , Joel Stanley , Andrew Jeffery CC: , , , , , kernel test robot Subject: [PATCH v3] crypto: aspeed: fix format unexpected build warning Date: Wed, 7 Sep 2022 11:34:31 +0800 Message-ID: <20220907033431.402208-1-neal_liu@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [192.168.10.10] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 2873EYr7015668 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This fixes the following similar build warning when enabling compile test: aspeed-hace-hash.c:188:9: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] Reported-by: kernel test robot Signed-off-by: Neal Liu Acked-by: Randy Dunlap --- v3: Use "%pad" to print dma_addr_t type. v2: Use "%zu" format to print size_t. drivers/crypto/aspeed/aspeed-hace-hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/aspeed/aspeed-hace-hash.c b/drivers/crypto/aspeed/aspeed-hace-hash.c index 0a44ffc0e13b..5a8a3a611dd4 100644 --- a/drivers/crypto/aspeed/aspeed-hace-hash.c +++ b/drivers/crypto/aspeed/aspeed-hace-hash.c @@ -185,7 +185,7 @@ static int aspeed_ahash_dma_prepare_sg(struct aspeed_hace_dev *hace_dev) remain = (rctx->total + rctx->bufcnt) % rctx->block_size; length = rctx->total + rctx->bufcnt - remain; - AHASH_DBG(hace_dev, "%s:0x%x, %s:0x%x, %s:0x%x, %s:0x%x\n", + AHASH_DBG(hace_dev, "%s:0x%x, %s:%zu, %s:0x%x, %s:0x%x\n", "rctx total", rctx->total, "bufcnt", rctx->bufcnt, "length", length, "remain", remain); @@ -324,8 +324,8 @@ static int aspeed_hace_ahash_trigger(struct aspeed_hace_dev *hace_dev, struct ahash_request *req = hash_engine->req; struct aspeed_sham_reqctx *rctx = ahash_request_ctx(req); - AHASH_DBG(hace_dev, "src_dma:0x%x, digest_dma:0x%x, length:0x%x\n", - hash_engine->src_dma, hash_engine->digest_dma, + AHASH_DBG(hace_dev, "src_dma:%pad, digest_dma:%pad, length:%zu\n", + &hash_engine->src_dma, &hash_engine->digest_dma, hash_engine->src_length); rctx->cmd |= HASH_CMD_INT_ENABLE;